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

2010-08-20 Thread Albert ARIBAUD
Le 19/08/2010 07:58, Mike Frysinger a écrit : On Wednesday, August 18, 2010 16:36:39 Albert ARIBAUD wrote: Le 18/08/2010 19:54, Mike Frysinger a écrit : On Wed, Aug 18, 2010 at 1:46 PM, Albert ARIBAUD wrote: Le 18/08/2010 18:46, Mike Frysinger a écrit : you need to include linux/compiler.h

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

2010-08-18 Thread Albert ARIBAUD
Le 14/08/2010 19:42, Mike Frysinger a écrit : 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]; +

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

2010-08-18 Thread Mike Frysinger
On Wed, Aug 18, 2010 at 8:49 AM, Albert ARIBAUD wrote: Le 14/08/2010 19:42, Mike Frysinger a écrit : 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)  { -    

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

2010-08-18 Thread Albert ARIBAUD
Le 18/08/2010 18:46, Mike Frysinger a écrit : On Wed, Aug 18, 2010 at 8:49 AM, Albert ARIBAUD wrote: Le 14/08/2010 19:42, Mike Frysinger a écrit : 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,

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

2010-08-18 Thread Mike Frysinger
On Wed, Aug 18, 2010 at 1:46 PM, Albert ARIBAUD wrote: Le 18/08/2010 18:46, Mike Frysinger a écrit : you need to include linux/compiler.h first ... but i would have thought this be a header already included globally.  maybe that's a new topic to start. I don't understand why I should

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

2010-08-18 Thread Albert ARIBAUD
Le 18/08/2010 19:54, Mike Frysinger a écrit : On Wed, Aug 18, 2010 at 1:46 PM, Albert ARIBAUD wrote: Le 18/08/2010 18:46, Mike Frysinger a écrit : you need to include linux/compiler.h first ... but i would have thought this be a header already included globally. maybe that's a new topic to

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

2010-08-18 Thread Mike Frysinger
On Wednesday, August 18, 2010 16:36:39 Albert ARIBAUD wrote: Le 18/08/2010 19:54, Mike Frysinger a écrit : On Wed, Aug 18, 2010 at 1:46 PM, Albert ARIBAUD wrote: Le 18/08/2010 18:46, Mike Frysinger a écrit : you need to include linux/compiler.h first ... but i would have thought this be a

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

2010-08-14 Thread Albert Aribaud
Commit 64419e47518bbba059c80b77558f93ad4804145c aliases the uint16_t usp and uint32_t uip variables in print_buffer() to uint8_t variable linebuf without aligning it to an uint32_t address, thus causing data aborts on ARM when doing md.l on 32-bit wide area (and probably 16-bit wide as well).

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

2010-08-14 Thread Mike Frysinger
On Sat, Aug 14, 2010 at 4:11 AM, Albert Aribaud wrote: Commit  64419e47518bbba059c80b77558f93ad4804145c aliases the uint16_t usp and uint32_t uip variables in print_buffer() to uint8_t variable linebuf without aligning it to an uint32_t address, thus causing data aborts on ARM when doing md.l

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

2010-08-14 Thread Albert ARIBAUD
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] +

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

2010-08-14 Thread Mike Frysinger
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] +