|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] linux/x86: fix GFP mask handling in dma_alloc_cohere
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>
--- sle10sp3-2009-10-19.orig/arch/i386/kernel/pci-dma-xen.c 2009-06-22
11:20:42.000000000 +0200
+++ sle10sp3-2009-10-19/arch/i386/kernel/pci-dma-xen.c 2009-10-22
12:32:19.000000000 +0200
@@ -198,7 +198,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,
@@ -213,9 +213,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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] linux/x86: fix GFP mask handling in dma_alloc_coherent(),
Jan Beulich <=
|
|
|
|
|