Re: [PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-09 Thread Becky Bruce
On Sep 9, 2008, at 5:13 PM, Christoph Hellwig wrote: On Wed, Sep 10, 2008 at 08:10:31AM +1000, Benjamin Herrenschmidt wrote: Yeah, the statement this time should be why do you keep _single :) It don't really mind which one we keep, but having both and both optional seems rather odd. It wo

Re: [PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-09 Thread Christoph Hellwig
On Wed, Sep 10, 2008 at 08:10:31AM +1000, Benjamin Herrenschmidt wrote: > > > Yeah, the statement this time should be why do you keep _single :) > > It don't really mind which one we keep, but having both and both > > optional seems rather odd. > > It would be more logic to implement _single on t

Re: [PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-09 Thread Benjamin Herrenschmidt
> Yeah, the statement this time should be why do you keep _single :) > It don't really mind which one we keep, but having both and both > optional seems rather odd. It would be more logic to implement _single on top of _page.. as long as we can still do sub-page mappings (needed on ppc64) which I

Re: [PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-09 Thread Christoph Hellwig
On Tue, Sep 09, 2008 at 09:39:20AM -0500, Becky Bruce wrote: > because you asked me to have just map/unmap_page in your review > of an earlier rev of this patch series in May? :) I don't actually > expect you to remember this, because it was a long time ago, but > here's the relevant ch

Re: [PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-09 Thread Becky Bruce
On Sep 8, 2008, at 5:03 PM, Christoph Hellwig wrote: - if (unlikely(dev == NULL || dev->archdata.dma_ops == NULL)) + + if (unlikely(dev == NULL) || dev->archdata.dma_ops == NULL) { +#ifdef CONFIG_PPC64 return NULL; +#else + /* Use default on 32-bit if d

Re: [PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-09 Thread Benjamin Herrenschmidt
On Tue, 2008-09-09 at 00:03 +0200, Christoph Hellwig wrote: > > - if (unlikely(dev == NULL || dev->archdata.dma_ops == NULL)) > > + > > + if (unlikely(dev == NULL) || dev->archdata.dma_ops == NULL) { > > +#ifdef CONFIG_PPC64 > > return NULL; > > +#else > > + /* Use default

Re: [PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-08 Thread Christoph Hellwig
> - if (unlikely(dev == NULL || dev->archdata.dma_ops == NULL)) > + > + if (unlikely(dev == NULL) || dev->archdata.dma_ops == NULL) { > +#ifdef CONFIG_PPC64 > return NULL; > +#else > + /* Use default on 32-bit if dma_ops is not set up */ > + return &dma

[PATCH 4/4] POWERPC: Merge 32 and 64-bit dma code

2008-09-08 Thread Becky Bruce
We essentially adopt the 64-bit dma code, with some changes to support 32-bit systems, including HIGHMEM. dma functions on 32-bit are now invoked via accessor functions which call the correct op for a device based on archdata dma_ops. If there is no archdata dma_ops, this defaults to dma_direct_o