[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.
Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- arch/sparc64/kernel/pci_iommu.c 2 additions, 2 deletionsarch/sparc64/kernel/pci_iommu.c
- arch/sparc64/kernel/pci_sun4v.c 2 additions, 2 deletionsarch/sparc64/kernel/pci_sun4v.c
- include/asm-sparc64/dma-mapping.h 140 additions, 1 deletioninclude/asm-sparc64/dma-mapping.h
- include/asm-sparc64/pci.h 2 additions, 2 deletionsinclude/asm-sparc64/pci.h
Loading
Please register or sign in to comment