Skip to content

Commit

Permalink
[PATCH] x86_64: Fix swiotlb dma_alloc_coherent fallback
Browse files Browse the repository at this point in the history
This avoids BUG_ONs in the low level allocator when an illegal
GFP mask is added.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Feb 5, 2006
1 parent 0dd2ea9 commit 6bca52b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86_64/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6bca52b

Please sign in to comment.