diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-11-05 19:13:39 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-11-11 08:56:55 -0500 |
commit | a98f8fd24fb24fcb9a359553e64dd6aac5cf4279 (patch) | |
tree | 3e24247b653bf567ecb96a8cd4a2f9b6987a9682 /arch | |
parent | ba21ebb6abac5c46e1d818d2ceda82420bd099ba (diff) |
x86: apic reset counter on shutdown
Impact: avoid spurious lapic timer events on shutdown
The apic timer might be close to firing when it is shutdown. We can
not really disable the timer - we just mask the interrupt. That way we
can get an extra interrupt when it is reenabled. Set the counter to
max on shutdown to avoid this.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 70879c9e3936..1d410ee4b064 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c | |||
@@ -441,6 +441,7 @@ static void lapic_timer_setup(enum clock_event_mode mode, | |||
441 | v = apic_read(APIC_LVTT); | 441 | v = apic_read(APIC_LVTT); |
442 | v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); | 442 | v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); |
443 | apic_write(APIC_LVTT, v); | 443 | apic_write(APIC_LVTT, v); |
444 | apic_write(APIC_TMICT, 0xffffffff); | ||
444 | break; | 445 | break; |
445 | case CLOCK_EVT_MODE_RESUME: | 446 | case CLOCK_EVT_MODE_RESUME: |
446 | /* Nothing to do here */ | 447 | /* Nothing to do here */ |