From 0ea2c422bc8da99d14baa46d4789861a4f8d4ec0 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Fri, 15 Jun 2012 18:05:20 +0200 Subject: iommu/amd: Allocate data structures to keep track of irq remapping tables To easily map device ids to interrupt remapping table entries a new lookup table is necessary. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu_types.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/iommu/amd_iommu_types.h') diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h index 953cea8..1a7d480 100644 --- a/drivers/iommu/amd_iommu_types.h +++ b/drivers/iommu/amd_iommu_types.h @@ -175,6 +175,7 @@ #define DEV_ENTRY_EX 0x67 #define DEV_ENTRY_SYSMGT1 0x68 #define DEV_ENTRY_SYSMGT2 0x69 +#define DEV_ENTRY_IRQ_TBL_EN 0x80 #define DEV_ENTRY_INIT_PASS 0xb8 #define DEV_ENTRY_EINT_PASS 0xb9 #define DEV_ENTRY_NMI_PASS 0xba @@ -337,6 +338,14 @@ extern bool amd_iommu_iotlb_sup; #define MAX_IRQS_PER_TABLE 256 #define IRQ_TABLE_ALIGNMENT 128 +struct irq_remap_table { + spinlock_t lock; + unsigned min_index; + u32 *table; +}; + +extern struct irq_remap_table **irq_lookup_table; + /* Interrupt remapping feature used? */ extern bool amd_iommu_irq_remap; -- cgit v1.1