Subject: Recommended functions for accessing internal registers

From: Fortini Matteo <[email-masked]>
Date: Tue, 1 Dec 2009 17:44:21 +0100

I see that throughout the kernel source, internal PPC registers are 
accessed through [in|out]_be[32|16|8]() functions. However, they are 
translated into 3 inline assembly instructions, one of which is an 
isync, which has a huge performance hit.
I tried using readl_be() which seems to be the right function according 
to the Documentation/ dir, but it is translated directly to in_be32(), 
so no luck.

Is it really necessary to use all those instructions? I know I could use 
a (volatile u32 *) variable to avoid subsequent read/writes to be 
optimized out, but it seems to be a deprecated use.

Thank you in advance,
Matteo