Commit d00ea9a1 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] Prevent false positives in non-fatal MCE check.

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.
parent e98fd32c
/*
* Athlon/Hammer specific Machine Check Exception Reporting
* (C) Copyright 2002 Dave Jones <davej@codemonkey.org.uk>
*/
#include <linux/init.h>
......
/*
* mce.c - x86 Machine Check Exception Reporting
* (c) 2002 Alan Cox <alan@redhat.com>, Dave Jones <davej@codemonkey.org.uk>
*/
#include <linux/init.h>
......
/*
* 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 */
......
/*
* P5 specific Machine Check Exception Reporting
* (C) Copyright 2002 Alan Cox <alan@redhat.com>
*/
#include <linux/init.h>
......
/*
* P6 specific Machine Check Exception Reporting
* (C) Copyright 2002 Alan Cox <alan@redhat.com>
*/
#include <linux/init.h>
......
/*
* IDT Winchip specific Machine Check Exception Reporting
* (C) Copyright 2002 Alan Cox <alan@redhat.com>
*/
#include <linux/init.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment