diff options
author | Milton Miller <miltonm@bga.com> | 2007-12-14 15:52:20 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 16:15:46 +1100 |
commit | 53024fe250a0f044b114844a01456902bce40ade (patch) | |
tree | dd4b4c6165523bbb20767a192bc01681e370e009 /arch/powerpc/kernel/pci_64.c | |
parent | db3801a858e97adee0f3b4c732e6ff325d95e0a5 (diff) |
[POWERPC] Optimize account_system_vtime
We have multiple calls to has_feature being inlined, but gcc can't
be sure that the store via get_paca() doesn't alias the path to
cur_cpu_spec->feature.
Reorder to put the calls to read_purr and read_spurr adjacent to each
other. To add a sense of consistency, reorder the remaining lines to
perform parallel steps on purr and scaled purr of each line instead of
calculating and then using one value before going on to the next.
In addition, we can tell gcc that no SPURR means no PURR. The test is
completely hidden in the PURR case, and in the !PURR case the second test
is eliminated resulting in the simple register copy in the out-of-line
branch.
Further, gcc sees get_paca()->system_time referenced several times and
allocates a register to address it (shadowing r13) instead of caching its
value. Reading into a local varable saves the shadow of r13 and removes
a potentially duplicate load (between the nested if and its parent).
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
0 files changed, 0 insertions, 0 deletions