aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-09-16 09:36:43 -0400
committerThomas Gleixner <tglx@chaos.(none)>2007-09-16 09:36:43 -0400
commit07eec6af448d13a6a520d9c6f06f2e87f61b567a (patch)
treeeabd8fdf97ab76ff3abfa2c2804bb449f393ca01 /kernel
parent729c6ba334771f28a54efd7e3b8f5ab9414ce7bc (diff)
clockevents: Enforce oneshot broadcast when broadcast mask is set on resume
The jinxed VAIO refuses to resume without hitting keys on the keyboard when this is not enforced. It is unclear why the cpu ends up in a lower C State without notifying the clock events layer, but enforcing the oneshot broadcast here is safe. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-broadcast.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index db8e0f3d409b..947959fb2bb5 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -382,12 +382,23 @@ static int tick_broadcast_set_event(ktime_t expires, int force)
382 382
383int tick_resume_broadcast_oneshot(struct clock_event_device *bc) 383int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
384{ 384{
385 int cpu = smp_processor_id();
386
387 /*
388 * If the CPU is marked for broadcast, enforce oneshot
389 * broadcast mode. The jinxed VAIO does not resume otherwise.
390 * No idea why it ends up in a lower C State during resume
391 * without notifying the clock events layer.
392 */
393 if (cpu_isset(cpu, tick_broadcast_mask))
394 cpu_set(cpu, tick_broadcast_oneshot_mask);
395
385 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); 396 clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
386 397
387 if(!cpus_empty(tick_broadcast_oneshot_mask)) 398 if(!cpus_empty(tick_broadcast_oneshot_mask))
388 tick_broadcast_set_event(ktime_get(), 1); 399 tick_broadcast_set_event(ktime_get(), 1);
389 400
390 return cpu_isset(smp_processor_id(), tick_broadcast_oneshot_mask); 401 return cpu_isset(cpu, tick_broadcast_oneshot_mask);
391} 402}
392 403
393/* 404/*