Re: [PATCHv4] DMAEngine: Define interleaved transfer request api

From: Russell King
Date: Tue Oct 18 2011 - 03:42:44 EST


On Tue, Oct 18, 2011 at 11:15:29AM +0530, Jassi Brar wrote:
> On 18 October 2011 02:37, Bounine, Alexandre <Alexandre.Bounine@xxxxxxx> wrote:
> > With item #1 above being a separate topic, I may have a problem with #2
> > as well: dma_addr_t is sized for the local platform and not guaranteed
> > to be a 64-bit value (which may be required by a target).
> > Agree with #3 (if #1 and #2 work).
> >
> Perhaps simply change dma_addr_t to u64 in dmaengine.h alone ?

That's just an idiotic suggestion - there's no other way to put that.
Let's have some sanity here.

dma_addr_t is the size of a DMA address for the CPU architecture being
built. This has no relationship to what any particular DMA engine uses.

DMA addresses are likely to be stored in scatter tables in memory, and
such structures should be defined using u32, u64 (even more bonus points
if you use le32 and le64), etc and not types which are dependent on the
CPU architecture.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/