WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen/x86: fix GFP mask handling in dma_alloc_coherent()
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Oct 2009 02:40:22 -0700
Delivery-date: Fri, 23 Oct 2009 02:41:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen/x86: fix GFP mask handling in dma_alloc_coherent(), Xen patchbot-linux-2.6.18-xen <=