[U-Boot] [RFC] Add volatile back to arch_getb(a) functions

Wolfgang Denk wd at denx.de
Wed Nov 23 07:30:48 CET 2011


Dear Macpaul Lin,

In message <CACCg+XPxHCpX5HNVMzEGk3rEfUtV9hNHjpBtLYW809+xUH-8oA at mail.gmail.com> you wrote:
>
> I've found that there is still a problem about taking volatile off in macro
> __arch_get()/__arch_put()
> on NDS32 based platforms.
> GCC will optimized the code if the driver call x86 io emulation functions
> if there is no volatile in __arch_get().

Do not use volatile constructs.  Instead, use proper memory barrier
instructions.

> --bcaec51dd69dc100b404b25e1791
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable

And _please_ stop sending HTML!

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
"They that can give up essential liberty to obtain a little temporary
saftey deserve neither liberty not saftey." - Benjamin Franklin, 1759


More information about the U-Boot mailing list