convert sh to the generic dma remap allocator
Hi Rich and Yoshinori,
can you take a quick look at this patch that moves sh over to the generic DMA remap allocator? I've been trying to slowly get all architectures over to the generic code, and I'd like merge this one for 5.4 now that it has been posted a handful of times without any feedback.
PATCH 1/1 sh: use the generic dma coherent remap allocator
This switches to using common code for the DMA allocations, including potential use of the CMA allocator if configured.
Switching to the generic code enables DMA allocations from atomic context, which is required by the DMA API documentation, and also adds various other minor features drivers start relying upon. It also makes sure we have on tested code base for all architectures that require uncached pte bits for coherent DMA allocations.
--- arch/sh/Kconfig | 2 ++ arch/sh/kernel/dma-coherent.c | 57 +++++------------------------------ 2 files changed, 10 insertions(+), 49 deletions(-)
arch/sh/Kconfig +2 -0
@@ -158,7 +158,9 @@ config DMA_COHERENT config DMA_NONCOHERENT def_bool !DMA_COHERENT + select ARCH_HAS_DMA_PREP_COHERENT select ARCH_HAS_SYNC_DMA_FOR_DEVICE + select DMA_DIRECT_REMAP config PGTABLE_LEVELS default 3 if X2TLB
arch/sh/kernel/dma-coherent.c +8 -49
71 lines not on this page · raw message
Signature · 1 line
2.20.1