Skip to content

Commit

Permalink
clockevents: Enforce oneshot broadcast when broadcast mask is set on …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Thomas Gleixner authored and Thomas Gleixner committed Sep 16, 2007
1 parent 729c6ba commit 07eec6a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
@@ -382,12 +382,23 @@ static int tick_broadcast_set_event(ktime_t expires, int force)

int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
{
int cpu = smp_processor_id();

/*
* If the CPU is marked for broadcast, enforce oneshot
* broadcast mode. The jinxed VAIO does not resume otherwise.
* No idea why it ends up in a lower C State during resume
* without notifying the clock events layer.
*/
if (cpu_isset(cpu, tick_broadcast_mask))
cpu_set(cpu, tick_broadcast_oneshot_mask);

clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);

if(!cpus_empty(tick_broadcast_oneshot_mask))
tick_broadcast_set_event(ktime_get(), 1);

return cpu_isset(smp_processor_id(), tick_broadcast_oneshot_mask);
return cpu_isset(cpu, tick_broadcast_oneshot_mask);
}

/*

0 comments on commit 07eec6a

Please sign in to comment.