summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2018-12-06 13:14:44 -0800
committerChristoph Hellwig <hch@lst.de>2018-12-13 21:06:12 +0100
commit90ac706e98fcb24fb0b0a259558987f33cc2f0f6 (patch)
tree3295030b39722a290ad409da73f28f223e9786f2 /arch/arm64/include/asm/dma-mapping.h
parent3731c3d4774e38b9d91c01943e1e6a243c1776be (diff)
downloadlinux-90ac706e98fcb24fb0b0a259558987f33cc2f0f6.tar.bz2
dma-mapping: factor out dummy DMA ops
The dummy DMA ops are currently used by arm64 for any device which has an invalid ACPI description and is thus barred from using DMA due to not knowing whether is is cache-coherent or not. Factor these out into general dma-mapping code so that they can be referenced from other common code paths. In the process, we can prune all the optional callbacks which just do the same thing as the default behaviour, and fill in .map_resource for completeness. Signed-off-by: Robin Murphy <robin.murphy@arm.com> [hch: moved to a separate source file] Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/arm64/include/asm/dma-mapping.h')
-rw-r--r--arch/arm64/include/asm/dma-mapping.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index c41f3fb1446c..273e778f7de2 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -24,15 +24,13 @@
#include <xen/xen.h>
#include <asm/xen/hypervisor.h>
-extern const struct dma_map_ops dummy_dma_ops;
-
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
{
/*
* We expect no ISA devices, and all other DMA masters are expected to
* have someone call arch_setup_dma_ops at device creation time.
*/
- return &dummy_dma_ops;
+ return &dma_dummy_ops;
}
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,