From 8f19ca1341a6d89bd96e2e69e6e10f46d3258089 Mon Sep 17 00:00:00 2001 From: Glauber Costa <gcosta@redhat.com> Date: Wed, 9 Apr 2008 13:18:06 -0300 Subject: x86: unify gfp masks Use the same gfp masks for x86_64 and i386. It involves using HIGHMEM or DMA32 where necessary, for the sake of code compatibility, (no real effect), and using the NORETRY mask for i386. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- arch/x86/kernel/pci-dma_64.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/x86/kernel/pci-dma_64.c') diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c index 13a31a4a4c1..b956f5945d6 100644 --- a/arch/x86/kernel/pci-dma_64.c +++ b/arch/x86/kernel/pci-dma_64.c @@ -49,6 +49,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, unsigned long dma_mask = 0; u64 bus; + /* ignore region specifiers */ + gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); if (dma_alloc_from_coherent_mem(dev, size, dma_handle, &memory)) return memory; -- cgit v1.2.3-70-g09d2