powerpc: Replace mfmsr instructions with load from PACA kernel_msr field

On 64-bit, the mfmsr instruction can be quite slow, slower
than loading a field from the cache-hot PACA, which happens
to already contain the value we want in most cases.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt
2012-03-02 11:33:52 +11:00
parent 9424fabf86
commit d9ada91ae2
4 changed files with 10 additions and 15 deletions

View File

@@ -848,9 +848,8 @@ fast_exception_return:
REST_GPR(0, r1)
REST_8GPRS(2, r1)
mfmsr r10
rldicl r10,r10,48,1 /* clear EE */
rldicr r10,r10,16,61 /* clear RI (LE is 0 already) */
ld r10,PACAKMSR(r13)
clrrdi r10,r10,2 /* clear RI */
mtmsrd r10,1
mtspr SPRN_SRR1,r12