Commit 0d688da5 authored by Yasunori Goto's avatar Yasunori Goto Committed by Ingo Molnar

IA64: fix swiotlb alloc_coherent for non DMA_64BIT_MASK devices, fix

Because dma_alloc_coherent() always required DMA zone even if DMA is
NOT necessary, FUJITA Tomonori posted a patch to fix it:

  http://marc.info/?l=linux-ia64&m=123314730923356&w=2

However, this fix needs one more patch to fix completely.
I tested and confirmed dma_alloc_coherent() returns
correct zone after applied following patch.
Signed-off-by: default avatarYasunori Goto <y-goto@jp.fujitsu.com>
Acked-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d7ab5c46
...@@ -24,7 +24,7 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size, ...@@ -24,7 +24,7 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *daddr, gfp_t gfp) dma_addr_t *daddr, gfp_t gfp)
{ {
struct dma_map_ops *ops = platform_dma_get_ops(dev); struct dma_map_ops *ops = platform_dma_get_ops(dev);
return ops->alloc_coherent(dev, size, daddr, gfp | GFP_DMA); return ops->alloc_coherent(dev, size, daddr, gfp);
} }
static inline void dma_free_coherent(struct device *dev, size_t size, static inline void dma_free_coherent(struct device *dev, size_t size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment