Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM/dma-mapping: take the bus limit into account in __dma_alloc

The DMA coherent allocator needs to take bus limits into account for
picking the zone that the memory is allocated from.

Reported-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Roger Quadros <rogerq@ti.com>

+1 -1
+1 -1
arch/arm/mm/dma-mapping.c
··· 658 658 gfp_t gfp, pgprot_t prot, bool is_coherent, 659 659 unsigned long attrs, const void *caller) 660 660 { 661 - u64 mask = dev->coherent_dma_mask; 661 + u64 mask = min_not_zero(dev->coherent_dma_mask, dev->bus_dma_limit); 662 662 struct page *page = NULL; 663 663 void *addr; 664 664 bool allowblock, cma;