aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-11-13 09:43:52 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-11-13 09:45:03 -0500
commitb89031e087a47819be48028e62cebade5f9fb75b (patch)
tree9dad3fee30d0d7092ca48357bccaa34237179dde
parentccaf6553963bc6304d5820962a08a4397d0a2dc2 (diff)
[S390] reset cputime accounting after IPL from NSS
After an IPL from NSS the uptime of the system is incorrect. The reason is that the startup code in head.S is not executed in case of an IPL from NSS. Due to that sched_clock_base_cc which is used to initialze wall_to_monotonic contains the time stamp when the NSS has been created instead of the time stamp of the system start. Reinitialize the cputime accounting values in create_kernel_nss after the SAVESYS CP command that created the NSS segment. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/early.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index bf8b4ae7ff2d..e49e9e0c69fd 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -55,6 +55,7 @@ static void __init reset_tod_clock(void)
55 disabled_wait(0); 55 disabled_wait(0);
56 56
57 sched_clock_base_cc = TOD_UNIX_EPOCH; 57 sched_clock_base_cc = TOD_UNIX_EPOCH;
58 S390_lowcore.last_update_clock = sched_clock_base_cc;
58} 59}
59 60
60#ifdef CONFIG_SHARED_KERNEL 61#ifdef CONFIG_SHARED_KERNEL
@@ -167,6 +168,14 @@ static noinline __init void create_kernel_nss(void)
167 return; 168 return;
168 } 169 }
169 170
171 /* re-initialize cputime accounting. */
172 sched_clock_base_cc = get_clock();
173 S390_lowcore.last_update_clock = sched_clock_base_cc;
174 S390_lowcore.last_update_timer = 0x7fffffffffffffffULL;
175 S390_lowcore.user_timer = 0;
176 S390_lowcore.system_timer = 0;
177 asm volatile("SPT 0(%0)" : : "a" (&S390_lowcore.last_update_timer));
178
170 /* re-setup boot command line with new ipl vm parms */ 179 /* re-setup boot command line with new ipl vm parms */
171 ipl_update_parameters(); 180 ipl_update_parameters();
172 setup_boot_command_line(); 181 setup_boot_command_line();