[U-Boot] [PATCH v3 02/10] armv7: add miscellaneous utility macros

Wolfgang Denk wd at denx.de
Mon May 16 17:52:37 CEST 2011


Dear Simon Glass,

In message <BANLkTin6o4OEp7aBfCsxpt=z5oZToxVE2g at mail.gmail.com> you wrote:
>
> I believe the problem here is the read/modify/write behaviour which is not
> well-defined in C. One ends up using volatile to ensure the right behaviour,
> and then this doesn't necessarily work either. Where one write must happen

volatile does not help anything here. You MUST always make sure to
use proper I/O accessors. Even in ARM code this has become mandatory
by now, even if older ARM cores and compilers have been forgiving
enough for a long time.

> Perhaps in newer compilers bitfield semantics have been improved?

Bitfields have always been a mess, and should be avoided like hell.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are three things I always forget. Names, faces -  the  third  I
can't remember.                                         - Italo Svevo


More information about the U-Boot mailing list