aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrew Murray <amurray@mpc-data.co.uk>2010-08-04 03:38:35 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-08-04 03:38:35 -0400
commit57682827b9a5edb52e33af0be9082b51bffcd5c7 (patch)
tree6d0b513f0a72896dd1a33ebf8dda9018ebd50298 /arch
parent82b20d8bae03406e954d8b7d0f6f734967088b17 (diff)
sh: Use __GFP_ZERO for dma_generic_alloc_coherent().
This follows the x86 change off of memset() and on to an unconditional __GFP_ZERO for wrapping in to optimized page clearing by way of clear_highpage(). Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/mm/consistent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index c86a08540258..038793286990 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -38,11 +38,12 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
38 void *ret, *ret_nocache; 38 void *ret, *ret_nocache;
39 int order = get_order(size); 39 int order = get_order(size);
40 40
41 gfp |= __GFP_ZERO;
42
41 ret = (void *)__get_free_pages(gfp, order); 43 ret = (void *)__get_free_pages(gfp, order);
42 if (!ret) 44 if (!ret)
43 return NULL; 45 return NULL;
44 46
45 memset(ret, 0, size);
46 /* 47 /*
47 * Pages from the page allocator may have data present in 48 * Pages from the page allocator may have data present in
48 * cache. So flush the cache before using uncached memory. 49 * cache. So flush the cache before using uncached memory.