]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Prevent false positives in non-fatal MCE check.
authorDave Jones <davej@redhat.com>
Tue, 20 Jan 2004 04:59:17 +0000 (20:59 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 20 Jan 2004 04:59:17 +0000 (20:59 -0800)
non-fatal didn't get the same change that k7.c did a few months
back, so it reads from banks that actually _cause_ MCEs.

This patch also adds a bunch of copyright headers whilst we're
in that neighborhood.

arch/i386/kernel/cpu/mcheck/k7.c
arch/i386/kernel/cpu/mcheck/mce.c
arch/i386/kernel/cpu/mcheck/non-fatal.c
arch/i386/kernel/cpu/mcheck/p5.c
arch/i386/kernel/cpu/mcheck/p6.c
arch/i386/kernel/cpu/mcheck/winchip.c

index 486d16cf52ec9d4536c2ab837ef7e828c67d8efe..304bf420f0f1d1d020ec227532ba28ff11859e31 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Athlon/Hammer specific Machine Check Exception Reporting
+ * (C) Copyright 2002 Dave Jones <davej@codemonkey.org.uk>
  */
 
 #include <linux/init.h>
index 03271eda3770c9c6519252cc2149f8ffb637aed6..f8729415e4f2e8316fc8c0137187ed496f9790f3 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * mce.c - x86 Machine Check Exception Reporting
+ * (c) 2002 Alan Cox <alan@redhat.com>, Dave Jones <davej@codemonkey.org.uk>
  */
 
 #include <linux/init.h>
index 099f9d2efe13cf2718d4d2a71eb33bfe3edf9087..204192b166f93742f1445c1f4cb46e2c5e764e33 100644 (file)
@@ -1,5 +1,10 @@
 /*
  * Non Fatal Machine Check Exception Reporting
+ *
+ * (C) Copyright 2002 Dave Jones. <davej@codemonkey.org.uk>
+ *
+ * This file contains routines to check for non-fatal MCEs every 15s
+ *
  */
 
 #include <linux/init.h>
@@ -21,6 +26,7 @@
 
 static struct timer_list mce_timer;
 static int timerset;
+static int firstbank;
 
 #define MCE_RATE       15*HZ   /* timer rate is 15s */
 
@@ -30,7 +36,7 @@ static void mce_checkregs (void *info)
        int i;
 
        preempt_disable(); 
-       for (i=0; i<nr_mce_banks; i++) {
+       for (i=firstbank; i<nr_mce_banks; i++) {
                rdmsr (MSR_IA32_MC0_STATUS+i*4, low, high);
 
                if (high & (1<<31)) {
@@ -68,6 +74,13 @@ static void mce_timerfunc (unsigned long data)
 
 static int __init init_nonfatal_mce_checker(void)
 {
+       /* Some Athlons misbehave when we frob bank 0 */
+       if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
+               boot_cpu_data.x86 == 6)
+                       firstbank = 1;
+       else
+                       firstbank = 0;
+
        if (timerset == 0) {
                /* Set the timer to check for non-fatal
                   errors every MCE_RATE seconds */
index 26dd93338cfd7fdd579f94a235a15c7ca0720228..c92cd661c5ef7adb88644669f0f38e1a4603c583 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * P5 specific Machine Check Exception Reporting
+ * (C) Copyright 2002 Alan Cox <alan@redhat.com>
  */
 
 #include <linux/init.h>
index e0baa8bc63f332294be43c1eea53b6a7bf5f04cf..d63e9578c96c7e7b5ea363da8505d4bb4bd2dfd2 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * P6 specific Machine Check Exception Reporting
+ * (C) Copyright 2002 Alan Cox <alan@redhat.com>
  */
 
 #include <linux/init.h>
index c529fdbb23b38340429603aa9cce439b4b90e207..ddb579da43dddc23ed3deff6469bed6e6cba9c56 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * IDT Winchip specific Machine Check Exception Reporting
+ * (C) Copyright 2002 Alan Cox <alan@redhat.com>
  */
 
 #include <linux/init.h>