Skip to content

Commit b821c5f

Browse files
chleroyScott Wood
authored and
Scott Wood
committed
powerpc/8xx: Use SPRG2 instead of DAR for saving r3
We now have SPRG2 available as in it not used anymore for saving CR, so we don't need to crash DAR anymore for saving r3 for CPU6 ERRATA handling. Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Scott Wood <[email protected]>
1 parent 2eb2fd9 commit b821c5f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

arch/powerpc/kernel/head_8xx.S

+4-5
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ SystemCall:
309309

310310
InstructionTLBMiss:
311311
#ifdef CONFIG_8xx_CPU6
312-
mtspr SPRN_DAR, r3
312+
mtspr SPRN_SPRG_SCRATCH2, r3
313313
#endif
314314
EXCEPTION_PROLOG_0
315315

@@ -362,16 +362,15 @@ InstructionTLBMiss:
362362

363363
/* Restore registers */
364364
#ifdef CONFIG_8xx_CPU6
365-
mfspr r3, SPRN_DAR
366-
mtspr SPRN_DAR, r11 /* Tag DAR */
365+
mfspr r3, SPRN_SPRG_SCRATCH2
367366
#endif
368367
EXCEPTION_EPILOG_0
369368
rfi
370369

371370
. = 0x1200
372371
DataStoreTLBMiss:
373372
#ifdef CONFIG_8xx_CPU6
374-
mtspr SPRN_DAR, r3
373+
mtspr SPRN_SPRG_SCRATCH2, r3
375374
#endif
376375
EXCEPTION_PROLOG_0
377376
mfcr r10
@@ -438,7 +437,7 @@ DataStoreTLBMiss:
438437

439438
/* Restore registers */
440439
#ifdef CONFIG_8xx_CPU6
441-
mfspr r3, SPRN_DAR
440+
mfspr r3, SPRN_SPRG_SCRATCH2
442441
#endif
443442
mtspr SPRN_DAR, r11 /* Tag DAR */
444443
EXCEPTION_EPILOG_0

0 commit comments

Comments
 (0)