-------- Original-Nachricht -------- > Datum: Fri, 25 Mar 2011 17:50:06 +1100 > Von: Benjamin Herrenschmidt <b...@kernel.crashing.org> > An: linuxppc-dev <linuxppc-dev@lists.ozlabs.org> > CC: Takashi Iwai <ti...@suse.de> > Betreff: [PATCH] powerpc: Implement dma_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 > > Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> > --- > > Dunno if anybody with CONFIG_NOT_COHERENT_CACHE has 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: > CC arch/powerpc/mm/dma-noncoherent.o > arch/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 errors > arch/powerpc/mm/dma-noncoherent.c:414: error: passing argument 2 of > ‘pud_offset’ makes integer from pointer without a cast > arch/powerpc/mm/dma-noncoherent.c:415: error: passing argument 2 of > ‘pmd_offset’ makes integer from pointer without a cast > arch/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 -- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev