diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-04-09 18:18:06 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 19:19:58 +0200 |
commit | 8f19ca1341a6d89bd96e2e69e6e10f46d3258089 (patch) | |
tree | 89ba0c6d2d87798bdfa2753e57f71507f4370caa /arch/x86/kernel/pci-dma_32.c | |
parent | x86: retry allocation if failed (diff) | |
download | linux-8f19ca1341a6d89bd96e2e69e6e10f46d3258089.tar.xz linux-8f19ca1341a6d89bd96e2e69e6e10f46d3258089.zip |
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>
Diffstat (limited to 'arch/x86/kernel/pci-dma_32.c')
-rw-r--r-- | arch/x86/kernel/pci-dma_32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c index 11f100a5f034..5450bd142cb0 100644 --- a/arch/x86/kernel/pci-dma_32.c +++ b/arch/x86/kernel/pci-dma_32.c @@ -79,7 +79,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size, unsigned long dma_mask = 0; /* ignore region specifiers */ - gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); + gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); if (dma_alloc_from_coherent_mem(dev, size, dma_handle, &ret)) return ret; @@ -91,7 +91,9 @@ void *dma_alloc_coherent(struct device *dev, size_t size, if (dma_mask == 0) dma_mask = DMA_32BIT_MASK; - again: + /* Don't invoke OOM killer */ + gfp |= __GFP_NORETRY; +again: page = dma_alloc_pages(dev, gfp, order); if (page == NULL) return NULL; |