All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] ACPI/IORT: Let pci_fixup_final access iommu_fwnode
@ 2019-03-27 13:26 Zhangfei Gao
  2019-04-02 11:20 ` zhangfei
  0 siblings, 1 reply; 2+ messages in thread
From: Zhangfei Gao @ 2019-03-27 13:26 UTC (permalink / raw)
  To: Jean-Philippe Brucker, Will Deacon, Hanjun Guo,
	Charles Garcia-Tobin, kenneth-lee-2012, Wangzhou, guodong.xu
  Cc: Zhangfei Gao, linux-arm-kernel

Using quirks to access dev->iommu_fwnode is required for those
devices appear as PCI but are actually on the AMBA bus.
dev->iommu_fwnode is allocated in iommu_fwspec_init, while it
is too late for pci_fixup_final in drivers/pci/quirks.c
So iort call pci_fixup_final after iommu_fwspec_init.

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 drivers/acpi/arm64/iort.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index e48894e..39d7212 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1063,6 +1063,7 @@ 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);
+		pci_fixup_device(pci_fixup_final, to_pci_dev(dev));
 	} else {
 		int i = 0;
 
-- 
1.9.1


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

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

* Re: [RFC PATCH] ACPI/IORT: Let pci_fixup_final access iommu_fwnode
  2019-03-27 13:26 [RFC PATCH] ACPI/IORT: Let pci_fixup_final access iommu_fwnode Zhangfei Gao
@ 2019-04-02 11:20 ` zhangfei
  0 siblings, 0 replies; 2+ messages in thread
From: zhangfei @ 2019-04-02 11:20 UTC (permalink / raw)
  To: Jean-Philippe Brucker, Will Deacon, Hanjun Guo,
	Charles Garcia-Tobin, kenneth-lee-2012, Wangzhou, guodong.xu,
	joro, Arnd Bergmann
  Cc: linux-arm-kernel


On 2019/3/27 下午8:26, Zhangfei Gao wrote:
> Using quirks to access dev->iommu_fwnode is required for those
> devices appear as PCI but are actually on the AMBA bus.
> dev->iommu_fwnode is allocated in iommu_fwspec_init, while it
> is too late for pci_fixup_final in drivers/pci/quirks.c
> So iort call pci_fixup_final after iommu_fwspec_init.
>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
> ---
>   drivers/acpi/arm64/iort.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
> index e48894e..39d7212 100644
> --- a/drivers/acpi/arm64/iort.c
> +++ b/drivers/acpi/arm64/iort.c
> @@ -1063,6 +1063,7 @@ 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);
> +		pci_fixup_device(pci_fixup_final, to_pci_dev(dev));
>   	} else {
>   		int i = 0;
>   
Thanks for any suggestion.

_______________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2019-04-02 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 13:26 [RFC PATCH] ACPI/IORT: Let pci_fixup_final access iommu_fwnode Zhangfei Gao
2019-04-02 11:20 ` zhangfei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.