AMD/IOMMU: adjust IOMMU list head initialization
authorJan Beulich <jbeulich@suse.com>
Fri, 17 May 2019 12:43:43 +0000 (14:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 May 2019 12:43:43 +0000 (14:43 +0200)
Do this statically, which will allow accessing the (empty) list even
without having come through acpi_ivrs_init().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/pci_amd_iommu.c

index e4b267ea61b69b934c22dffd685e1fa02cfaae51..72ea8824b0cb46089932ef062ce1866e9f6a3d46 100644 (file)
@@ -36,7 +36,7 @@ static struct tasklet amd_iommu_irq_tasklet;
 unsigned int __read_mostly ivrs_bdf_entries;
 u8 __read_mostly ivhd_type;
 static struct radix_tree_root ivrs_maps;
-struct list_head amd_iommu_head;
+LIST_HEAD_READ_MOSTLY(amd_iommu_head);
 struct table_struct device_table;
 bool_t iommuv2_enabled;
 
index dbc71ca7d5892d35bc858c014d4a4cf764a97d23..6ddeb790a0f17c4b88177ab750ace9598cd7c623 100644 (file)
@@ -150,8 +150,6 @@ static void amd_iommu_setup_domain_device(
 
 int __init acpi_ivrs_init(void)
 {
-    INIT_LIST_HEAD(&amd_iommu_head);
-
     if ( !iommu_enable && !iommu_intremap )
         return 0;