From: Thomas Gleixner Date: Thu, 6 Nov 2008 00:13:39 +0000 (+0100) Subject: x86: apic reset counter on shutdown X-Git-Tag: v2.6.29-rc1~538^2~16^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a98f8fd24fb24fcb9a359553e64dd6aac5cf4279;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index 70879c9e393..1d410ee4b06 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, v = apic_read(APIC_LVTT); v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); apic_write(APIC_LVTT, v); + apic_write(APIC_TMICT, 0xffffffff); break; case CLOCK_EVT_MODE_RESUME: /* Nothing to do here */