ACPI/IORT: Fix build without CONFIG_IOMMU_API
Subsystems (2)
PATCH 1/1 ACPI/IORT: Fix build without CONFIG_IOMMU_API
IOMMU_FWSPEC_PCI_RC_ATS is only defined if CONFIG_IOMMU_API is enabled.
Fixes 5702ee24182f ("ACPI/IORT: Check ATS capability in root complex nodes")
Signed-off-by Christoph Hellwig <[email protected]>
--- drivers/acpi/arm64/iort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/arm64/iort.c +2 -1
@@ -1074,9 +1074,10 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) info.node = node; err =pci_for_each_dma_alias (to_pci_dev (dev), iort_pci_iommu_init, &info); - +#ifdef CONFIG_IOMMU_API if (!err &&iort_pci_rc_supports_ats (node)) dev->iommu_fwspec->flags |=IOMMU_FWSPEC_PCI_RC_ATS ; +#endif }else {int i =0 ;
Signature · 1 line
2.20.1
Hanjun Guo
maintainerQuoted 14 lines · Christoph Hellwig
IOMMU_FWSPEC_PCI_RC_ATSis only defined ifCONFIG_IOMMU_APIis enabled.Fixes 5702ee24182f ("ACPI/IORT: Check ATS capability in root complex nodes")Signed-off-by Christoph Hellwig <[email protected]>--- drivers/acpi/arm64/iort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/acpi/arm64/iort.c +0
-0
drivers/acpi/arm64/iort.c const struct iommu_ops *iort_iommu_configure(struct device *dev) · line 1082
Quoted 10 lines
drivers/acpi/arm64/iort.c +2
-1@@ -1074,9 +1074,10 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) info.node = node; err =pci_for_each_dma_alias (to_pci_dev (dev), iort_pci_iommu_init, &info); - +#ifdef CONFIG_IOMMU_API if (!err &&iort_pci_rc_supports_ats (node)) dev->iommu_fwspec->flags |=IOMMU_FWSPEC_PCI_RC_ATS ; +#endif }else {int i =0 ;
This was reported, please refer to this patch from Lorenzo:
https://patchwork.kernel.org/patch/10946845/
Thanks
Hanjun
Hi Christoph,
Quoted 14 lines · Christoph Hellwig
IOMMU_FWSPEC_PCI_RC_ATSis only defined ifCONFIG_IOMMU_APIis enabled.Fixes 5702ee24182f ("ACPI/IORT: Check ATS capability in root complex nodes")Signed-off-by Christoph Hellwig <[email protected]>--- drivers/acpi/arm64/iort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/acpi/arm64/iort.c +0
-0
drivers/acpi/arm64/iort.c const struct iommu_ops *iort_iommu_configure(struct device *dev) · line 1080
Quoted 8 lines
drivers/acpi/arm64/iort.c +2
-1@@ -1074,9 +1074,10 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) info.node = node; err =pci_for_each_dma_alias (to_pci_dev (dev), iort_pci_iommu_init, &info); - +#ifdef CONFIG_IOMMU_API if (!err &&iort_pci_rc_supports_ats (node)) dev->iommu_fwspec->flags |=IOMMU_FWSPEC_PCI_RC_ATS ; +#endif
Cheers, although there's an alternative fix from Lorenzo that I'll send up for -rc2.
Sorry for the delay; been having email issues this week.
Will