From: Andi Kleen Date: Fri, 3 Feb 2006 20:50:59 +0000 (+0100) Subject: [PATCH] x86_64: Fix swiotlb dma_alloc_coherent fallback X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bca52b544489b626c7d0db801df6b4aa3d5adb5;hp=0dd2ea9af8f0eca43cf6200baa182b3aba307049;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] x86_64: Fix swiotlb dma_alloc_coherent fallback This avoids BUG_ONs in the low level allocator when an illegal GFP mask is added. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 2f5d8328e2b9..4ed391edd47a 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c @@ -107,6 +107,9 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, goto again; } + /* Let low level make its own zone decisions */ + gfp &= ~(GFP_DMA32|GFP_DMA); + if (dma_ops->alloc_coherent) return dma_ops->alloc_coherent(dev, size, dma_handle, gfp);