powerpc/8xx: Use SPRN_SPRG_SCRATCH2 in ITLB miss exception
In order to re-enable MMU earlier, ensure ITLB miss exception cannot clobber SPRN_SPRG_SCRATCH0 and SPRN_SPRG_SCRATCH1. Do so by using SPRN_SPRG_SCRATCH2 and SPRN_M_TW instead, like the DTLB miss exception. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/abc78e8e9577d473691ebb9996c6413b37bfd9ca.1606231483.git.christophe.leroy@csgroup.eu
This commit is contained in:
committed by
Michael Ellerman
parent
576e02bbf1
commit
a314ea5abf
@ -165,9 +165,9 @@ static void mpc8xx_pmu_del(struct perf_event *event, int flags)
|
||||
break;
|
||||
case PERF_8xx_ID_ITLB_LOAD_MISS:
|
||||
if (atomic_dec_return(&itlb_miss_ref) == 0) {
|
||||
/* mfspr r10, SPRN_SPRG_SCRATCH0 */
|
||||
/* mfspr r10, SPRN_SPRG_SCRATCH2 */
|
||||
struct ppc_inst insn = ppc_inst(PPC_INST_MFSPR | __PPC_RS(R10) |
|
||||
__PPC_SPR(SPRN_SPRG_SCRATCH0));
|
||||
__PPC_SPR(SPRN_SPRG_SCRATCH2));
|
||||
|
||||
patch_instruction_site(&patch__itlbmiss_exit_1, insn);
|
||||
}
|
||||
|
Reference in New Issue
Block a user