Skip to content

Commit

Permalink
irq: make irq2_iommu to use dyn_array
Browse files Browse the repository at this point in the history
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Oct 16, 2008
1 parent eef1de7 commit 5aeecaf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/pci/intr_remapping.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <linux/interrupt.h>
#include <linux/dmar.h>
#include <linux/spinlock.h>
#include <linux/jiffies.h>
Expand All @@ -11,12 +12,19 @@ static struct ioapic_scope ir_ioapic[MAX_IO_APICS];
static int ir_ioapic_num;
int intr_remapping_enabled;

static struct {
struct irq_2_iommu {
struct intel_iommu *iommu;
u16 irte_index;
u16 sub_handle;
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);

Expand Down

0 comments on commit 5aeecaf

Please sign in to comment.