summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_64.S
diff options
context:
space:
mode:
authorMichael Ellerman2006-02-07 03:26:14 +0100
committerPaul Mackerras2006-02-07 11:51:53 +0100
commitf9b4045d6bbb109d066d127549b2beb38fd9bfc4 (patch)
treed7e45a43f9cf8270c2f37f5d62a92004fa5afa2c /arch/powerpc/kernel/head_64.S
parent[PATCH] powerpc: Cleanup, consolidating icache dirtying logic (diff)
downloadkernel-qcow2-linux-f9b4045d6bbb109d066d127549b2beb38fd9bfc4.tar.gz
kernel-qcow2-linux-f9b4045d6bbb109d066d127549b2beb38fd9bfc4.tar.xz
kernel-qcow2-linux-f9b4045d6bbb109d066d127549b2beb38fd9bfc4.zip
[PATCH] powerpc: Don't use toc in decrementer_iSeries_masked
Since 404849bbd2bfd62e05b36f4753f6e1af6050a824 we've been using LOAD_REG_ADDRBASE, which uses the toc pointer, in decrementer_iSeries_masked. This can explode if we take the decrementer interrupt while we're in a module, because the toc pointer in r2 will be the module's toc pointer. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r--arch/powerpc/kernel/head_64.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 308268466342..415659629394 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -749,11 +749,12 @@ iSeries_secondary_smp_loop:
.globl decrementer_iSeries_masked
decrementer_iSeries_masked:
+ /* We may not have a valid TOC pointer in here. */
li r11,1
ld r12,PACALPPACAPTR(r13)
stb r11,LPPACADECRINT(r12)
- LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy)
- lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12)
+ LOAD_REG_IMMEDIATE(r12, tb_ticks_per_jiffy)
+ lwz r12,0(r12)
mtspr SPRN_DEC,r12
/* fall through */