aboutsummaryrefslogtreecommitdiff
path: root/sound/core/memalloc.c
diff options
context:
space:
mode:
authorJody McIntyre <scjody@modernduck.com>2005-11-28 17:46:32 -0500
committerJody McIntyre <scjody@modernduck.com>2005-11-28 17:46:32 -0500
commita880b11a95fab4618da412d99fc7365d723e702d (patch)
tree10839a82741b7154067adfff425dadef3caf4163 /sound/core/memalloc.c
parent899a1fc084ef3dcb57737d8847bf219cbf353ed3 (diff)
parent458af5439fe7ae7d95ca14106844e61f0795166c (diff)
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'sound/core/memalloc.c')
-rw-r--r--sound/core/memalloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 129abab5ce9..e4b8959dd4b 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -197,6 +197,7 @@ void *snd_malloc_pages(size_t size, gfp_t gfp_flags)
snd_assert(size > 0, return NULL);
snd_assert(gfp_flags != 0, return NULL);
+ gfp_flags |= __GFP_COMP; /* compound page lets parts be mapped */
pg = get_order(size);
if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL) {
mark_pages(virt_to_page(res), pg);
@@ -241,6 +242,7 @@ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *d
snd_assert(dma != NULL, return NULL);
pg = get_order(size);
gfp_flags = GFP_KERNEL
+ | __GFP_COMP /* compound page lets parts be mapped */
| __GFP_NORETRY /* don't trigger OOM-killer */
| __GFP_NOWARN; /* no stack trace print - this call is non-critical */
res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags);