powerpc: Implement dma_mmap_coherent()
-------- Original-Nachricht --------
Quoted 11 lines
Datum: Fri, 25 Mar 2011 17:50:06 +1100
Von: Benjamin Herrenschmidt <[email protected]>
An: linuxppc-dev <[email protected]>
CC: Takashi Iwai <[email protected]>
Betreff: [PATCH] powerpc: Implementdma_mmap_coherent()This is used by Alsa to mmap buffers allocated with
dma_alloc_coherent()into userspace. We need a special variant to handle machines with non-coherent DMAs as those buffers have "special" virt addresses and require non-cachable mappings
Quoted 6 lines
Signed-off-by Benjamin Herrenschmidt <[email protected]>---
Dunno if anybody with
CONFIG_NOT_COHERENT_CACHEhas some audio device that uses dma buffers (ie not usb-audio) and wants to try that out... should fix a long standing problem.
Compilation fails here with these error messages:
Quoted 9 lines
CC
arch/powerpc/mm/dma-noncoherent.oarch/powerpc/mm/dma-noncoherent.c: In function ‘__dma_get_coherent_pfn’:arch/powerpc/mm/dma-noncoherent.c:413: error: invalid operands to binary >> (have ‘void *’ and ‘int’)
cc1: warnings being treated as errorsarch/powerpc/mm/dma-noncoherent.c:414: error: passing argument 2 of ‘pud_offset’ makes integer from pointer without a castarch/powerpc/mm/dma-noncoherent.c:415: error: passing argument 2 of ‘pmd_offset’ makes integer from pointer without a castarch/powerpc/mm/dma-noncoherent.c:416: error: invalid operands to binary >> (have ‘void *’ and ‘int’) make[1]: *** [arch/powerpc/mm/dma-noncoherent.o] Fehler 1
make: *** [arch/powerpc/mm] Fehler 2
Anyway, it compiles with explicit type casts and I could test it on my semi-noncoherent AmigaOne. So far it works just fine with the VIA onboard sound and a Soundblaster Live PCI card.
Thanks a lot for the fix!
regards,
Gerhard
Signature · 2 lines
NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone
Quoted 6 lines · Gerhard Pircher
Anyway, it compiles with explicit type casts and I could test it on my semi-noncoherent AmigaOne. So far it works just fine with the VIA onboard
sound and a Soundblaster Live PCI card.Thanks a lot for the fix!
Yes, the version I sent to Linus has that fixed, I forgot to send it to the list also :-)
Cheers,
Ben.