Commit 5aeecaf4 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

irq: make irq2_iommu to use dyn_array

Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent eef1de76
#include <linux/interrupt.h>
#include <linux/dmar.h> #include <linux/dmar.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
...@@ -11,12 +12,19 @@ static struct ioapic_scope ir_ioapic[MAX_IO_APICS]; ...@@ -11,12 +12,19 @@ static struct ioapic_scope ir_ioapic[MAX_IO_APICS];
static int ir_ioapic_num; static int ir_ioapic_num;
int intr_remapping_enabled; int intr_remapping_enabled;
static struct { struct irq_2_iommu {
struct intel_iommu *iommu; struct intel_iommu *iommu;
u16 irte_index; u16 irte_index;
u16 sub_handle; u16 sub_handle;
u8 irte_mask; u8 irte_mask;
} irq_2_iommu[NR_IRQS]; };
#ifdef CONFIG_HAVE_DYNA_ARRAY
static struct irq_2_iommu *irq_2_iommu;
DEFINE_DYN_ARRAY(irq_2_iommu, sizeof(struct irq_2_iommu), nr_irqs, PAGE_SIZE, NULL);
#else
static struct irq_2_iommu irq_2_iommu[NR_IRQS];
#endif
static DEFINE_SPINLOCK(irq_2_ir_lock); static DEFINE_SPINLOCK(irq_2_ir_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment