All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu)
@ 2008-09-05  8:58 FUJITA Tomonori
  2008-09-05  8:58 ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument FUJITA Tomonori
  2008-09-05  9:11 ` [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu) FUJITA Tomonori
  0 siblings, 2 replies; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-05  8:58 UTC (permalink / raw)
  To: mingo; +Cc: joerg.roedel, linux-kernel, iommu, fujita.tomonori

This patchset restores some of the current alloc_coherent behaviors
that Joerg's x86 patchset (in tip/x86/iommu) changes.

The first patch uses __GFP_DMA for NULL device argument (fallback_dev)
with pci-nommu. It's a hack for ISA (and some old code) so we need
DMA_ZONE.

The second patch uses __GFP_NORETRY in the case of GFP_DMA.

The third patch is a minor cleanup.


I'll send patchset for the rest of alloc_coherent issues this weekend.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument
  2008-09-05  8:58 [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu) FUJITA Tomonori
@ 2008-09-05  8:58 ` FUJITA Tomonori
  2008-09-05  8:58   ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu FUJITA Tomonori
  2008-09-05 10:40   ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument Joerg Roedel
  2008-09-05  9:11 ` [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu) FUJITA Tomonori
  1 sibling, 2 replies; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-05  8:58 UTC (permalink / raw)
  To: mingo; +Cc: joerg.roedel, linux-kernel, iommu, fujita.tomonori

We need to use __GFP_DMA for NULL device argument (fallback_dev) with
pci-nommu. It's a hack for ISA (and some old code) so we need to use
GFP_DMA.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 arch/x86/kernel/pci-nommu.c   |    5 +----
 include/asm-x86/dma-mapping.h |    2 ++
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
index 73853d3..526b2db 100644
--- a/arch/x86/kernel/pci-nommu.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -83,7 +83,6 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
 	if (hwdev->dma_mask == NULL)
 		return NULL;
 
-	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
 	gfp |= __GFP_ZERO;
 
 	dma_mask = hwdev->coherent_dma_mask;
@@ -96,14 +95,12 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
 	node = dev_to_node(hwdev);
 
 #ifdef CONFIG_X86_64
-	if (dma_mask <= DMA_32BIT_MASK)
+	if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
 		gfp |= GFP_DMA32;
 #endif
-
 	/* No alloc-free penalty for ISA devices */
 	if (dma_mask == DMA_24BIT_MASK)
 		gfp |= GFP_DMA;
-
 again:
 	page = alloc_pages_node(node, gfp, get_order(size));
 	if (!page)
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index 3a9a6f5..de4495e 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -246,6 +246,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
 	struct dma_mapping_ops *ops = get_dma_ops(dev);
 	void *memory;
 
+	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
+
 	if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
 		return memory;
 
-- 
1.5.4.2


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu
  2008-09-05  8:58 ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument FUJITA Tomonori
@ 2008-09-05  8:58   ` FUJITA Tomonori
  2008-09-05  8:58     ` [PATCH] x86: gart alloc_coherent doesn't need to check NULL device argument FUJITA Tomonori
  2008-09-05 10:43     ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu Joerg Roedel
  2008-09-05 10:40   ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument Joerg Roedel
  1 sibling, 2 replies; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-05  8:58 UTC (permalink / raw)
  To: mingo; +Cc: joerg.roedel, linux-kernel, iommu, fujita.tomonori

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 arch/x86/kernel/pci-nommu.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
index 526b2db..3495f88 100644
--- a/arch/x86/kernel/pci-nommu.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -102,6 +102,9 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
 	if (dma_mask == DMA_24BIT_MASK)
 		gfp |= GFP_DMA;
 again:
+	if (gfp & GFP_DMA)
+		gfp |= __GFP_NORETRY;
+
 	page = alloc_pages_node(node, gfp, get_order(size));
 	if (!page)
 		return NULL;
-- 
1.5.4.2


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH] x86: gart alloc_coherent doesn't need to check NULL device argument
  2008-09-05  8:58   ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu FUJITA Tomonori
@ 2008-09-05  8:58     ` FUJITA Tomonori
  2008-09-05 10:41       ` Joerg Roedel
  2008-09-05 10:43     ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu Joerg Roedel
  1 sibling, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-05  8:58 UTC (permalink / raw)
  To: mingo; +Cc: joerg.roedel, linux-kernel, iommu, fujita.tomonori

asm/dma-mapping.h guarantees that gart alloc_coherent doesn't get NULL
device argument.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 arch/x86/kernel/pci-gart_64.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 4d08649..0b99d4a 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -506,9 +506,6 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,
 
 	align_mask = (1UL << get_order(size)) - 1;
 
-	if (!dev)
-		dev = &x86_dma_fallback_dev;
-
 	*dma_addr = dma_map_area(dev, __pa(vaddr), size, DMA_BIDIRECTIONAL,
 				 align_mask);
 	flush_gart();
-- 
1.5.4.2


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu)
  2008-09-05  8:58 [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu) FUJITA Tomonori
  2008-09-05  8:58 ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument FUJITA Tomonori
@ 2008-09-05  9:11 ` FUJITA Tomonori
  2008-09-05 10:45   ` Ingo Molnar
  1 sibling, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-05  9:11 UTC (permalink / raw)
  To: mingo; +Cc: joerg.roedel, linux-kernel, iommu

On Fri,  5 Sep 2008 17:58:46 +0900
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:

> This patchset restores some of the current alloc_coherent behaviors
> that Joerg's x86 patchset (in tip/x86/iommu) changes.
> 
> The first patch uses __GFP_DMA for NULL device argument (fallback_dev)
> with pci-nommu. It's a hack for ISA (and some old code) so we need
> DMA_ZONE.
> 
> The second patch uses __GFP_NORETRY in the case of GFP_DMA.
> 
> The third patch is a minor cleanup.

Oops, I messed up the subjects. They should have been:

[PATCH 1/3] x86: fix nommu_alloc_coherent allocation with NULL device argument
[PATCH 2/3] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu
[PATCH 3/3] x86: gart alloc_coherent doesn't need to check NULL device argument


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument
  2008-09-05  8:58 ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument FUJITA Tomonori
  2008-09-05  8:58   ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu FUJITA Tomonori
@ 2008-09-05 10:40   ` Joerg Roedel
  2008-09-05 10:49     ` Ingo Molnar
                       ` (2 more replies)
  1 sibling, 3 replies; 17+ messages in thread
From: Joerg Roedel @ 2008-09-05 10:40 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: mingo, linux-kernel, iommu

I agree with this patch in principle. It fixes the problem. But I think
we should evaluate if we can change the dma_mask of the fallback_dev to
24 bit.

On Fri, Sep 05, 2008 at 05:58:47PM +0900, FUJITA Tomonori wrote:
> We need to use __GFP_DMA for NULL device argument (fallback_dev) with
> pci-nommu. It's a hack for ISA (and some old code) so we need to use
> GFP_DMA.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
>  arch/x86/kernel/pci-nommu.c   |    5 +----
>  include/asm-x86/dma-mapping.h |    2 ++
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
> index 73853d3..526b2db 100644
> --- a/arch/x86/kernel/pci-nommu.c
> +++ b/arch/x86/kernel/pci-nommu.c
> @@ -83,7 +83,6 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
>  	if (hwdev->dma_mask == NULL)
>  		return NULL;
>  
> -	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
>  	gfp |= __GFP_ZERO;
>  
>  	dma_mask = hwdev->coherent_dma_mask;
> @@ -96,14 +95,12 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
>  	node = dev_to_node(hwdev);
>  
>  #ifdef CONFIG_X86_64
> -	if (dma_mask <= DMA_32BIT_MASK)
> +	if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
>  		gfp |= GFP_DMA32;
>  #endif
> -
>  	/* No alloc-free penalty for ISA devices */
>  	if (dma_mask == DMA_24BIT_MASK)
>  		gfp |= GFP_DMA;
> -

Please leave these spare lines where they are. They increase the
readability of the code imho.

>  again:
>  	page = alloc_pages_node(node, gfp, get_order(size));
>  	if (!page)
> diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
> index 3a9a6f5..de4495e 100644
> --- a/include/asm-x86/dma-mapping.h
> +++ b/include/asm-x86/dma-mapping.h
> @@ -246,6 +246,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
>  	struct dma_mapping_ops *ops = get_dma_ops(dev);
>  	void *memory;
>  
> +	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
> +
>  	if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
>  		return memory;
>  
> -- 
> 1.5.4.2
> 
> 

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: gart alloc_coherent doesn't need to check NULL device argument
  2008-09-05  8:58     ` [PATCH] x86: gart alloc_coherent doesn't need to check NULL device argument FUJITA Tomonori
@ 2008-09-05 10:41       ` Joerg Roedel
  0 siblings, 0 replies; 17+ messages in thread
From: Joerg Roedel @ 2008-09-05 10:41 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: mingo, linux-kernel, iommu

True, thanks.

On Fri, Sep 05, 2008 at 05:58:49PM +0900, FUJITA Tomonori wrote:
> asm/dma-mapping.h guarantees that gart alloc_coherent doesn't get NULL
> device argument.
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Acked-by: Joerg Roedel <joerg.roedel@amd.com>

> ---
>  arch/x86/kernel/pci-gart_64.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
> index 4d08649..0b99d4a 100644
> --- a/arch/x86/kernel/pci-gart_64.c
> +++ b/arch/x86/kernel/pci-gart_64.c
> @@ -506,9 +506,6 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr,
>  
>  	align_mask = (1UL << get_order(size)) - 1;
>  
> -	if (!dev)
> -		dev = &x86_dma_fallback_dev;
> -
>  	*dma_addr = dma_map_area(dev, __pa(vaddr), size, DMA_BIDIRECTIONAL,
>  				 align_mask);
>  	flush_gart();
> -- 
> 1.5.4.2
> 
> 

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu
  2008-09-05  8:58   ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu FUJITA Tomonori
  2008-09-05  8:58     ` [PATCH] x86: gart alloc_coherent doesn't need to check NULL device argument FUJITA Tomonori
@ 2008-09-05 10:43     ` Joerg Roedel
  2008-09-06 12:18       ` FUJITA Tomonori
  1 sibling, 1 reply; 17+ messages in thread
From: Joerg Roedel @ 2008-09-05 10:43 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: mingo, linux-kernel, iommu

On Fri, Sep 05, 2008 at 05:58:48PM +0900, FUJITA Tomonori wrote:
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
>  arch/x86/kernel/pci-nommu.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
> index 526b2db..3495f88 100644
> --- a/arch/x86/kernel/pci-nommu.c
> +++ b/arch/x86/kernel/pci-nommu.c
> @@ -102,6 +102,9 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
>  	if (dma_mask == DMA_24BIT_MASK)
>  		gfp |= GFP_DMA;
>  again:
> +	if (gfp & GFP_DMA)
> +		gfp |= __GFP_NORETRY;
> +

Huh? Why that? The __GFP_NORETRY is a hint from the caller to the page
allocator on how aggressive it should try to allocate memory. I don't
think the DMA code should touch those flags unless there is a very very
good reason for it.

>  	page = alloc_pages_node(node, gfp, get_order(size));
>  	if (!page)
>  		return NULL;
> -- 
> 1.5.4.2
> 
> 

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu)
  2008-09-05  9:11 ` [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu) FUJITA Tomonori
@ 2008-09-05 10:45   ` Ingo Molnar
  2008-09-08 17:35     ` Ingo Molnar
  0 siblings, 1 reply; 17+ messages in thread
From: Ingo Molnar @ 2008-09-05 10:45 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: mingo, joerg.roedel, linux-kernel, iommu


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

> On Fri,  5 Sep 2008 17:58:46 +0900
> FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> 
> > This patchset restores some of the current alloc_coherent behaviors
> > that Joerg's x86 patchset (in tip/x86/iommu) changes.
> > 
> > The first patch uses __GFP_DMA for NULL device argument (fallback_dev)
> > with pci-nommu. It's a hack for ISA (and some old code) so we need
> > DMA_ZONE.
> > 
> > The second patch uses __GFP_NORETRY in the case of GFP_DMA.
> > 
> > The third patch is a minor cleanup.

I've applied them to tip/x86/iommu:

 52fceb1: x86: gart alloc_coherent doesn't need to check NULL device argument
 150ba17: x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu
 3b3d509: x86: fix nommu_alloc_coherent allocation with NULL device argument

and merged them into tip/master. Thanks!

> Oops, I messed up the subjects. They should have been:
> 
> [PATCH 1/3] x86: fix nommu_alloc_coherent allocation with NULL device argument
> [PATCH 2/3] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu
> [PATCH 3/3] x86: gart alloc_coherent doesn't need to check NULL device argument

that's OK - i dont rely on the numbering when picking up patches and 
they get discarded by git-am for the commit log anyway.

The only real use for numbering is when there's some really large set of 
patches (dozens of them) where i'd like to make sure no mail got dropped 
or reordered before i do some more difficult merge or conflict 
resolution run.

	Ingo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument
  2008-09-05 10:40   ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument Joerg Roedel
@ 2008-09-05 10:49     ` Ingo Molnar
  2008-09-05 11:56     ` Joerg Roedel
  2008-09-06 12:18     ` FUJITA Tomonori
  2 siblings, 0 replies; 17+ messages in thread
From: Ingo Molnar @ 2008-09-05 10:49 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: FUJITA Tomonori, mingo, linux-kernel, iommu


* Joerg Roedel <joerg.roedel@amd.com> wrote:

> I agree with this patch in principle. It fixes the problem. But I 
> think we should evaluate if we can change the dma_mask of the 
> fallback_dev to 24 bit.

ok - i kept this commit for now in tip/x86/iommu:

# 551b454: x86: gart alloc_coherent doesn't need to check NULL device argument

and will let you guys sort out how to do the others.

	Ingo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument
  2008-09-05 10:40   ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument Joerg Roedel
  2008-09-05 10:49     ` Ingo Molnar
@ 2008-09-05 11:56     ` Joerg Roedel
  2008-09-06 12:18     ` FUJITA Tomonori
  2 siblings, 0 replies; 17+ messages in thread
From: Joerg Roedel @ 2008-09-05 11:56 UTC (permalink / raw)
  To: Andi Kleen, FUJITA Tomonori; +Cc: iommu, mingo, linux-kernel

Andi,

I guess you made the dma_mask of the fallback_dev 32 bit a long time
ago. Is there any reason it cannot be 24 bit?

Joerg

On Fri, Sep 05, 2008 at 12:40:49PM +0200, Joerg Roedel wrote:
> I agree with this patch in principle. It fixes the problem. But I think
> we should evaluate if we can change the dma_mask of the fallback_dev to
> 24 bit.
> 
> On Fri, Sep 05, 2008 at 05:58:47PM +0900, FUJITA Tomonori wrote:
> > We need to use __GFP_DMA for NULL device argument (fallback_dev) with
> > pci-nommu. It's a hack for ISA (and some old code) so we need to use
> > GFP_DMA.
> > 
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > ---
> >  arch/x86/kernel/pci-nommu.c   |    5 +----
> >  include/asm-x86/dma-mapping.h |    2 ++
> >  2 files changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
> > index 73853d3..526b2db 100644
> > --- a/arch/x86/kernel/pci-nommu.c
> > +++ b/arch/x86/kernel/pci-nommu.c
> > @@ -83,7 +83,6 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
> >  	if (hwdev->dma_mask == NULL)
> >  		return NULL;
> >  
> > -	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
> >  	gfp |= __GFP_ZERO;
> >  
> >  	dma_mask = hwdev->coherent_dma_mask;
> > @@ -96,14 +95,12 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
> >  	node = dev_to_node(hwdev);
> >  
> >  #ifdef CONFIG_X86_64
> > -	if (dma_mask <= DMA_32BIT_MASK)
> > +	if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
> >  		gfp |= GFP_DMA32;
> >  #endif
> > -
> >  	/* No alloc-free penalty for ISA devices */
> >  	if (dma_mask == DMA_24BIT_MASK)
> >  		gfp |= GFP_DMA;
> > -
> 
> Please leave these spare lines where they are. They increase the
> readability of the code imho.
> 
> >  again:
> >  	page = alloc_pages_node(node, gfp, get_order(size));
> >  	if (!page)
> > diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
> > index 3a9a6f5..de4495e 100644
> > --- a/include/asm-x86/dma-mapping.h
> > +++ b/include/asm-x86/dma-mapping.h
> > @@ -246,6 +246,8 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
> >  	struct dma_mapping_ops *ops = get_dma_ops(dev);
> >  	void *memory;
> >  
> > +	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
> > +
> >  	if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
> >  		return memory;
> >  
> > -- 
> > 1.5.4.2
> > 
> > 
> 
> -- 
>            |           AMD Saxony Limited Liability Company & Co. KG
>  Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
>  System    |                  Register Court Dresden: HRA 4896
>  Research  |              General Partner authorized to represent:
>  Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
>            | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
> 
> _______________________________________________
> iommu mailing list
> iommu@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/iommu
> 

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument
  2008-09-05 10:40   ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument Joerg Roedel
  2008-09-05 10:49     ` Ingo Molnar
  2008-09-05 11:56     ` Joerg Roedel
@ 2008-09-06 12:18     ` FUJITA Tomonori
  2 siblings, 0 replies; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-06 12:18 UTC (permalink / raw)
  To: joerg.roedel; +Cc: fujita.tomonori, mingo, linux-kernel, iommu

On Fri, 5 Sep 2008 12:40:49 +0200
Joerg Roedel <joerg.roedel@amd.com> wrote:

> I agree with this patch in principle. It fixes the problem. But I think
> we should evaluate if we can change the dma_mask of the fallback_dev to
> 24 bit.

That's fine by me if someone who wrote the current code say that the
change is safe (though I think it's safe).

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu
  2008-09-05 10:43     ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu Joerg Roedel
@ 2008-09-06 12:18       ` FUJITA Tomonori
  2008-09-08 11:41         ` Joerg Roedel
  0 siblings, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-06 12:18 UTC (permalink / raw)
  To: joerg.roedel; +Cc: fujita.tomonori, mingo, linux-kernel, iommu

On Fri, 5 Sep 2008 12:43:05 +0200
Joerg Roedel <joerg.roedel@amd.com> wrote:

> On Fri, Sep 05, 2008 at 05:58:48PM +0900, FUJITA Tomonori wrote:
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > ---
> >  arch/x86/kernel/pci-nommu.c |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
> > index 526b2db..3495f88 100644
> > --- a/arch/x86/kernel/pci-nommu.c
> > +++ b/arch/x86/kernel/pci-nommu.c
> > @@ -102,6 +102,9 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
> >  	if (dma_mask == DMA_24BIT_MASK)
> >  		gfp |= GFP_DMA;
> >  again:
> > +	if (gfp & GFP_DMA)
> > +		gfp |= __GFP_NORETRY;
> > +
> 
> Huh? Why that? The __GFP_NORETRY is a hint from the caller to the page
> allocator on how aggressive it should try to allocate memory. I don't
> think the DMA code should touch those flags unless there is a very very
> good reason for it.

The current comment is reasonable for me:

/* Don't invoke OOM killer or retry in lower 16MB DMA zone */
if (gfp & __GFP_DMA)
     noretry = 1;

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu
  2008-09-06 12:18       ` FUJITA Tomonori
@ 2008-09-08 11:41         ` Joerg Roedel
  0 siblings, 0 replies; 17+ messages in thread
From: Joerg Roedel @ 2008-09-08 11:41 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: mingo, linux-kernel, iommu

On Sat, Sep 06, 2008 at 09:18:37PM +0900, FUJITA Tomonori wrote:
> On Fri, 5 Sep 2008 12:43:05 +0200
> Joerg Roedel <joerg.roedel@amd.com> wrote:
> 
> > On Fri, Sep 05, 2008 at 05:58:48PM +0900, FUJITA Tomonori wrote:
> > > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > > ---
> > >  arch/x86/kernel/pci-nommu.c |    3 +++
> > >  1 files changed, 3 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
> > > index 526b2db..3495f88 100644
> > > --- a/arch/x86/kernel/pci-nommu.c
> > > +++ b/arch/x86/kernel/pci-nommu.c
> > > @@ -102,6 +102,9 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
> > >  	if (dma_mask == DMA_24BIT_MASK)
> > >  		gfp |= GFP_DMA;
> > >  again:
> > > +	if (gfp & GFP_DMA)
> > > +		gfp |= __GFP_NORETRY;
> > > +
> > 
> > Huh? Why that? The __GFP_NORETRY is a hint from the caller to the page
> > allocator on how aggressive it should try to allocate memory. I don't
> > think the DMA code should touch those flags unless there is a very very
> > good reason for it.
> 
> The current comment is reasonable for me:
> 
> /* Don't invoke OOM killer or retry in lower 16MB DMA zone */
> if (gfp & __GFP_DMA)
>      noretry = 1;

Ok, so please add a comment to this so we know in the future why this is
there.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu)
  2008-09-05 10:45   ` Ingo Molnar
@ 2008-09-08 17:35     ` Ingo Molnar
  2008-09-08 18:06       ` FUJITA Tomonori
  0 siblings, 1 reply; 17+ messages in thread
From: Ingo Molnar @ 2008-09-08 17:35 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: mingo, joerg.roedel, linux-kernel, iommu


btw., the build became very noisy - see the messages below.

	Ingo

---------->
init/initramfs.c:517: warning: 'clean_rootfs' defined but not used
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from init/main.c:48:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from arch/x86/kernel/pci-dma.c:2:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/probe_roms_32.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/pci-nommu.c:6:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/early-quirks.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/quirks.c:5:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/cpu/intel_cacheinfo.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/reboot_fixups_32.c:12:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/cpu/cpufreq/gx-suspmod.c:82:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
arch/x86/kernel/early_printk.c:993: warning: 'enable_debug_console' defined but not used
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/setup.c:48:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from include/asm/k8.h:5,
                 from arch/x86/kernel/k8.c:12:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/scx200_32.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/cpu/mtrr/main.c:37:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/kernel/io_apic.c:29:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
mm/bootmem.c: In function 'mark_bootmem':
mm/bootmem.c:321: warning: control reaches end of non-void function
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from include/linux/delayacct.h:22,
                 from kernel/fork.c:56:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from include/linux/delayacct.h:22,
                 from mm/vmscan.c:42:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from ipc/mqueue.c:27:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from include/linux/delayacct.h:22,
                 from kernel/sched.c:65:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
fs/dcache.c: In function 'd_materialise_unique':
fs/dcache.c:1875: warning: control reaches end of non-void function
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from security/commoncap.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from kernel/exit.c:34:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from kernel/audit.h:25,
                 from kernel/signal.c:37:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from include/linux/delayacct.h:22,
                 from mm/memory.c:51:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
include/asm/io_32.h: In function 'memcpy_fromio':
include/asm/io_32.h:151: warning: passing argument 2 of '__memcpy' discards qualifiers from pointer target type
include/asm/io_32.h: In function 'memcpy_toio':
include/asm/io_32.h:157: warning: passing argument 1 of '__memcpy' discards qualifiers from pointer target type
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from crypto/algapi.c:20:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from mm/dmapool.c:27:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
kernel/cpuset.c: In function 'scan_for_empty_cpusets':
kernel/cpuset.c:1939: warning: passing argument 1 of 'list_add_tail' discards qualifiers from pointer target type
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from crypto/ablkcipher.c:22:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from include/linux/delayacct.h:22,
                 from kernel/cgroup.c:46:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from crypto/aead.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from crypto/cryptomgr.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/callback.c:22:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/cell.c:19:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/ip.h:109,
                 from fs/afs/cmservice.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from include/linux/delayacct.h:22,
                 from kernel/delayacct.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from crypto/xcbc.c:29:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/dir.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/file.c:20:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/flock.c:14:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from kernel/taskstats.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from kernel/dma-coherent.c:7:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/inode.c:24:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/main.c:18:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/fsclient.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/misc.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/proc.c:19:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/security.c:19:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/server.c:15:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/net/sock.h:50,
                 from fs/afs/rxrpc.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/super.c:27:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/vlclient.c:15:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from fs/afs/netdevices.c:8:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/vlocation.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/vnode.c:19:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/volume.c:20:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/scsi/scsi_cmnd.h:5,
                 from block/blk-exec.c:15:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/write.c:18:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from fs/afs/internal.h:17,
                 from fs/afs/mntpt.c:22:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/scsi/scsi_cmnd.h:5,
                 from include/scsi/scsi.h:13,
                 from block/scsi_ioctl.c:32:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/i386.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/init.c:2:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/acpi/osl.c:35:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/direct.c:6:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/libata-core.c:46:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/olpc.c:29:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/acpi/reboot.c:3:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/block/cpqarray.c:25:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/scsi/scsi_cmnd.h:5,
                 from include/scsi/scsi.h:13,
                 from block/cmd-filter.c:27:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/ata_piix.c:88:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/fixup.c:8:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/scsi/scsi_cmnd.h:5,
                 from include/scsi/scsi.h:13,
                 from drivers/ata/libata-scsi.c:40:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/mmconfig_32.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/mmconfig-shared.c:14:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
drivers/block/xd.c: In function 'xd_init':
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/libata.h:33,
                 from drivers/ata/libata-pmp.c:12:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/net/sock.h:50,
                 from drivers/block/nbd.c:31:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/sata_promise.c:37:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/acpi.c:2:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/sata_sx4.c:84:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
include/asm/io_32.h: In function 'memcpy_toio':
include/asm/io_32.h:157: warning: passing argument 1 of '__memcpy' discards qualifiers from pointer target type
block/cfq-iosched.c: In function 'cfq_async_queue_prio':
block/cfq-iosched.c:1501: warning: control reaches end of non-void function
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/pcbios.c:6:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/legacy.c:6:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/ahci.c:38:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/common.c:9:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/irq.c:10:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/clocksource/acpi_pm.c:24:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/libata-eh.c:37:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/block/sx8.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/early.c:3:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/crypto/geode-aes.c:12:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/edac/edac_core.h:29,
                 from drivers/edac/edac_device.c:33:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/sata_nv.c:42:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/sata_uli.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/edac/edac_core.h:29,
                 from drivers/edac/edac_mc.c:35:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/crypto/hifn_795x.c:26:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from drivers/firmware/dcdbas.c:25:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
include/asm/io_32.h: In function 'memcpy_fromio':
include/asm/io_32.h:151: warning: passing argument 2 of '__memcpy' discards qualifiers from pointer target type
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/edac/edac_core.h:29,
                 from drivers/edac/edac_mc_sysfs.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/firmware/iscsi_ibft_find.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/eisa/pci_eisa.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/edac/edac_core.h:29,
                 from drivers/edac/edac_pci_sysfs.c:14:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/edac/edac_core.h:29,
                 from drivers/edac/edac_module.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/libata-sff.c:37:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_amd.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_cmd640.c:19:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from arch/x86/pci/amd_bus.c:3:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/edac/edac_core.h:29,
                 from drivers/edac/edac_pci.c:29:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/edac/edac_core.h:29,
                 from drivers/edac/edac_device_sysfs.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/genetlink.h:5,
                 from include/net/genetlink.h:5,
                 from include/linux/taskstats_kern.h:13,
                 from include/linux/delayacct.h:22,
                 from fs/proc/array.c:81:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_cs5530.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_cmd64x.c:27:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/socket.c:69:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/802/psnap.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/802/p8022.c:20:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_cypress.c:14:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/8021q/vlan_core.c:2:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from drivers/base/platform.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/802/tr.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/rocket.c:85:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
drivers/char/rocket.c: At top level:
drivers/char/rocket.c:1873: warning: 'rocket_pci_ids' defined but not used
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/acpi/bus.c:39:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/nozomi.c:47:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/8021q/vlan.c:24:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/hw_random/intel-rng.c:31:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/mxser.c:40:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/hw_random/amd-rng.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/input/gameport/fm801-gp.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/epca.c:45:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
include/asm/io_32.h: In function 'memcpy_fromio':
include/asm/io_32.h:151: warning: passing argument 2 of '__memcpy' discards qualifiers from pointer target type
include/asm/io_32.h: In function 'memcpy_toio':
include/asm/io_32.h:157: warning: passing argument 1 of '__memcpy' discards qualifiers from pointer target type
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/i2c/busses/i2c-i801.c:59:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_efar.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/i2c/busses/i2c-amd8111.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/specialix.c:94:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
drivers/char/specialix.c: At top level:
drivers/char/specialix.c:2358: warning: 'specialx_pci_tbl' defined but not used
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/i2c/busses/i2c-sis630.c:52:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/ip2/ip2main.c:96:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
drivers/char/ip2/ip2main.c: At top level:
drivers/char/ip2/i2ellis.c:100: warning: 'iiEllisCleanup' defined but not used
drivers/char/ip2/ip2main.c:3178: warning: 'ip2main_pci_tbl' defined but not used
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/rio/rio_linux.c:46:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/synclinkmp.c:44:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/synclink.c:73:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/802/fc.c:23:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from lib/devres.c:2:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from lib/iomap.c:7:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/i2c/busses/i2c-voodoo3.c:32:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/802/hippi.c:32:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/icmpv6.h:80,
                 from include/linux/ipv6.h:208,
                 from net/9p/trans_fd.c:32:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/scsi/scsi_cmnd.h:5,
                 from include/scsi/scsi.h:13,
                 from include/scsi/scsi_host.h:10,
                 from drivers/ata/pata_isapnp.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/applicom.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/802/stp.c:12:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ieee1394/dma.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/sonypi.c:41:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ieee1394/iso.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/8021q/vlan_dev.c:25:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_it8213.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/input/serio/pcips2.c:18:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ieee1394/init_ohci1394_dma.c:38:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/net/sock.h:50,
                 from net/core/iovec.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/8021q/vlan_netlink.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/net/sock.h:50,
                 from include/net/request_sock.h:24,
                 from net/core/request_sock.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/tcp.h:176,
                 from net/core/sock.c:111:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/datagram.c:47:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/tcp.h:176,
                 from net/core/stream.c:19:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/ethernet/pe2.c:5:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/ip.h:109,
                 from net/ethernet/eth.c:49:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/decnet/dn_nsp_in.c:58:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/decnet/af_decnet.c:115:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/scm.c:26:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/linux/if_vlan.h:18,
                 from net/8021q/vlan_gvrp.c:12:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/i2c/busses/scx200_acb.c:32:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/8021q/vlanproc.c:28:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_ns87410.c:24:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from net/core/gen_stats.c:22:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_ninja32.c:41:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/gen_estimator.c:31:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/802/garp.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/decnet/dn_nsp_out.c:51:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/acpi/pci_root.c:34:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/decnet/dn_route.c:66:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_radisys.c:18:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_oldpiix.c:19:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from net/core/net_namespace.c:3:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/sysctl_net_core.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
lib/debugobjects.c:58: warning: 'obj_states' defined but not used
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/ip.h:109,
                 from include/net/ip.h:27,
                 from net/ipv4/inetpeer.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/ipv4/protocol.c:36:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_sl82c105.c:22:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/ipv4/route.c:80:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from include/linux/tifm.h:19,
                 from drivers/memstick/host/tifm_ms.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from net/core/dev.c:91:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/linux/if_arp.h:27,
                 from net/decnet/dn_neigh.c:31:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/char/cs5535_gpio.c:20:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from include/linux/tifm.h:19,
                 from drivers/misc/tifm_core.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/decnet/dn_dev.c:33:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/linux/inetdevice.h:9,
                 from net/ipv4/ip_input.c:129:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/acpi/pci_link.c:41:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/ata/pata_opti.c:30:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/ipv4/ip_fragment.c:29:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/pci/access.c:3:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from drivers/pnp/core.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/ethtool.c:20:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from net/core/dev_mcast.c:38:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/skbuff.c:48:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/net/atl1e/atl1e_hw.c:22:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/ipv4/ip_forward.c:25:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from drivers/pnp/card.c:12:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/memstick/host/jmb38x_ms.c:15:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/misc/ioc4.c:31:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/net/atl1e/atl1e.h:32,
                 from drivers/net/atl1e/atl1e_main.c:23:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/dst.c:16:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from drivers/net/atl1e/atl1e_ethtool.c:24:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/lapb/lapb_in.c:29:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/pci/bus.c:13:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/lapb/lapb_timer.c:29:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from drivers/net/e1000e/82571.c:44:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/lapb/lapb_subr.c:27:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/ipv4/ip_options.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/lapb/lapb_out.c:28:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from include/linux/rtnetlink.h:5,
                 from net/core/netevent.c:17:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/decnet/dn_timer.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from drivers/net/e1000e/ich8lan.c:50:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/asm-generic/pci-dma-compat.h:8,
                 from include/asm/pci.h:97,
                 from include/linux/pci.h:990,
                 from drivers/pnp/resource.c:18:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from net/decnet/dn_fib.c:26:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/netlink.h:156,
                 from net/decnet/dn_rules.c:21:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from net/core/neighbour.c:23:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
In file included from include/linux/dma-mapping.h:53,
                 from include/linux/dmaengine.h:30,
                 from include/linux/skbuff.h:30,
                 from include/linux/if_ether.h:115,
                 from include/linux/netdevice.h:30,
                 from include/net/sock.h:50,
                 from include/net/inet_sock.h:26,
                 from include/net/inet_connection_sock.h:24,
                 from net/ipv4/inet_hashtables.c:23:
include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu)
  2008-09-08 17:35     ` Ingo Molnar
@ 2008-09-08 18:06       ` FUJITA Tomonori
  2008-09-08 18:15         ` Ingo Molnar
  0 siblings, 1 reply; 17+ messages in thread
From: FUJITA Tomonori @ 2008-09-08 18:06 UTC (permalink / raw)
  To: mingo; +Cc: fujita.tomonori, mingo, joerg.roedel, linux-kernel, iommu

On Mon, 8 Sep 2008 19:35:25 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> 
> btw., the build became very noisy - see the messages below.
> 
> 	Ingo
> 
> ---------->
> init/initramfs.c:517: warning: 'clean_rootfs' defined but not used
> In file included from include/linux/dma-mapping.h:53,
>                  from include/linux/dmaengine.h:30,
>                  from include/linux/skbuff.h:30,
>                  from include/linux/netlink.h:156,
>                  from include/linux/genetlink.h:5,
>                  from include/net/genetlink.h:5,
>                  from include/linux/taskstats_kern.h:13,
>                  from init/main.c:48:
> include/asm/dma-mapping.h: In function 'dma_alloc_coherent_gfp_flags':
> include/asm/dma-mapping.h:258: warning: unused variable 'dma_mask'
> In file included from include/linux/dma-mapping.h:53,
>                  from arch/x86/kernel/pci-dma.c:2:

Very sorry, I should have compile this on X86_32...

Can you replace the fourth patch with this?

=
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH] x86: dma_alloc_coherent sets gfp flags properly

Non real IOMMU implemenations (which doesn't do virtual mappings,
e.g. swiotlb, pci-nommu, etc) need to use proper gfp flags and
dma_mask to allocate pages in their own dma_alloc_coherent()
(allocated page need to be suitable for device's coherent_dma_mask).

This patch makes dma_alloc_coherent do this job so that IOMMUs don't
need to take care of it any more.

Real IOMMU implemenataions can simply ignore the gfp flags.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 arch/x86/kernel/pci-nommu.c   |   19 ++-----------------
 include/asm-x86/dma-mapping.h |   32 ++++++++++++++++++++++++++++----
 2 files changed, 30 insertions(+), 21 deletions(-)

diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
index ada1c87..8e398b5 100644
--- a/arch/x86/kernel/pci-nommu.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -80,26 +80,11 @@ nommu_alloc_coherent(struct device *hwdev, size_t size,
 	int node;
 	struct page *page;
 
-	gfp |= __GFP_ZERO;
-
-	dma_mask = hwdev->coherent_dma_mask;
-	if (!dma_mask)
-		dma_mask = *(hwdev->dma_mask);
+	dma_mask = dma_alloc_coherent_mask(hwdev, gfp);
 
-	if (dma_mask < DMA_24BIT_MASK)
-		return NULL;
+	gfp |= __GFP_ZERO;
 
 	node = dev_to_node(hwdev);
-
-#ifdef CONFIG_X86_64
-	if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
-		gfp |= GFP_DMA32;
-#endif
-
-	/* No alloc-free penalty for ISA devices */
-	if (dma_mask == DMA_24BIT_MASK)
-		gfp |= GFP_DMA;
-
 again:
 	page = alloc_pages_node(node, gfp, get_order(size));
 	if (!page)
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index 9d6dcf4..8bb3108 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -241,6 +241,29 @@ static inline int dma_get_cache_alignment(void)
 	return boot_cpu_data.x86_clflush_size;
 }
 
+static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
+						    gfp_t gfp)
+{
+	unsigned long dma_mask = 0;
+
+	dma_mask = dev->coherent_dma_mask;
+	if (!dma_mask)
+		dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK;
+
+	return dma_mask;
+}
+
+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);
+
+	if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA))
+		gfp |= GFP_DMA32;
+#endif
+       return gfp;
+}
+
 static inline void *
 dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
 		gfp_t gfp)
@@ -261,10 +284,11 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
 	if (!dev->dma_mask)
 		return NULL;
 
-	if (ops->alloc_coherent)
-		return ops->alloc_coherent(dev, size,
-				dma_handle, gfp);
-	return NULL;
+	if (!ops->alloc_coherent)
+		return NULL;
+
+	return ops->alloc_coherent(dev, size, dma_handle,
+				   dma_alloc_coherent_gfp_flags(dev, gfp));
 }
 
 static inline void dma_free_coherent(struct device *dev, size_t size,
-- 
1.5.5.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu)
  2008-09-08 18:06       ` FUJITA Tomonori
@ 2008-09-08 18:15         ` Ingo Molnar
  0 siblings, 0 replies; 17+ messages in thread
From: Ingo Molnar @ 2008-09-08 18:15 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: mingo, joerg.roedel, linux-kernel, iommu


* 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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-09-08 18:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-05  8:58 [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu) FUJITA Tomonori
2008-09-05  8:58 ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument FUJITA Tomonori
2008-09-05  8:58   ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu FUJITA Tomonori
2008-09-05  8:58     ` [PATCH] x86: gart alloc_coherent doesn't need to check NULL device argument FUJITA Tomonori
2008-09-05 10:41       ` Joerg Roedel
2008-09-05 10:43     ` [PATCH] x86: use __GFP_NORETRY in the case of GFP_DMA with pci-nommu Joerg Roedel
2008-09-06 12:18       ` FUJITA Tomonori
2008-09-08 11:41         ` Joerg Roedel
2008-09-05 10:40   ` [PATCH] x86: fix nommu_alloc_coherent allocation with NULL device argument Joerg Roedel
2008-09-05 10:49     ` Ingo Molnar
2008-09-05 11:56     ` Joerg Roedel
2008-09-06 12:18     ` FUJITA Tomonori
2008-09-05  9:11 ` [PATCH 0/3] fix alloc_coherent allocation issues (tip/x86/iommu) FUJITA Tomonori
2008-09-05 10:45   ` Ingo Molnar
2008-09-08 17:35     ` Ingo Molnar
2008-09-08 18:06       ` FUJITA Tomonori
2008-09-08 18:15         ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.