From: "Siddha, Suresh B" Appended patch fixes the "APIC error on CPUX: 00(40)" observed during bootup. SDM Vol-3A "Valid Interrupt Vectors" says: "When an illegal vector value (0-15) is written to an LVT entry and the delivery mode is Fixed, the APIC may signal an illegal vector error, with out regard to whether the mask bit is set or whether an interrupt is actually seen on input." Signed-off-by: Suresh Siddha Cc: Andi Kleen Cc: "Eric W. Biederman" Cc: Rohit Seth Signed-off-by: Andrew Morton --- arch/x86_64/kernel/apic.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff -puN arch/x86_64/kernel/apic.c~x86_64-apic-fix-apic-error-on-bootup arch/x86_64/kernel/apic.c --- a/arch/x86_64/kernel/apic.c~x86_64-apic-fix-apic-error-on-bootup +++ a/arch/x86_64/kernel/apic.c @@ -100,7 +100,7 @@ void clear_local_APIC(void) maxlvt = get_maxlvt(); /* - * Masking an LVT entry on a P6 can trigger a local APIC error + * Masking an LVT entry can trigger a local APIC error * if the vector is zero. Mask LVTERR first to prevent this. */ if (maxlvt >= 3) { @@ -850,7 +850,18 @@ void disable_APIC_timer(void) unsigned long v; v = apic_read(APIC_LVTT); - apic_write(APIC_LVTT, v | APIC_LVT_MASKED); + /* + * When an illegal vector value (0-15) is written to an LVT + * entry and delivery mode is Fixed, the APIC may signal an + * illegal vector error, with out regard to whether the mask + * bit is set or whether an interrupt is actually seen on input. + * + * Boot sequence might call this function when the LVTT has + * '0' vector value. So make sure vector field is set to + * valid value. + */ + v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); + apic_write(APIC_LVTT, v); } } _