s390/dma: provide proper ARCH_ZONE_DMA_BITS value
PATCH v2 1/1 s390/dma: provide proper ARCH_ZONE_DMA_BITS value
On s390 ZONE_DMA is up to 2G, i.e. ARCH_ZONE_DMA_BITS should be 31 bits. The current value is 24 and makes __dma_direct_alloc_pages() take a wrong turn first (but __dma_direct_alloc_pages() recovers then).
Let's correct ARCH_ZONE_DMA_BITS value and avoid wrong turns.
Signed-off-by Halil Pasic <[email protected]>
Reported-by Petr Tesarik <[email protected]>
Fixes c61e9637340e ("dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32")
--- arch/s390/include/asm/page.h | 2 ++ 1 file changed, 2 insertions(+)
arch/s390/include/asm/page.h +2 -0
@@ -177,6 +177,8 @@ static inline int devmem_is_allowed(unsigned long pfn)#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) +#define ARCH_ZONE_DMA_BITS 31 +#include <asm-generic/memory_model.h> #include <asm-generic/getorder.h>
Signature · 1 line
2.17.1
Heiko Carstens
AppliedQuoted 4 lines · Halil Pasic
On s390
ZONE_DMAis up to 2G, i.e.ARCH_ZONE_DMA_BITSshould be 31 bits. The current value is 24 and makes__dma_direct_alloc_pages()take a wrong turn first (but__dma_direct_alloc_pages()recovers then).
Quoted 8 lines
Let's correct
ARCH_ZONE_DMA_BITSvalue and avoid wrong turns.Signed-off-by Halil Pasic <[email protected]>Reported-by Petr Tesarik <[email protected]>Fixes c61e9637340e ("dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32")--- arch/s390/include/asm/page.h | 2 ++ 1 file changed, 2 insertions(+)
Applied, thanks!