Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=07eec6af448d13a6a520d9c6f06f2e87f61b567a
Commit:     07eec6af448d13a6a520d9c6f06f2e87f61b567a
Parent:     729c6ba334771f28a54efd7e3b8f5ab9414ce7bc
Author:     Thomas Gleixner <[EMAIL PROTECTED]>
AuthorDate: Sun Sep 16 15:36:43 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED](none)>
CommitDate: Sun Sep 16 15:36:43 2007 +0200

    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 <[EMAIL PROTECTED]>
---
 kernel/time/tick-broadcast.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index db8e0f3..947959f 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)
 
 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);
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to