]> git.baikalelectronics.ru Git - kernel.git/commit
clockevents: prevent endless loop lockup
authorThomas Gleixner <tglx@linutronix.de>
Wed, 3 Sep 2008 21:37:14 +0000 (21:37 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 5 Sep 2008 09:11:53 +0000 (11:11 +0200)
commitb598b46d04a8d30ba75d1005be09cb5fbe9b9e17
tree1fbefa54e16e76f76616202d8abf9607725afeff
parent1cf04cddce6e3a8f6402255132891cc48557764e
clockevents: prevent endless loop lockup

The C1E/HPET bug reports on AMDX2/RS690 systems where tracked down to a
too small value of the HPET minumum delta for programming an event.

The clockevents code needs to enforce an interrupt event on the clock event
device in some cases. The enforcement code was stupid and naive, as it just
added the minimum delta to the current time and tried to reprogram the device.
When the minimum delta is too small, then this loops forever.

Add a sanity check. Allow reprogramming to fail 3 times, then print a warning
and double the minimum delta value to make sure, that this does not happen again.
Use the same function for both tick-oneshot and tick-broadcast code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/time/tick-broadcast.c
kernel/time/tick-internal.h
kernel/time/tick-oneshot.c