summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/exceptions-64s.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-02 11:33:52 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-03-09 10:55:20 +1100
commitd9ada91ae2969ae6b6dc3574fd08a6ebda5df766 (patch)
treea4509657892acb0b853760d6d26729a913a5fc2b /arch/powerpc/kernel/exceptions-64s.S
parent9424fabf8617c15e18a5ffd29bc3bcfa36620473 (diff)
downloadlinux-d9ada91ae2969ae6b6dc3574fd08a6ebda5df766.tar.bz2
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>
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64s.S')
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 0fb42ae21694..02448ea58ad3 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -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