aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-04-07 06:05:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-07 13:03:43 -0400
commit995f054f2a342f8505fed4f8395d12c0f5966414 (patch)
tree08ddf96e3365d2b0a9940914fdb179810fbca3a0 /kernel
parentbbef618190fb484b28b7d441e6fc5d524027c4fa (diff)
[PATCH] high-res timers: resume fix
Soeren Sonnenburg reported that upon resume he is getting this backtrace: [<c0119637>] smp_apic_timer_interrupt+0x57/0x90 [<c0142d30>] retrigger_next_event+0x0/0xb0 [<c0104d30>] apic_timer_interrupt+0x28/0x30 [<c0142d30>] retrigger_next_event+0x0/0xb0 [<c0140068>] __kfifo_put+0x8/0x90 [<c0130fe5>] on_each_cpu+0x35/0x60 [<c0143538>] clock_was_set+0x18/0x20 [<c0135cdc>] timekeeping_resume+0x7c/0xa0 [<c02aabe1>] __sysdev_resume+0x11/0x80 [<c02ab0c7>] sysdev_resume+0x47/0x80 [<c02b0b05>] device_power_up+0x5/0x10 it turns out that on resume we mistakenly re-enable interrupts too early. Do the timer retrigger only on the current CPU. Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Soeren Sonnenburg <kernel@nn7.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/hrtimer.c12
-rw-r--r--kernel/timer.c2
2 files changed, 13 insertions, 1 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 067ba2c05328..b74860aaf5f1 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -459,6 +459,18 @@ void clock_was_set(void)
459} 459}
460 460
461/* 461/*
462 * During resume we might have to reprogram the high resolution timer
463 * interrupt (on the local CPU):
464 */
465void hres_timers_resume(void)
466{
467 WARN_ON_ONCE(num_online_cpus() > 1);
468
469 /* Retrigger the CPU local events: */
470 retrigger_next_event(NULL);
471}
472
473/*
462 * Check, whether the timer is on the callback pending list 474 * Check, whether the timer is on the callback pending list
463 */ 475 */
464static inline int hrtimer_cb_pending(const struct hrtimer *timer) 476static inline int hrtimer_cb_pending(const struct hrtimer *timer)
diff --git a/kernel/timer.c b/kernel/timer.c
index 440048acaea1..dd6c2c1c561b 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1016,7 +1016,7 @@ static int timekeeping_resume(struct sys_device *dev)
1016 clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL); 1016 clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL);
1017 1017
1018 /* Resume hrtimers */ 1018 /* Resume hrtimers */
1019 clock_was_set(); 1019 hres_timers_resume();
1020 1020
1021 return 0; 1021 return 0;
1022} 1022}