diff options
author | David Fries | 2008-02-06 10:38:04 +0100 |
---|---|---|
committer | Linus Torvalds | 2008-02-06 19:41:10 +0100 |
commit | 6ffc787a4492ac627315aaeafdfdc0a5c3028582 (patch) | |
tree | bb557076ead94695cd148c4b7b065d44e77e62a3 /drivers/char/tpm/tpm_infineon.c | |
parent | phantom: don't grab other devices (diff) | |
download | kernel-qcow2-linux-6ffc787a4492ac627315aaeafdfdc0a5c3028582.tar.gz kernel-qcow2-linux-6ffc787a4492ac627315aaeafdfdc0a5c3028582.tar.xz kernel-qcow2-linux-6ffc787a4492ac627315aaeafdfdc0a5c3028582.zip |
system timer: fix crash in <100Hz system timer
The kernel has a divide by zero crash when trying to run the system timer
less than 100Hz. The problem is x/(HZ/USER_HZ) and related. Now
x*(USER_HZ/HZ) will be used if HZ<USER_HZ.
I'm running the Linux kernel under qemu and went to run a slower system
timer to take less CPU (and battery) on the host. I found that the kernel
paniced under emulation because of a divide by zero in three places. Here
is the patch. The base git was updated today 01-05-2008. I went for a
20Hz system time by adding config HZ_20 etc to kernel/Kconfig.hz. With
this patch I verified the system timer by looking at /proc/interrupts.
[akpm@linux-foundation.org: partially clean up the macro maze]
Signed-off-by: David Fries <david@fries.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/tpm/tpm_infineon.c')
0 files changed, 0 insertions, 0 deletions