
17 Jan
2011
17 Jan
'11
10:59 p.m.
Dear Dirk Behme,
In message 4D2B3036.4010506@googlemail.com you wrote:
The question I was thinking about with my patch was "what's Right Thing?" ;)
The Right Thing i not to make specific assumptions how the compiler might handle volatile pointers.
It's my understanding that we don't fix read*() and write*() because they are broken. We touch them to work around a broken tool chain.
No. Please re-read volatile-considered-harmful.txt in the linux/Documentation directory: "accessing I/O memory directly through pointers is frowned upon and does not work on all architectures. Those accessors are written to prevent unwanted optimization".
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@denx.de
It is dangerous to be sincere unless you are also stupid.
- George Bernard Shaw