summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/optprobes_head.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/optprobes_head.S')
-rw-r--r--arch/powerpc/kernel/optprobes_head.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/optprobes_head.S b/arch/powerpc/kernel/optprobes_head.S
index 53e429b5a29d..4937bef7652f 100644
--- a/arch/powerpc/kernel/optprobes_head.S
+++ b/arch/powerpc/kernel/optprobes_head.S
@@ -65,6 +65,13 @@ optprobe_template_entry:
mfdsisr r5
std r5,_DSISR(r1)
+ /*
+ * We may get here from a module, so load the kernel TOC in r2.
+ * The original TOC gets restored when pt_regs is restored
+ * further below.
+ */
+ ld r2,PACATOC(r13)
+
.global optprobe_template_op_address
optprobe_template_op_address:
/*