struct amd_iommu **amd_iommu_rlookup_table;
/*
+ * This table is used to find the irq remapping table for a given device id
+ * quickly.
+ */
+struct irq_remap_table **irq_lookup_table;
+
+/*
* AMD IOMMU allows up to 2^16 differend protection domains. This is a bitmap
* to know which ones are already in use.
*/
static void __init free_on_init_error(void)
{
+ free_pages((unsigned long)irq_lookup_table,
+ get_order(rlookup_table_size));
+
if (amd_iommu_irq_cache) {
kmem_cache_destroy(amd_iommu_irq_cache);
amd_iommu_irq_cache = NULL;
+
}
amd_iommu_uninit_devices();
0, NULL);
if (!amd_iommu_irq_cache)
goto out;
+
+ irq_lookup_table = (void *)__get_free_pages(
+ GFP_KERNEL | __GFP_ZERO,
+ get_order(rlookup_table_size));
+ if (!irq_lookup_table)
+ goto out;
}
ret = init_memory_definitions(ivrs_base);