[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] xen/x86: fix GFP mask handling in dma_alloc_coherent()



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1256288842 -3600
# Node ID 6301ebc85480dd54e520bd0e48c75c2b5640e2c6
# Parent  b4dc4f05c425951e5fa6456292f8ef329d34c3c9
xen/x86: fix GFP mask handling in dma_alloc_coherent()

Ever since no longer pushing all memory into the DMA zone (c/s 355),
explicitly setting GFP_DMA as well as not masking off GFP_DMA32 was
unnecessarily restricting the pool from which suitable memory could be
taken.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/kernel/pci-dma-xen.c |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)

diff -r b4dc4f05c425 -r 6301ebc85480 arch/i386/kernel/pci-dma-xen.c
--- a/arch/i386/kernel/pci-dma-xen.c    Fri Oct 23 10:06:48 2009 +0100
+++ b/arch/i386/kernel/pci-dma-xen.c    Fri Oct 23 10:07:22 2009 +0100
@@ -218,7 +218,7 @@ void *dma_alloc_coherent(struct device *
        u64 mask;
 
        /* ignore region specifiers */
-       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
+       gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
 
        if (mem) {
                int page = bitmap_find_free_region(mem->bitmap, mem->size,
@@ -233,9 +233,6 @@ void *dma_alloc_coherent(struct device *
                        return NULL;
        }
 
-       if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
-               gfp |= GFP_DMA;
-
        vstart = __get_free_pages(gfp, order);
        ret = (void *)vstart;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.