sched: Fix the irqtime code to deal with u64 wraps
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Thu, 9 Dec 2010 13:15:34 +0000 (14:15 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Dec 2010 10:17:46 +0000 (11:17 +0100)
commitfe44d62122829959e960bc699318d58966922a69
treebacb96098cffa7b7b8d80506a2026b5125557f2a
parentdbd87b5af055a0cc9bba17795c9a2b0d17795389
sched: Fix the irqtime code to deal with u64 wraps

Some ARM systems have a short sched_clock() [ which needs to be fixed
too ], but this exposed a bug in the irq_time code as well, it doesn't
deal with wraps at all.

Fix the irq_time code to deal with u64 wraps by re-writing the code to
only use delta increments, which avoids the whole issue.

Reviewed-by: Venkatesh Pallipadi <venki@google.com>
Reported-by: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1292242433.6803.199.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c