Is volatile always verboten for FSL QE structures?

Timur Tabi timur at freescale.com
Sat Oct 3 00:46:31 EST 2009


Michael Barkowski wrote:
> Just wondering - is there a case where using volatile for UCC parameter RAM for example will not work, or is the use of I/O accessors everywhere an attempt to be portable to other architectures?

'volatile' just doesn't really do what you think it should do.  The PowerPC architecture is too complicated w.r.t. ordering of reads and writes.  In other words, you can't trust it.

No one should be using 'volatile' to access I/O registers.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Linuxppc-dev mailing list