Recommended functions for accessing internal registers
Fortini Matteo
matteo.fortini at mta.it
Wed Dec 2 03:44:21 EST 2009
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
More information about the Linuxppc-dev
mailing list