[U-Boot] [PATCH] Align linebuf to avoid misaligned aliases of it

Mike Frysinger vapier at gentoo.org
Sat Aug 14 19:42:36 CEST 2010


On Sat, Aug 14, 2010 at 4:33 AM, Albert ARIBAUD wrote:
> Le 14/08/2010 10:25, Mike Frysinger a écrit :
>>>  int print_buffer (ulong addr, void* data, uint width, uint count, uint
>>> linelen)
>>>  {
>>> -       uint8_t linebuf[MAX_LINE_LENGTH_BYTES + 1];
>>> +       uint8_t linebuf[MAX_LINE_LENGTH_BYTES + 1]
>>> +               __attribute__((__aligned__(sizeof(uint32_t))));
>>
>> __aligned(sizeof(uint32_t))
>
> I based the __aligned__ on what's in post/cpu/ppc4xx/cache.c. What is the
> difference between __aligned and __aligned__?

i dont mean "__attribute__((__aligned(sizeof(uint32_t))))", i mean
"__aligned(sizeof(uint32_t))".  the linux compiler headers take care
of expanding it to an attribute.
-mike


More information about the U-Boot mailing list