Re: [PATCH 36/56] microblaze_v2: dma support

Arnd Bergmann
2008-05-06T11:25:16Z

On Tuesday 06 May 2008, Geert Uytterhoeven wrote:
> > struct scatterlist {
> >       unsigned long page_link;
> >       unsigned int    offset;
> >       unsigned int    length;
> >       dma_addr_t      dma_address;
> > };
>
> If unsigned long is 32-bit but dma_addr_t is 64-bit, there may be a gap
> between length and dma_address.
>

But moving dma_address to the front only has the effect to create implicit
padding at the end of struct scatterlist, so you don't gain anything
either way.

It's only an internal definition that can be changed at any time without
breaking applications, so I wouldn't worry about it, and better leave
it identical to the other architectures.

The one thing that should indeed be changed is the addition of
'unsigned long sg_magic' that is needed for CONFIG_DEBUG_SG.