aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:49:59 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:07 -0400
commit5aeecaf4908499b1fd006d313ccbacde6a6bac43 (patch)
treeee3e1a2aca4605f6038008bc3394a771c3c74c27 /drivers/pci
parenteef1de76da54a2ab6c6659c9a3722fd54a0e3459 (diff)
irq: make irq2_iommu to use dyn_array
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/intr_remapping.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index 980566e3352b..6961be807684 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/pci/intr_remapping.c
@@ -1,3 +1,4 @@
1#include <linux/interrupt.h>
1#include <linux/dmar.h> 2#include <linux/dmar.h>
2#include <linux/spinlock.h> 3#include <linux/spinlock.h>
3#include <linux/jiffies.h> 4#include <linux/jiffies.h>
@@ -11,12 +12,19 @@ static struct ioapic_scope ir_ioapic[MAX_IO_APICS];
11static int ir_ioapic_num; 12static int ir_ioapic_num;
12int intr_remapping_enabled; 13int intr_remapping_enabled;
13 14
14static struct { 15struct irq_2_iommu {
15 struct intel_iommu *iommu; 16 struct intel_iommu *iommu;
16 u16 irte_index; 17 u16 irte_index;
17 u16 sub_handle; 18 u16 sub_handle;
18 u8 irte_mask; 19 u8 irte_mask;
19} irq_2_iommu[NR_IRQS]; 20};
21
22#ifdef CONFIG_HAVE_DYNA_ARRAY
23static struct irq_2_iommu *irq_2_iommu;
24DEFINE_DYN_ARRAY(irq_2_iommu, sizeof(struct irq_2_iommu), nr_irqs, PAGE_SIZE, NULL);
25#else
26static struct irq_2_iommu irq_2_iommu[NR_IRQS];
27#endif
20 28
21static DEFINE_SPINLOCK(irq_2_ir_lock); 29static DEFINE_SPINLOCK(irq_2_ir_lock);
22 30