linux-stable/arch/s390/kernel
Heiko Carstens f9a2f797fc [S390] cputime: fix lowcore initialization on cpu hotplug
On (initial) cpu hotplug the lowcore values for user_timer and
system_timer don't get initialized like they would get on each
process schedule.
On initial start of secondary cpus this leads to the situation
where per thread user/system_timer values are larger than the
corresponding contents of the lowcore. When later calculating
time spent in user/system context the result can be negative.

So for cpu hotplug we should manually initialize lowcore values.

Fixes this bug:

Kernel BUG at 000ec080 [verbose debug info unavailable]
fixpoint divide exception: 0009 [#1] PREEMPT SMP
Modules linked in:
CPU: 10 Not tainted 2.6.28 #4
Process sysctl (pid: 975, task: 3fa752e0, ksp: 3fbebca0)
Krnl PSW : 070c1000 800ec080 (show_stat+0x390/0x5fc)
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0
Krnl GPRS: 7fffffff fefc7ce5 3faec080 003879ae
           00000001 01388000 7fffffff 01388000
           00000000 00000000 0049ad50 3fbebcf8
           01388000 002f51a8 800ec1fe 3fbebcf8
Krnl Code: 800ec076: 9001b188           stm     %r0,%r1,392(%r11)
           800ec07a: 9801b0c0           lm      %r0,%r1,192(%r11)
           800ec07e: 1d05               dr      %r0,%r5
          >800ec080: 9001b0c0           stm     %r0,%r1,192(%r11)
           800ec084: 5860b0c4           l       %r6,196(%r11)
           800ec088: 1806               lr      %r0,%r6
           800ec08a: 8c800001           srdl    %r8,1
           800ec08e: 1d87               dr      %r8,%r7
Call Trace:
([<00000000000ec1ee>] show_stat+0x4fe/0x5fc)
 [<00000000000c13e8>] seq_read+0xc4/0x3ac
 [<00000000000e4796>] proc_reg_read+0x6e/0x9c
 [<00000000000a6a44>] vfs_read+0x78/0x100
 [<00000000000a6ba8>] sys_read+0x40/0x80
 [<00000000000234a8>] sysc_do_restart+0x1a/0x1e

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2009-01-23 16:40:28 +01:00
..
vdso32 [S390] gettimeofday.S: removed duplicated #includes 2009-01-09 12:15:04 +01:00
vdso64 [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID 2008-12-31 15:11:49 +01:00
asm-offsets.c [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID 2008-12-31 15:11:49 +01:00
audit.c [S390] Get rid of a bunch of sparse warnings again. 2007-10-12 16:13:06 +02:00
audit.h [S390] Get rid of a bunch of sparse warnings again. 2007-10-12 16:13:06 +02:00
base.S [S390] Convert memory detection into C code. 2007-02-05 21:18:37 +01:00
bitmap.S
compat_audit.c [S390] Get rid of a bunch of sparse warnings again. 2007-10-12 16:13:06 +02:00
compat_exec_domain.c [S390] Get rid of a lot of sparse warnings. 2007-02-05 21:16:47 +01:00
compat_linux.c CRED: Separate task security context from task_struct 2008-11-14 10:39:16 +11:00
compat_linux.h compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
compat_ptrace.h [S390] CVE-2008-1514: prevent ptrace padding area read/write in 31-bit mode 2008-09-09 12:39:06 +02:00
compat_signal.c [S390] fix system call parameter functions. 2008-11-27 11:06:56 +01:00
compat_wrapper.S [CVE-2009-0029] s390 specific system call wrappers 2009-01-14 14:15:32 +01:00
cpcmd.c [S390] convert cpcmd printks to pr_xxx macros. 2008-12-25 13:39:19 +01:00
crash.c [S390] Get rid of a lot of sparse warnings. 2007-02-05 21:16:47 +01:00
debug.c [S390] convert s390 debug feature printks to pr_xxx macros. 2008-12-25 13:39:22 +01:00
diag.c [S390] vmur: fix diag14 exceptions with addresses > 2GB. 2007-08-22 13:51:47 +02:00
dis.c [S390] disassembler: fix idte instruction format. 2008-05-30 10:03:36 +02:00
early.c [S390] Remove P390 support. 2008-07-14 10:02:25 +02:00
ebcdic.c [S390] Get rid of a lot of sparse warnings. 2007-02-05 21:16:47 +01:00
entry.h [CVE-2009-0029] s390 specific system call wrappers 2009-01-14 14:15:32 +01:00
entry.S [PATCH] improve idle cputime accounting 2008-12-31 15:11:48 +01:00
entry64.S [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID 2008-12-31 15:11:49 +01:00
head.S [S390] Add processor type march=z10 and a processor type safety check. 2008-12-25 13:39:12 +01:00
head31.S [S390] Remove initial kernel stack backchain initialization. 2008-12-25 13:39:13 +01:00
head64.S [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID 2008-12-31 15:11:49 +01:00
init_task.c take init_fs to saner place 2008-12-31 18:07:42 -05:00
ipl.c [S390] ipl: Reboot from alternate device does not work when booting from file 2008-08-01 16:39:30 +02:00
irq.c [S390] show_interrupts: prevent cpu hotplug when walking cpu_online_map. 2008-05-15 16:52:41 +02:00
kprobes.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
machine_kexec.c [S390] Cleanup kprobes printk messages. 2008-07-14 10:02:24 +02:00
Makefile [S390] convert cpu related printks to pr_xxx macros. 2008-12-25 13:39:25 +01:00
mcount.S [S390] ftrace: function tracer backend for s390 2008-12-25 13:39:03 +01:00
mem_detect.c [S390] Remove diag 0x260 call from memory detection. 2008-08-01 16:39:34 +02:00
module.c [S390] Use generic bug. 2007-04-27 16:01:42 +02:00
process.c [CVE-2009-0029] s390 specific system call wrappers 2009-01-14 14:15:32 +01:00
processor.c [S390] convert cpu related printks to pr_xxx macros. 2008-12-25 13:39:25 +01:00
ptrace.c [S390] remove ptrace warning on 31 bit. 2008-12-25 13:39:05 +01:00
reipl.S [S390] reipl: move dump_prefix_page out of text section. 2007-03-05 23:35:43 +01:00
reipl64.S [S390] reipl: move dump_prefix_page out of text section. 2007-03-05 23:35:43 +01:00
relocate_kernel.S [S390] Reset infrastructure for re-IPL. 2006-12-04 15:40:26 +01:00
relocate_kernel64.S [S390] Reset infrastructure for re-IPL. 2006-12-04 15:40:26 +01:00
s390_ext.c [PATCH] improve idle cputime accounting 2008-12-31 15:11:48 +01:00
s390_ksyms.c [S390] ftrace: function tracer backend for s390 2008-12-25 13:39:03 +01:00
setup.c [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID 2008-12-31 15:11:49 +01:00
signal.c [CVE-2009-0029] s390 specific system call wrappers 2009-01-14 14:15:32 +01:00
smp.c [S390] vdso: compile fix 2009-01-09 12:15:06 +01:00
stacktrace.c [S390] Fix stacktrace compile bug. 2008-07-17 17:22:09 +02:00
sys_s390.c [CVE-2009-0029] s390 specific system call wrappers 2009-01-14 14:15:32 +01:00
syscalls.S [S390] fix compat sigaltstack syscall table entry 2009-01-23 16:40:28 +01:00
time.c Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
topology.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-12-30 08:02:35 +10:30
traps.c [S390] Move show_regs to traps.c. 2008-04-30 13:38:43 +02:00
vdso.c [S390] vdso: compile fix 2009-01-09 12:15:06 +01:00
vmlinux.lds.S [S390] Fix alignment of initial kernel stack. 2008-11-27 11:06:58 +01:00
vtime.c [S390] cputime: fix lowcore initialization on cpu hotplug 2009-01-23 16:40:28 +01:00