Files
kernel_xiaomi_sm8250/include/linux
David Fries 6ffc787a44 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>
2008-02-06 10:41:10 -08:00
..
2008-02-05 09:44:13 -08:00
2008-02-05 03:20:13 -08:00
2008-02-06 10:41:02 -08:00
2008-01-28 15:00:14 -08:00
2008-02-01 11:34:49 +01:00
2008-01-29 21:55:15 +01:00
2008-02-03 17:45:46 +02:00
2008-01-30 13:31:10 +01:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-02-03 17:45:46 +02:00
2008-01-30 13:31:56 +01:00
2008-02-03 17:45:46 +02:00
2008-02-03 15:42:53 +02:00
2008-02-05 09:44:19 -08:00
2008-01-30 13:30:27 +01:00
2008-02-05 09:44:07 -08:00
2008-02-06 02:57:51 +01:00
2008-02-01 16:13:16 -05:00
2008-01-28 15:08:27 -08:00
2008-01-28 15:07:58 -08:00
2008-01-28 15:07:57 -08:00
2008-01-31 19:26:46 -08:00
2008-02-06 10:41:02 -08:00
2008-01-31 19:28:20 -08:00
2008-01-28 23:58:27 -05:00
2008-02-06 10:41:04 -08:00
2008-01-30 13:33:13 +01:00
2008-02-03 17:45:46 +02:00
2008-02-06 10:41:01 -08:00
2008-02-05 09:44:16 -08:00
2008-01-28 14:56:29 -08:00
2008-01-30 02:06:08 -05:00
2008-02-05 09:44:19 -08:00
2008-02-02 11:32:01 -08:00
2008-02-02 02:44:34 +03:00
2008-02-05 03:20:13 -08:00
2008-02-03 17:45:46 +02:00
2008-02-03 17:45:46 +02:00
2008-02-06 10:41:07 -08:00
2008-02-05 09:44:22 -08:00
2008-01-30 13:31:47 +01:00
2008-01-31 19:26:46 -08:00
2008-02-06 10:41:02 -08:00
2008-02-04 10:56:03 -08:00
2008-02-03 17:45:46 +02:00
2008-01-31 19:28:30 -08:00
2008-01-30 13:31:20 +01:00
2008-01-30 13:31:20 +01:00
2008-01-30 13:31:20 +01:00
2008-02-05 09:44:15 -08:00
2008-02-05 09:44:16 -08:00
2008-02-05 09:44:07 -08:00
2008-02-01 17:45:14 +01:00
2008-02-06 10:41:02 -08:00
2008-02-06 10:41:07 -08:00
2008-02-04 23:50:13 +11:00
2008-02-04 23:50:03 +11:00
2008-02-04 23:50:02 +11:00
2008-02-04 23:50:03 +11:00
2008-02-06 10:41:03 -08:00
2008-02-05 09:44:07 -08:00
2008-02-03 15:42:53 +02:00