* [PATCH] 2.5.45 - i386 MCA update
@ 2002-11-01 19:02 Pallipadi, Venkatesh
2002-11-01 19:14 ` Dave Jones
0 siblings, 1 reply; 2+ messages in thread
From: Pallipadi, Venkatesh @ 2002-11-01 19:02 UTC (permalink / raw)
To: 'torvalds@transmeta.com'
Cc: 'linux-kernel@vger.kernel.org', Nakajima, Jun,
Mallick, Asit K
Hi,
Attached is the patch with few i386 MCA updates. Summary of changes:
- Logging of corrected (non critical) MCA errors on P4.
- Don't clear the MCA status info. in case of a non-recoverable error. If OS
has failed in logging those,
BIOS can still have a look at that info.
- Minor bug fix in do_mce_timer(). Check current cpu registers too, while
calling smp_call_function().
Thanks,
-Venkatesh
--- linux-2.5.45/arch/i386/kernel/bluesmoke.c.org Tue Oct 29 14:16:48
2002
+++ linux-2.5.45/arch/i386/kernel/bluesmoke.c Tue Oct 29 14:48:50 2002
@@ -209,10 +209,6 @@
printk(" at %08x%08x", ahigh, alow);
}
printk("\n");
- /* Clear it */
- wrmsr(MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL);
- /* Serialize */
- wmb();
}
}
@@ -220,7 +216,24 @@
panic("CPU context corrupt");
if(recover&1)
panic("Unable to continue");
+
printk(KERN_EMERG "Attempting to continue.\n");
+ /*
+ * Do not clear the MSR_IA32_MCi_STATUS if the error is not
+ * recoverable/continuable.This will allow BIOS to look at the MSRs
+ * for errors if the OS could not log the error.
+ */
+ for (i=0;i<banks;i++) {
+ unsigned int msr;
+ msr = MSR_IA32_MC0_STATUS+i*4;
+ rdmsr(msr,low, high);
+ if(high&(1<<31)) {
+ /* Clear it */
+ wrmsr(msr, 0UL, 0UL);
+ /* Serialize */
+ wmb();
+ }
+ }
mcgstl&=~(1<<2);
wrmsr(MSR_IA32_MCG_STATUS,mcgstl, mcgsth);
}
@@ -300,6 +313,7 @@
static void do_mce_timer(void *data)
{
+ mce_checkregs(NULL);
smp_call_function (mce_checkregs, NULL, 1, 1);
}
@@ -471,6 +485,20 @@
case X86_VENDOR_INTEL:
intel_mcheck_init(c);
+#ifdef CONFIG_X86_MCE_NONFATAL
+#define CPU_PENTIUM4 15
+ if (c->x86 == CPU_PENTIUM4 && timerset == 0) {
+ /* Set the timer to check for non-fatal
+ errors every MCE_RATE seconds */
+ init_timer (&mce_timer);
+ mce_timer.expires = jiffies + MCE_RATE;
+ mce_timer.data = 0;
+ mce_timer.function = &mce_timerfunc;
+ add_timer (&mce_timer);
+ timerset = 1;
+ printk(KERN_INFO "Machine check exception
polling timer started.\n");
+ }
+#endif
break;
case X86_VENDOR_CENTAUR:
--- linux-2.5.45/arch/i386/Kconfig.org Thu Oct 31 14:25:19 2002
+++ linux-2.5.45/arch/i386/Kconfig Thu Oct 31 14:25:48 2002
@@ -439,7 +439,7 @@
the 386 and 486, so nearly everyone can say Y here.
config X86_MCE_NONFATAL
- bool "Check for non-fatal errors on Athlon/Duron"
+ bool "Check for non-fatal errors on Athlon/Duron/Pentium-4"
depends on X86_MCE
help
Enabling this feature starts a timer that triggers every 5 seconds
which
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] 2.5.45 - i386 MCA update
2002-11-01 19:02 [PATCH] 2.5.45 - i386 MCA update Pallipadi, Venkatesh
@ 2002-11-01 19:14 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2002-11-01 19:14 UTC (permalink / raw)
To: Pallipadi, Venkatesh
Cc: 'torvalds@transmeta.com',
'linux-kernel@vger.kernel.org', Nakajima, Jun,
Mallick, Asit K
On Fri, Nov 01, 2002 at 11:02:55AM -0800, Pallipadi, Venkatesh wrote:
> Hi,
>
> Attached is the patch with few i386 MCA updates. Summary of changes:
> - Logging of corrected (non critical) MCA errors on P4.
> - Don't clear the MCA status info. in case of a non-recoverable error. If OS
> has failed in logging those,
> BIOS can still have a look at that info.
> - Minor bug fix in do_mce_timer(). Check current cpu registers too, while
> calling smp_call_function().
I've a lot of pending patches to bluesmoke (splitting it all up
into per-vendor files). This patch will make that a real PITA to
rework. Can you take a look at the work in 2.5-ac and diff against
that instead ?
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-11-01 19:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-01 19:02 [PATCH] 2.5.45 - i386 MCA update Pallipadi, Venkatesh
2002-11-01 19:14 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox