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>
This commit is contained in:
parent
b0b2a93da4
commit
63d60d0c69
@ -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 */
|
||||||
.else
|
|
||||||
mfspr r11,SPRN_SRR0 /* save SRR0 */
|
|
||||||
.endif
|
|
||||||
LOAD_HANDLER(r12, \label\())
|
|
||||||
.if \hsrr
|
|
||||||
mtspr SPRN_HSRR0,r12
|
|
||||||
mfspr r12,SPRN_HSRR1 /* and HSRR1 */
|
mfspr r12,SPRN_HSRR1 /* and HSRR1 */
|
||||||
mtspr SPRN_HSRR1,r10
|
mtspr SPRN_HSRR1,r10
|
||||||
HRFI_TO_KERNEL
|
|
||||||
.else
|
.else
|
||||||
mtspr SPRN_SRR0,r12
|
mfspr r11,SPRN_SRR0 /* save SRR0 */
|
||||||
mfspr r12,SPRN_SRR1 /* and SRR1 */
|
mfspr r12,SPRN_SRR1 /* and SRR1 */
|
||||||
mtspr SPRN_SRR1,r10
|
mtspr SPRN_SRR1,r10
|
||||||
|
.endif
|
||||||
|
LOAD_HANDLER(r10, \label\())
|
||||||
|
.if \hsrr
|
||||||
|
mtspr SPRN_HSRR0,r10
|
||||||
|
HRFI_TO_KERNEL
|
||||||
|
.else
|
||||||
|
mtspr SPRN_SRR0,r10
|
||||||
RFI_TO_KERNEL
|
RFI_TO_KERNEL
|
||||||
.endif
|
.endif
|
||||||
b . /* prevent speculative execution */
|
b . /* prevent speculative execution */
|
||||||
|
Loading…
Reference in New Issue
Block a user