Message ID | 1553693165-7105-1-git-send-email-zhangfei.gao@linaro.org (mailing list archive) |
---|---|
State | RFC |
Headers | show |
Series | [RFC] ACPI/IORT: Let pci_fixup_final access iommu_fwnode | expand |
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.
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;
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(+)