Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148927
b: refs/heads/master
c: 8650356
h: refs/heads/master
i:
  148925: 5f99632
  148923: 6364b5f
  148919: 2b034af
  148911: 07c14ea
  148895: ac5c4a5
  148863: b173310
v: v3
  • Loading branch information
Andi Kleen authored and H. Peter Anvin committed Jun 3, 2009
1 parent b2394d7 commit a8e026b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 29b0f591d678838435fbb3e15ef20266f1a9e01d
refs/heads/master: 86503560e48153aba539ff117450d31ab2ef76d7
27 changes: 17 additions & 10 deletions trunk/arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,13 @@ void mce_log(struct mce *mce)
set_bit(0, &notify_user);
}

static void print_mce(struct mce *m)
static void print_mce(struct mce *m, int *first)
{
printk(KERN_EMERG "\n"
KERN_EMERG "HARDWARE ERROR\n"
KERN_EMERG
if (*first) {
printk(KERN_EMERG "\n" KERN_EMERG "HARDWARE ERROR\n");
*first = 0;
}
printk(KERN_EMERG
"CPU %d: Machine Check Exception: %16Lx Bank %d: %016Lx\n",
m->extcpu, m->mcgstatus, m->bank, m->status);
if (m->ip) {
Expand All @@ -200,9 +202,12 @@ static void print_mce(struct mce *m)
printk(KERN_EMERG "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x\n",
m->cpuvendor, m->cpuid, m->time, m->socketid,
m->apicid);
printk(KERN_EMERG "This is not a software problem!\n");
printk(KERN_EMERG "Run through mcelog --ascii to decode "
"and contact your hardware vendor\n");
}

static void print_mce_tail(void)
{
printk(KERN_EMERG "This is not a software problem!\n"
KERN_EMERG "Run through mcelog --ascii to decode and contact your hardware vendor\n");
}

#define PANIC_TIMEOUT 5 /* 5 seconds */
Expand All @@ -225,6 +230,7 @@ static void wait_for_panic(void)
static void mce_panic(char *msg, struct mce *final, char *exp)
{
int i;
int first = 1;

/*
* Make sure only one CPU runs in machine check panic
Expand All @@ -240,20 +246,21 @@ static void mce_panic(char *msg, struct mce *final, char *exp)
struct mce *m = &mcelog.entry[i];
if ((m->status & MCI_STATUS_VAL) &&
!(m->status & MCI_STATUS_UC))
print_mce(m);
print_mce(m, &first);
}
/* Now print uncorrected but with the final one last */
for (i = 0; i < MCE_LOG_LEN; i++) {
struct mce *m = &mcelog.entry[i];
if (!(m->status & MCI_STATUS_VAL))
continue;
if (!final || memcmp(m, final, sizeof(struct mce)))
print_mce(m);
print_mce(m, &first);
}
if (final)
print_mce(final);
print_mce(final, &first);
if (cpu_missing)
printk(KERN_EMERG "Some CPUs didn't answer in synchronization\n");
print_mce_tail();
if (exp)
printk(KERN_EMERG "Machine check: %s\n", exp);
if (panic_timeout == 0)
Expand Down

0 comments on commit a8e026b

Please sign in to comment.