linux-mips
[Top] [All Lists]

Re: [PATCH] mips: Add dma_mmap_coherent()

To: Joel Soete <soete.joel@scarlet.be>
Subject: Re: [PATCH] mips: Add dma_mmap_coherent()
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 26 Aug 2008 17:25:24 +0200
Cc: "James.Bottomley" <James.Bottomley@HansenPartnership.com>, linux-mips <linux-mips@linux-mips.org>, ralf <ralf@linux-mips.org>, linux-parisc <linux-parisc@vger.kernel.org>
In-reply-to: <48B0678E.9010208@scarlet.be>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <K6047O$07C3A675C0E02FC7BE973C0D5DEF9AAA@scarlet.be> <s5hy72pmefh.wl%tiwai@suse.de> <48B0678E.9010208@scarlet.be>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (Sanjō) APEL/10.6 Emacs/22.2 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI)
At Sat, 23 Aug 2008 19:39:58 +0000,
Joel Soete wrote:
> 
> Hello Takashi,
> 
> Takashi Iwai wrote:
> > At Fri, 22 Aug 2008 13:04:36 +0100,
> > Joel Soete wrote:
> >> Hello Takashi et al.,
> > ...
> >> I build and boot successfully kernel 32bit including your patch on 2 
> >> systems
> >> (a b2k using sba and a d380 using ccio).
> > 
> > Thanks for testing!
> > 
> welcome ;-)
> 
> >> I just noticed that the above code is ~ the same; otoh there is also a
> >> iommu-helpers.h containing also common code to those 2 drivers. So may be 
> >> for
> >> easiest maintenance, could you merge and move this code in this 'helper' as
> >> follow:
> >> --- ./drivers/parisc/iommu-helpers.h.Orig  2008-08-01 12:57:22.000000000 
> >> +0000
> >> +++ ./drivers/parisc/iommu-helpers.h       2008-08-22 08:07:26.000000000 
> >> +0000
> > 
> > That sounds like a good idea.
> > 
> > One concern is to define a non-inline function in *.h.  But,
> 
> Yes (I thought too but didn't find any other good reason then avoiding 
> useless duplicate code)
> 
> > iommu-helper.h is included only by these two drivers, so there is no
> > problem as now, although a comment would be more helpful.
> > 
> Yes I hope it will be enough for this stuff to be accepted ;-)

I, too :)

Now updated my git tree:
    
http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git;a=shortlog;h=topic/dma-fix
I'll post each patch again if preferred.


Do you guys see any pending issues?  I'd love to merge these patches
into the upstream for 2.6.28.

To get things clear -- I don't intend to fix the problem of mmap on
every non-coherent platform perfectly (yet).  Instead, this patch
series is intended to fix the current behavior, at least, for the
sound drivers not to crash unconditionally.  It provides a (minimal)
way to mmap the pages taken via dma_alloc_coherent().


Thanks,

Takashi

<Prev in Thread] Current Thread [Next in Thread>