提交 dc641613 编写于 作者: T Takashi Iwai 提交者: Tony Luck

[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 <tiwai@suse.de>
Signed-off-by: NGreg Edwards <edwardsg@sgi.com>
Signed-off-by: NMark Maule <maule@sgi.com>
Signed-off-by: NJes Sorensen <jes@sgi.com>
上级 2a792058
...@@ -90,14 +90,14 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size, ...@@ -90,14 +90,14 @@ void *sn_dma_alloc_coherent(struct device *dev, size_t size,
*/ */
node = pcibus_to_node(pdev->bus); node = pcibus_to_node(pdev->bus);
if (likely(node >=0)) { 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)) if (likely(p))
cpuaddr = page_address(p); cpuaddr = page_address(p);
else else
return NULL; return NULL;
} else } else
cpuaddr = (void *)__get_free_pages(GFP_ATOMIC, get_order(size)); cpuaddr = (void *)__get_free_pages(flags, get_order(size));
if (unlikely(!cpuaddr)) if (unlikely(!cpuaddr))
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册