lkml.org 
[lkml]   [2008]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] swiotlb: use GFP_DMA32 instead of GFP_DMA in swiotlb_alloc_coherent
Date
x86 sets up gfp flag propely so swiotlb_alloc_coherent doesn't need to
use GFP_DMA unconditionally. It leads to allocation failures in some
systems.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
lib/swiotlb.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 977edbd..b88d7c2 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -467,12 +467,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
void *ret;
int order = get_order(size);

- /*
- * XXX fix me: the DMA API should pass us an explicit DMA mask
- * instead, or use ZONE_DMA32 (ia64 overloads ZONE_DMA to be a ~32
- * bit range instead of a 16MB one).
- */
- flags |= GFP_DMA;
+ flags |= GFP_DMA32;

ret = (void *)__get_free_pages(flags, order);
if (ret && address_needs_mapping(hwdev, virt_to_bus(ret))) {
--
1.5.5.GIT


\
 
 \ /
  Last update: 2008-09-03 20:23    [from the cache]
©2003-2011 Jasper Spaans