aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-04-13 23:59:02 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-14 07:11:22 -0400
commit320787c75ccac3189a1b7aae81f0efc1055f6d3a (patch)
treee4e6f029fc4633ef184b9af94189236a6f5ea136 /arch/powerpc/kernel
parentac7c5353b189e10cf5dd27399f64f7b013abffc6 (diff)
[POWERPC] Fix handling of unrecoverable SLB miss interrupts
If an SLB miss interrupt happens while the RI bit of MSR is zero, we can't just return, because RI being zero indicates that SRR0/SRR1 potentially had live values in them, and the process of taking an interrupt overwrites them. This should never happen, but if it does, we try to print a nice oops message. That doesn't work, however, because the code at unrecov_slb assumes that the MMU has been turned on, but we call it with the MMU off (and have done so since the SLB miss handler was rewritten to run without turning the MMU on) -- except on iSeries, where everything runs with the MMU on. This fixes it by adding the necessary code to turn the MMU on if necessary. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/head_64.S18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index d3aee08e6814..43a38d89eafc 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -621,7 +621,7 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
621 mtlr r10 621 mtlr r10
622 622
623 andi. r10,r12,MSR_RI /* check for unrecoverable exception */ 623 andi. r10,r12,MSR_RI /* check for unrecoverable exception */
624 beq- unrecov_slb 624 beq- 2f
625 625
626.machine push 626.machine push
627.machine "power4" 627.machine "power4"
@@ -643,6 +643,22 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
643 rfid 643 rfid
644 b . /* prevent speculative execution */ 644 b . /* prevent speculative execution */
645 645
6462:
647#ifdef CONFIG_PPC_ISERIES
648BEGIN_FW_FTR_SECTION
649 b unrecov_slb
650END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
651#endif /* CONFIG_PPC_ISERIES */
652 mfspr r11,SPRN_SRR0
653 clrrdi r10,r13,32
654 LOAD_HANDLER(r10,unrecov_slb)
655 mtspr SPRN_SRR0,r10
656 mfmsr r10
657 ori r10,r10,MSR_IR|MSR_DR|MSR_RI
658 mtspr SPRN_SRR1,r10
659 rfid
660 b .
661
646unrecov_slb: 662unrecov_slb:
647 EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) 663 EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB)
648 DISABLE_INTS 664 DISABLE_INTS