]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: use the generic dma coherent remap allocator
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Aug 2019 13:22:30 +0000 (15:22 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Aug 2019 13:19:34 +0000 (23:19 +1000)
commit5618f4b0962c77f714a27664a565afe60657d0ac
tree950d047295b7ddb64ca2edcdeff04b222ab91aef
parent0b7b101d95beb14f09f024828686fb5eb2412f89
powerpc: 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.

Another advantage is that consistent memory allocations now share
the general vmalloc pool instead of needing an explicit careout
from it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Christophe Leroy <christophe.leroy@c-s.fr> # tested on 8xx
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190814132230.31874-2-hch@lst.de
arch/powerpc/Kconfig
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/include/asm/nohash/32/pgtable.h
arch/powerpc/mm/dma-noncoherent.c
arch/powerpc/mm/mem.c
arch/powerpc/mm/ptdump/ptdump.c
arch/powerpc/platforms/Kconfig.cputype