Hi Wolfgang and all,

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().

For example, if the device driver using x86 io emulation like in/out, the
macro will be expanded to
__raw_read()/__raw_write(), then finally will be replaced with
__arch_get()/__arch_put().
If we do not add volatile to __arch_get()/__arch_put() functions, the
in/out behavior will be incorrect.

I think the volatile still needed to be add back to these __arch_xxx macros
if the x86 io emulation functions shouldn't be re-written.
Do you have other suggestion?
Thanks!

-- 
Best regards,
Macpaul Lin
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to