[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] Re: [PATCH 36/56] microblaze_v2: dma support
- To: Arnd Bergmann <arnd@xxxxxxxx>
- Subject: [microblaze-uclinux] Re: [PATCH 36/56] microblaze_v2: dma support
- From: Michal Simek <monstr@xxxxxxxxx>
- Date: Tue, 06 May 2008 15:20:13 +0200
- Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, John Williams <john.williams@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, stephen.neuendorffer@xxxxxxxxxx, John.Linn@xxxxxxxxxx, matthew@xxxxxx, will.newton@xxxxxxxxx, drepper@xxxxxxxxxx, microblaze-uclinux@xxxxxxxxxxxxxx, grant.likely@xxxxxxxxxxxx
- In-reply-to: <200805061324.06282.arnd@xxxxxxxx>
- References: <1209901305-6404-1-git-send-email-monstr@xxxxxxxxx> <48202AB6.4010201@xxxxxxxxx> <Pine.LNX.4.64.0805061317120.10091@anakin> <200805061324.06282.arnd@xxxxxxxx>
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
- User-agent: Thunderbird 2.0.0.14 (Windows/20080421)
Hi all,
here is proposed struct.
struct scatterlist {
dma_addr_t dma_address;
unsigned long page_link;
#ifdef CONFIG_DEBUG_SG
unsigned long sg_magic;
#endif
unsigned int length;
unsigned int offset;
};
Is it OK now?
Michal
>>> 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.
>
> Arnd <><
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/