lkml.org 
[lkml]   [2005]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [3/3] Use the DMA32 zone for dma_alloc_coherent()/pci_alloc_consistent on x86-64


On Sun, 11 Sep 2005, Andi Kleen wrote:
>
> Use the DMA32 zone for dma_alloc_coherent()/pci_alloc_consistent on x86-64
>
> Signed-off-by: Andi Kleen <ak@suse.de>
>
> Index: linux/arch/x86_64/kernel/pci-gart.c
> ===================================================================
> --- linux.orig/arch/x86_64/kernel/pci-gart.c
> +++ linux/arch/x86_64/kernel/pci-gart.c
> @@ -219,6 +219,8 @@ dma_alloc_coherent(struct device *dev, s
> /* Kludge to make it bug-to-bug compatible with i386. i386
> uses the normal dma_mask for alloc_coherent. */
> dma_mask &= *dev->dma_mask;
> + if (dma_mask <= 0xffffffff)
> + gfp |= GFP_DMA32;

How can this be right?

Let's say that dma_mask is 0xfffff (ie 20-bit legacy DMA). It will trigger
the test, and set the GFP_DMA32 bit. Which can't be right.

I'm going to drop the DMA32 parts of the patches, they seem to be pretty
raw.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:1.298 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site