linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RFC: dma_mmap_coherent() for powerpc/ppc architecture and ALSA?
@ 2006-06-09 18:01 Gerhard Pircher
  2006-06-10  0:34 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Gerhard Pircher @ 2006-06-09 18:01 UTC (permalink / raw)
  To: linuxppc-dev, linux-kernel

Hi,

I'm trying to adapt Linux for the AmigaOne, which is a G3/G4 PPC desktop system with a non cache coherent northbridge (MAI ArticiaS), a VIA82C686B southbridge and the U-boot firmware. Due to the cache coherency problem I compiled in the CONFIG_NOT_COHERENT_CACHE option (arch/ppc/kernel/dma-mapping.c) in the AmigaOne Linux kernel.

While that fixes the DMA data corruption problem, it causes a kernel oops or a complete system lookup after starting sound playback. With kernel versions =<2.6.14 the oops messages refered to a BUG() entry in mm/rmap.c. Therefore I tried out a newer kernel (2.6.16.15), where the oops refers to the ALSA function snd_pcm_mmap_data_nopage() implemented in pcm_native.c.

Well, after searching a while in some old linux kernel threads, I found this thread here:
http://www.thisishull.net/showthread.php?t=22080&page=3&pp=10

Based on the information in this thread, I came to the conclusion that ALSA simply won't work on non cache coherent architectures (except ARM), because the generic DMA API was never expanded to support the functionality required by ALSA (namely mapping dma pages into user space with dma_mmap_coherent()).

This leads me to the question, if there are any plans to include the dma_mmap_coherent() function (for powerpc/ppc and/or any other platform) in one of the next kernel versions and if an adapation of the ALSA drivers is planned. Or is there a simple way (hack) to fix this problem?

Thanks!

Regards,

Gerhard

-- 
--
-- email : gerhard_pircher -AT- gmx -DOT- net
--

Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Re: RFC: dma_mmap_coherent() for powerpc/ppc architecture and ALSA?
@ 2006-06-10  8:22 Gerhard Pircher
  2006-06-12 10:51 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Gerhard Pircher @ 2006-06-10  8:22 UTC (permalink / raw)
  To: Lee Revell, benh; +Cc: linuxppc-dev, alsa-devel, linux-kernel

> -------- Original-Nachricht --------
> Datum: Fri, 09 Jun 2006 20:46:32 -0400
> Von: Lee Revell <rlrevell@joe-job.com>
> An: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Betreff: Re: RFC: dma_mmap_coherent() for powerpc/ppc architecture and 
> ALSA?
> 
> On Sat, 2006-06-10 at 10:34 +1000, Benjamin Herrenschmidt wrote:
> > > This leads me to the question, if there are any plans to include the 
> > > dma_mmap_coherent() function (for powerpc/ppc and/or any other
> > > platform) in one of the next kernel versions and if an adapation of
> > > the ALSA drivers is planned. Or is there a simple way (hack) to fix
> > > this problem?
> > 
> > You are welcome to do a patch implementing this :)
> 
> Please cc: alsa-devel when you do so.

:)

Well, implementing the dma_mmap_coherent() function isn't the problem, because it is already implemented for the ARM architecture. But as far as I understand this would require a rewrite of all the ALSA drivers (or at least a rewrite of the ALSA's DMA helper functions).

Original mail included for alsa-devel mailing list:

> I'm trying to adapt Linux for the AmigaOne, which is a G3/G4 PPC desktop 
> system with a non cache coherent northbridge (MAI ArticiaS), a VIA82C686B 
> southbridge and the U-boot firmware. Due to the cache coherency problem I 
> compiled in the CONFIG_NOT_COHERENT_CACHE option
> (arch/ppc/kernel/dma-mapping.c) in the AmigaOne Linux kernel.

> While that fixes the DMA data corruption problem, it causes a kernel oops 
> or a complete system lookup after starting sound playback. With kernel
> versions =<2.6.14 the oops messages refered to a BUG() entry in
> mm/rmap.c. Therefore I tried out a newer kernel (2.6.16.15), where the
> oops refers to the ALSA function snd_pcm_mmap_data_nopage() implemented
> in pcm_native.c.

> Well, after searching a while in some old linux kernel threads, I found
> this thread here:
> http://www.thisishull.net/showthread.php?t=22080&page=3&pp=10

> Based on the information in this thread, I came to the conclusion that
> ALSA simply won't work on non cache coherent architectures (except ARM),
> because the generic DMA API was never expanded to support the
> functionality required by ALSA (namely mapping dma pages into user space > with dma_mmap_coherent()).

> This leads me to the question, if there are any plans to include the
> dma_mmap_coherent() function (for powerpc/ppc and/or any other platform)
> in one of the next kernel versions and if an adapation of the ALSA
> drivers is planned. Or is there a simple way (hack) to fix this problem?

Gerhard

-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-06-12 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-09 18:01 RFC: dma_mmap_coherent() for powerpc/ppc architecture and ALSA? Gerhard Pircher
2006-06-10  0:34 ` Benjamin Herrenschmidt
2006-06-10  0:46   ` Lee Revell
  -- strict thread matches above, loose matches on Subject: below --
2006-06-10  8:22 Gerhard Pircher
2006-06-12 10:51 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).