Skip to content

Commit 226d89c

Browse files
rmurphy-armwildea01
authored andcommitted
arm64/dma-mapping: Extend DMA ops workaround to PCI devices
PCI devices now suffer the same hiccup as platform devices, in that they get their DMA ops configured before they have been added to their bus, and thus before we know whether they have successfully registered with an IOMMU or not. Until the necessary driver core changes to reorder calls during device creation have been worked out, extend our delayed notifier trick onto the PCI bus so as to avoid broken DMA ops once IOMMUs get plugged into the PCI code. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 643d703 commit 226d89c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/mm/dma-mapping.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,10 @@ static int __init __iommu_dma_init(void)
933933
ret = register_iommu_dma_ops_notifier(&platform_bus_type);
934934
if (!ret)
935935
ret = register_iommu_dma_ops_notifier(&amba_bustype);
936+
#ifdef CONFIG_PCI
937+
if (!ret)
938+
ret = register_iommu_dma_ops_notifier(&pci_bus_type);
939+
#endif
936940

937941
/* handle devices queued before this arch_initcall */
938942
if (!ret)

0 commit comments

Comments
 (0)