Commit 63d60d0c authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

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: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent b0b2a93d
...@@ -183,19 +183,19 @@ END_FTR_SECTION_NESTED(ftr,ftr,943) ...@@ -183,19 +183,19 @@ END_FTR_SECTION_NESTED(ftr,ftr,943)
.endif .endif
.if \hsrr .if \hsrr
mfspr r11,SPRN_HSRR0 /* save HSRR0 */ mfspr r11,SPRN_HSRR0 /* save HSRR0 */
mfspr r12,SPRN_HSRR1 /* and HSRR1 */
mtspr SPRN_HSRR1,r10
.else .else
mfspr r11,SPRN_SRR0 /* save SRR0 */ mfspr r11,SPRN_SRR0 /* save SRR0 */
mfspr r12,SPRN_SRR1 /* and SRR1 */
mtspr SPRN_SRR1,r10
.endif .endif
LOAD_HANDLER(r12, \label\()) LOAD_HANDLER(r10, \label\())
.if \hsrr .if \hsrr
mtspr SPRN_HSRR0,r12 mtspr SPRN_HSRR0,r10
mfspr r12,SPRN_HSRR1 /* and HSRR1 */
mtspr SPRN_HSRR1,r10
HRFI_TO_KERNEL HRFI_TO_KERNEL
.else .else
mtspr SPRN_SRR0,r12 mtspr SPRN_SRR0,r10
mfspr r12,SPRN_SRR1 /* and SRR1 */
mtspr SPRN_SRR1,r10
RFI_TO_KERNEL RFI_TO_KERNEL
.endif .endif
b . /* prevent speculative execution */ b . /* prevent speculative execution */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment