summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2019-06-28 15:33:21 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2019-07-02 21:39:48 +1000
commit63d60d0c6946fd6874a099540e0ac9e26661f8dd (patch)
treed96eecbe758ecd71a643174b26e09e0293b0abb8 /arch/powerpc/kernel
parentb0b2a93da4c95ac808c4c43f24a1873ae3166a1a (diff)
downloadlinux-stable-63d60d0c6946fd6874a099540e0ac9e26661f8dd.tar.gz
linux-stable-63d60d0c6946fd6874a099540e0ac9e26661f8dd.tar.bz2
linux-stable-63d60d0c6946fd6874a099540e0ac9e26661f8dd.zip
powerpc/64s/exception: avoid SPR RAW scoreboard stall in real mode entry
Move SPR reads ahead of writes. Real mode entry that is not a KVM guest is rare these days, but bad practice propagates. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 564a77039701..3735b9d1bb65 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -183,19 +183,19 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
.endif
.if \hsrr
mfspr r11,SPRN_HSRR0 /* save HSRR0 */
+ mfspr r12,SPRN_HSRR1 /* and HSRR1 */
+ mtspr SPRN_HSRR1,r10
.else
mfspr r11,SPRN_SRR0 /* save SRR0 */
+ mfspr r12,SPRN_SRR1 /* and SRR1 */
+ mtspr SPRN_SRR1,r10
.endif
- LOAD_HANDLER(r12, \label\())
+ LOAD_HANDLER(r10, \label\())
.if \hsrr
- mtspr SPRN_HSRR0,r12
- mfspr r12,SPRN_HSRR1 /* and HSRR1 */
- mtspr SPRN_HSRR1,r10
+ mtspr SPRN_HSRR0,r10
HRFI_TO_KERNEL
.else
- mtspr SPRN_SRR0,r12
- mfspr r12,SPRN_SRR1 /* and SRR1 */
- mtspr SPRN_SRR1,r10
+ mtspr SPRN_SRR0,r10
RFI_TO_KERNEL
.endif
b . /* prevent speculative execution */