From: Takashi Iwai Date: Tue, 24 Jan 2006 22:30:56 +0000 (-0800) Subject: [IA64-SGI] sn_dma_alloc_coherent should use gfp flags X-Git-Tag: v2.6.16-rc2~241^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc64161343015162a3fabfcd20b9b84409af67d5;p=linux-2.6 [IA64-SGI] sn_dma_alloc_coherent should use gfp flags Takashi helped us track down a bad page state bug we thought was coming from alsa. It turns out we weren't paying attention to the gfp flags that were passed in to sn_dma_alloc_coherent(). From: Takashi Iwai Signed-off-by: Greg Edwards Signed-off-by: Mark Maule Signed-off-by: Jes Sorensen --- diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 9bf9f23b9a..5a36292388 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c @@ -90,14 +90,14 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size, */ node = pcibus_to_node(pdev->bus); if (likely(node >=0)) { - struct page *p = alloc_pages_node(node, GFP_ATOMIC, get_order(size)); + struct page *p = alloc_pages_node(node, flags, get_order(size)); if (likely(p)) cpuaddr = page_address(p); else return NULL; } else - cpuaddr = (void *)__get_free_pages(GFP_ATOMIC, get_order(size)); + cpuaddr = (void *)__get_free_pages(flags, get_order(size)); if (unlikely(!cpuaddr)) return NULL;