]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arch/x86/kernel/pci-dma.c: fix dma_generic_alloc_coherent() when CONFIG_DMA_CMA is...
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 22 May 2014 00:42:47 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:42:47 +0000 (10:42 +1000)
commitbd6c6a2ad055358fad5a05c455269caaa1a921ad
treea1e9a25c39274057030ec4daaa1404aad141921c
parent36c9ad433971465387f92c0c94b6b4b5b73b2025
arch/x86/kernel/pci-dma.c: fix dma_generic_alloc_coherent() when CONFIG_DMA_CMA is enabled

dma_generic_alloc_coherent() firstly attempts to allocate by
dma_alloc_from_contiguous() if CONFIG_DMA_CMA is enabled.  But the memory
region allocated by it may not fit within the device's DMA mask.  This
change makes it fall back to usual alloc_pages_node() allocation for such
cases.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Don Dutile <ddutile@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/pci-dma.c