aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2011-05-10 11:13:39 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-05-10 11:13:42 -0400
commit8eb4bd666ffdca7171cd8118138a91842012b028 (patch)
treec362b8e8ea64731854a2e894777252f315eca1dc /arch/s390/kernel
parentaade6c0dfb46ff7ce7df0ed7a2ef15d2d3c47f05 (diff)
[S390] kernel: Initialize register 14 when starting new CPU
When starting a new CPU we currently jump to start_secondary() without setting register 14 (the return address) correctly. Therefore on the stack frame for start_secondary an invalid return address is stored. This leads to wrong stack back traces in kernel dumps. Example: #00 [1f33fe48] cpu_idle at 10614a #01 [1f33fe90] start_secondary at 54fa88 #02 [1f33feb8] (null) at 0 <--- invalid To fix this start_secondary() is called now with basr/brasl that sets register 14 correctly. The output of the stack backtrace looks then like the following: #00 [1f33fe48] cpu_idle at 10614a #01 [1f33fe90] start_secondary at 54fa88 #02 [1f33feb8] restart_base at 54f41e <--- correct Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/entry.S2
-rw-r--r--arch/s390/kernel/entry64.S2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 648f64239a9d..1b67fc6ebdc2 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -836,7 +836,7 @@ restart_base:
836 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on 836 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
837 basr %r14,0 837 basr %r14,0
838 l %r14,restart_addr-.(%r14) 838 l %r14,restart_addr-.(%r14)
839 br %r14 # branch to start_secondary 839 basr %r14,%r14 # branch to start_secondary
840restart_addr: 840restart_addr:
841 .long start_secondary 841 .long start_secondary
842 .align 8 842 .align 8
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 9d3603d6c511..9fd864563499 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -841,7 +841,7 @@ restart_base:
841 mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1) 841 mvc __LC_SYSTEM_TIMER(8),__TI_system_timer(%r1)
842 xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER 842 xc __LC_STEAL_TIMER(8),__LC_STEAL_TIMER
843 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on 843 stosm __SF_EMPTY(%r15),0x04 # now we can turn dat on
844 jg start_secondary 844 brasl %r14,start_secondary
845 .align 8 845 .align 8
846restart_vtime: 846restart_vtime:
847 .long 0x7fffffff,0xffffffff 847 .long 0x7fffffff,0xffffffff