public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH dma-mapping tree] arm64: default to the direct mapping in get_arch_dma_ops
@ 2018-12-14 15:02 Christoph Hellwig
       [not found] ` <20181214150240.26427-1-hch-jcswGhMUV9g@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2018-12-14 15:02 UTC (permalink / raw)
  To: robin.murphy-5wv7dgnIgG8, catalin.marinas-5wv7dgnIgG8,
	will.deacon-5wv7dgnIgG8
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Otherwise the direct mapping won't work at all given that a NULL
dev->dma_ops causes a fallback.  Note that we already explicitly set
dev->dma_ops to dma_dummy_ops for dma-incapable devices, so this
fallback should not be needed anyway.

Fixes: 356da6d0cd ("dma-mapping: bypass indirect calls for dma-direct")
Signed-off-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Reported-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Tested-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 arch/arm64/include/asm/dma-mapping.h | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index 273e778f7de2..95dbf3ef735a 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -26,11 +26,7 @@
 
 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 &dma_dummy_ops;
+	return NULL;
 }
 
 void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
-- 
2.19.2

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

end of thread, other threads:[~2018-12-28 22:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-14 15:02 [PATCH dma-mapping tree] arm64: default to the direct mapping in get_arch_dma_ops Christoph Hellwig
     [not found] ` <20181214150240.26427-1-hch-jcswGhMUV9g@public.gmane.org>
2018-12-19 16:55   ` Christoph Hellwig
2018-12-28 17:30     ` Liviu Dudau
     [not found]       ` <20181228173057.GA20342-hOhETlTuV5niMG9XS5x8Mg@public.gmane.org>
2018-12-28 17:59         ` Christoph Hellwig
     [not found]           ` <20181228175900.GB16929-jcswGhMUV9g@public.gmane.org>
2018-12-28 22:05             ` Liviu Dudau
2018-12-19 16:59   ` Robin Murphy
     [not found]     ` <3a6c8eff-a5dd-6a17-71ed-f480df3801d8-5wv7dgnIgG8@public.gmane.org>
2018-12-19 17:00       ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox