Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3dfbc88464934fb6924a388bc03961d44f387926
Commit:     3dfbc88464934fb6924a388bc03961d44f387926
Parent:     e6d5a11dad44b8ae18ca8fc4ecb72ccccfa0a2d2
Author:     Thomas Gleixner <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 18:04:32 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 20:15:13 2007 +0200

    x86: C1E late detection fix. Really switch off lapic timer
    
    Doh, I completely missed that devices marked DUMMY are not running
    the set_mode function. So we force broadcasting, but we keep the
    local APIC timer running.
    
    Let the clock event layer mark the device _after_ switching it off.
    
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 arch/x86/kernel/apic_64.c    |    3 ---
 kernel/time/tick-broadcast.c |   18 ++++--------------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 09b8209..2250c65 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -974,15 +974,12 @@ void __init setup_boot_APIC_clock (void)
  */
 void __cpuinit check_boot_apic_timer_broadcast(void)
 {
-       struct clock_event_device *levt = &per_cpu(lapic_events, boot_cpu_id);
-
        if (!disable_apic_timer ||
            (lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY))
                return;
 
        printk(KERN_INFO "AMD C1E detected late. Force timer broadcast.\n");
        lapic_clockevent.features |= CLOCK_EVT_FEAT_DUMMY;
-       levt->features |= CLOCK_EVT_FEAT_DUMMY;
 
        local_irq_enable();
        clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE, &boot_cpu_id);
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index fab9dd8..8cfb8b2 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -222,20 +222,8 @@ static void tick_do_broadcast_on_off(void *why)
        if (!dev || !(dev->features & CLOCK_EVT_FEAT_C3STOP))
                goto out;
 
-       /*
-        * Defect device ?
-        */
-       if (!tick_device_is_functional(dev)) {
-               /*
-                * AMD C1E wreckage fixup:
-                *
-                * Device was registered functional in the first
-                * place. Now the secondary CPU detected the C1E
-                * misfeature and notifies us to fix it up
-                */
-               if (*reason != CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
-                       goto out;
-       }
+       if (!tick_device_is_functional(dev))
+               goto out;
 
        switch (*reason) {
        case CLOCK_EVT_NOTIFY_BROADCAST_ON:
@@ -246,6 +234,8 @@ static void tick_do_broadcast_on_off(void *why)
                                clockevents_set_mode(dev,
                                                     CLOCK_EVT_MODE_SHUTDOWN);
                }
+               if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
+                       dev->features |= CLOCK_EVT_FEAT_DUMMY;
                break;
        case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
                if (cpu_isset(cpu, tick_broadcast_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