summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/kernel/ioport.c2
-rw-r--r--arch/sparc64/kernel/sbus.c2
-rw-r--r--sound/core/memalloc.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index d0f2bd2..d39c9f2 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -252,7 +252,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp)
}
order = get_order(len_total);
- if ((va = __get_free_pages(GFP_KERNEL, order)) == 0)
+ if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0)
goto err_nopages;
if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL)
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index 96b8250..d95a1bc 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -327,7 +327,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, size_t size, dma_addr_t *dvma
order = get_order(size);
if (order >= 10)
return NULL;
- first_page = __get_free_pages(GFP_KERNEL, order);
+ first_page = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
if (first_page == 0UL)
return NULL;
memset((char *)first_page, 0, PAGE_SIZE << order);
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 129abab..e4b8959 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);
OpenPOWER on IntegriCloud