diff options
author | Robin Murphy <robin.murphy@arm.com> | 2016-04-19 17:01:31 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-04-21 17:34:34 +0100 |
commit | 226d89cbb242f3fbd3e93367dfd5138f524aae5c (patch) | |
tree | a4ee658b385fe93057867a11ab0c30b67a646c87 /arch | |
parent | 643d703d2d2dbf8e2f16efa0a6a32b1eca101d02 (diff) | |
download | linux-226d89cbb242f3fbd3e93367dfd5138f524aae5c.tar.gz linux-226d89cbb242f3fbd3e93367dfd5138f524aae5c.tar.bz2 linux-226d89cbb242f3fbd3e93367dfd5138f524aae5c.zip |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/mm/dma-mapping.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index a6e757cbab77..607e70911173 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -933,6 +933,10 @@ static int __init __iommu_dma_init(void) ret = register_iommu_dma_ops_notifier(&platform_bus_type); if (!ret) ret = register_iommu_dma_ops_notifier(&amba_bustype); +#ifdef CONFIG_PCI + if (!ret) + ret = register_iommu_dma_ops_notifier(&pci_bus_type); +#endif /* handle devices queued before this arch_initcall */ if (!ret) |