Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ACPI/IORT: Fix build without CONFIG_IOMMU_API
@ 2019-05-20  6:57 Christoph Hellwig
  2019-05-20 10:34 ` Hanjun Guo
  2019-05-22 12:54 ` Will Deacon
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2019-05-20  6:57 UTC (permalink / raw)
  To: will.deacon
  Cc: jean-philippe.brucker, linux-acpi, lorenzo.pieralisi,
	linux-kernel, linux-arm-kernel

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 <hch@lst.de>
---
 drivers/acpi/arm64/iort.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 9058cb084b91..3e542b5d2a2d 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -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;
 
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI/IORT: Fix build without CONFIG_IOMMU_API
  2019-05-20  6:57 [PATCH] ACPI/IORT: Fix build without CONFIG_IOMMU_API Christoph Hellwig
@ 2019-05-20 10:34 ` Hanjun Guo
  2019-05-22 12:54 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Hanjun Guo @ 2019-05-20 10:34 UTC (permalink / raw)
  To: Christoph Hellwig, will.deacon
  Cc: jean-philippe.brucker, linux-acpi, lorenzo.pieralisi,
	linux-kernel, linux-arm-kernel

On 2019/5/20 14:57, Christoph Hellwig wrote:
> 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 <hch@lst.de>
> ---
>  drivers/acpi/arm64/iort.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index 9058cb084b91..3e542b5d2a2d 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI/IORT: Fix build without CONFIG_IOMMU_API
  2019-05-20  6:57 [PATCH] ACPI/IORT: Fix build without CONFIG_IOMMU_API Christoph Hellwig
  2019-05-20 10:34 ` Hanjun Guo
@ 2019-05-22 12:54 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2019-05-22 12:54 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: jean-philippe.brucker, linux-acpi, lorenzo.pieralisi,
	linux-kernel, linux-arm-kernel

Hi Christoph,

On Mon, May 20, 2019 at 08:57:46AM +0200, Christoph Hellwig wrote:
> 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 <hch@lst.de>
> ---
>  drivers/acpi/arm64/iort.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index 9058cb084b91..3e542b5d2a2d 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20  6:57 [PATCH] ACPI/IORT: Fix build without CONFIG_IOMMU_API Christoph Hellwig
2019-05-20 10:34 ` Hanjun Guo
2019-05-22 12:54 ` Will Deacon

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox