Re: [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu)

Ingo Molnar
2008-09-08T18:16:08Z

* FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:

> Very sorry, I should have compile this on X86_32...
>
> Can you replace the fourth patch with this?

some other commits came inbetween already - i applied the delta below.

Ingo

--------------->
>From 53f79ced9d2c42a52290b460b88a4720a481a3ed Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Mon, 8 Sep 2008 20:13:06 +0200
Subject: [PATCH] x86: fix alloc_coherent allocation issues (tip/x86/iommu), warning fixes

fix warnings.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/asm-x86/dma-mapping.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index 0cc022b..5607532 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -253,9 +253,9 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,

static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
{
+#ifdef CONFIG_X86_64
unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp);

-#ifdef CONFIG_X86_64
if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
gfp |= GFP_DMA32;
#endif