]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: emu10k1 - Fix page allocation with GFP_DMA
authorTakashi Iwai <tiwai@suse.de>
Tue, 10 Jun 2008 10:34:45 +0000 (12:34 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 13 Jun 2008 14:29:38 +0000 (16:29 +0200)
Added the missing GFP_ATOMIC to page_alloc when called with GFP_DMA.
GFP_KERNEL often results in stalls for ZONE_DMA, so GFP_ATOMIC is more
prgmatic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/emu10k1/memory.c

index 128eaca17a61aed8c57922917444b74418d8618c..42943b4fcb7b675d4db0446768ac47221c818975 100644 (file)
@@ -466,7 +466,7 @@ static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk
                                            __GFP_NOWARN);
                if (!p || (page_to_pfn(p) & ~(emu->dma_mask >> PAGE_SHIFT)))
                        /* try to allocate from <16MB zone */
-                       p = alloc_page(GFP_DMA |
+                       p = alloc_page(GFP_ATOMIC | GFP_DMA |
                                       __GFP_NORETRY | /* no OOM-killer */
                                       __GFP_NOWARN);
                if (!p) {