* [Patch] apic: fix apic error on bootup
@ 2006-06-23 1:05 Siddha, Suresh B
2006-06-23 12:30 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Siddha, Suresh B @ 2006-06-23 1:05 UTC (permalink / raw)
To: akpm, ak; +Cc: linux-kernel, discuss
Appended patch fixes the "APIC error on CPUX: 00(40)" observed during bootup.
>From SDM Vol-3A "Valid Interrupt Vectors" section:
"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 <suresh.b.siddha@intel.com>
--- linux-2.6.17/arch/x86_64/kernel/apic.c~ 2006-06-22 14:25:58.220025336 -0700
+++ linux-2.6.17/arch/x86_64/kernel/apic.c 2006-06-22 14:31:48.383792352 -0700
@@ -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);
}
}
--- linux-2.6.17/arch/i386/kernel/apic.c~ 2006-06-22 14:15:36.764500936 -0700
+++ linux-2.6.17/arch/i386/kernel/apic.c 2006-06-22 14:29:58.754458544 -0700
@@ -157,7 +157,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) {
@@ -1117,7 +1117,18 @@ void disable_APIC_timer(void)
unsigned long v;
v = apic_read(APIC_LVTT);
- apic_write_around(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_around(APIC_LVTT, v);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch] apic: fix apic error on bootup
2006-06-23 1:05 [Patch] apic: fix apic error on bootup Siddha, Suresh B
@ 2006-06-23 12:30 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-06-23 12:30 UTC (permalink / raw)
To: Siddha, Suresh B; +Cc: akpm, linux-kernel, discuss
On Friday 23 June 2006 03:05, Siddha, Suresh B wrote:
> Appended patch fixes the "APIC error on CPUX: 00(40)" observed during bootup.
>
> From SDM Vol-3A "Valid Interrupt Vectors" section:
> "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."
Merged thanks
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-23 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23 1:05 [Patch] apic: fix apic error on bootup Siddha, Suresh B
2006-06-23 12:30 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox