iommu/amd: Allocate data structures to keep track of irq remapping tables
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / iommu / amd_iommu_types.h
index 953cea8..1a7d480 100644 (file)
 #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;