diff mbox series

AMD/IOMMU: adjust IOMMU list head initialization

Message ID 5CADB95A0200007800226174@prv1-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show
Series AMD/IOMMU: adjust IOMMU list head initialization | expand

Commit Message

Jan Beulich April 10, 2019, 9:37 a.m. UTC
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>

Comments

Andrew Cooper April 10, 2019, 10:12 a.m. UTC | #1
On 10/04/2019 10:37, Jan Beulich wrote:
> 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>
Jan Beulich May 2, 2019, 2:50 p.m. UTC | #2
>>> On 10.04.19 at 11:37, <JBeulich@suse.com> wrote:
> 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>
> 
> --- a/xen/drivers/passthrough/amd/iommu_init.c
> +++ b/xen/drivers/passthrough/amd/iommu_init.c
> @@ -36,7 +36,7 @@ static struct tasklet amd_iommu_irq_task
>  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;
>  
> --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
> +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
> @@ -150,8 +150,6 @@ static void amd_iommu_setup_domain_devic
>  
>  int __init acpi_ivrs_init(void)
>  {
> -    INIT_LIST_HEAD(&amd_iommu_head);
> -
>      if ( !iommu_enable && !iommu_intremap )
>          return 0;
>  
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org 
> https://lists.xenproject.org/mailman/listinfo/xen-devel
Jan Beulich May 16, 2019, 11:53 a.m. UTC | #3
>>> On 10.04.19 at 12:12, <andrew.cooper3@citrix.com> wrote:
> On 10/04/2019 10:37, Jan Beulich wrote:
>> 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>

So just like done a minute ago for "AMD/IOMMU: don't open-code
for_each_amd_iommu()" I intend to commit this trivial patch in a
day or two without maintainer ack, unless I hear back otherwise.

Jan
diff mbox series

Patch

--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -36,7 +36,7 @@  static struct tasklet amd_iommu_irq_task
 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;
 
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -150,8 +150,6 @@  static void amd_iommu_setup_domain_devic
 
 int __init acpi_ivrs_init(void)
 {
-    INIT_LIST_HEAD(&amd_iommu_head);
-
     if ( !iommu_enable && !iommu_intremap )
         return 0;