From: "Gerhard Pircher" <gerhard_pircher@gmx.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org
Cc: tiwai@suse.de
Subject: Re: [PATCH] powerpc: Implement dma_mmap_coherent()
Date: Thu, 31 Mar 2011 22:39:21 +0200 [thread overview]
Message-ID: <20110331203921.56030@gmx.net> (raw)
-------- Original-Nachricht --------
> Datum: Fri, 25 Mar 2011 17:50:06 +1100
> Von: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> An: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
> CC: Takashi Iwai <tiwai@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 <benh@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
next reply other threads:[~2011-03-31 20:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 20:39 Gerhard Pircher [this message]
2011-03-31 21:05 ` [PATCH] powerpc: Implement dma_mmap_coherent() Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2011-03-25 6:50 Benjamin Herrenschmidt
2011-03-25 8:06 ` Takashi Iwai
2011-03-25 9:11 ` Benjamin Herrenschmidt
2011-03-25 9:13 ` Takashi Iwai
2011-03-29 0:30 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110331203921.56030@gmx.net \
--to=gerhard_pircher@gmx.net \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.