]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] SPARC64: Respect gfp_t argument to dma_alloc_coherent().
authorDavid Miller <davem@davemloft.net>
Mon, 5 Jun 2006 03:41:00 +0000 (20:41 -0700)
committerChris Wright <chrisw@sous-sol.org>
Thu, 22 Jun 2006 19:16:11 +0000 (12:16 -0700)
commitaf948395f08691edd731bac85c1f4c334bd312ec
treef6c1143b14df1765eeef1ecaa0c2cce0f6d886f1
parent76fc2aafe67361e69c980408fc66ac4f051b17da
[PATCH] SPARC64: Respect gfp_t argument to dma_alloc_coherent().

Using asm-generic/dma-mapping.h does not work because pushing
the call down to pci_alloc_coherent() causes the gfp_t argument
of dma_alloc_coherent() to be ignored.

Fix this by implementing things directly, and adding a gfp_t
argument we can use in the internal call down to the PCI DMA
implementation of pci_alloc_coherent().

This fixes massive memory corruption when using the sound driver
layer, which passes things like __GFP_COMP down into these
routines and (correctly) expects that to work.

This is a disk eater when sound is used, so it's pretty critical.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc64/kernel/pci_iommu.c
arch/sparc64/kernel/sparc64_ksyms.c
include/asm-sparc64/dma-mapping.h
include/asm-sparc64/pci.h