Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148935
b: refs/heads/master
c: 77e26cc
h: refs/heads/master
i:
  148933: 7920cac
  148931: 21054c8
  148927: a8e026b
v: v3
  • Loading branch information
Hidetoshi Seto authored and Ingo Molnar committed Jun 11, 2009
1 parent 1e9d24d commit 6439d04
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 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: 8051dbd2dfd1427cc102888d7d96bf39de0be150
refs/heads/master: 77e26cca20013e9352a8df86a54640543304a23a
26 changes: 15 additions & 11 deletions trunk/arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,8 @@ void mce_log(struct mce *mce)
set_bit(0, &notify_user);
}

static void print_mce(struct mce *m, int *first)
static void print_mce(struct mce *m)
{
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);
Expand All @@ -208,6 +204,11 @@ static void print_mce(struct mce *m, int *first)
m->apicid);
}

static void print_mce_head(void)
{
printk(KERN_EMERG "\n" KERN_EMERG "HARDWARE ERROR\n");
}

static void print_mce_tail(void)
{
printk(KERN_EMERG "This is not a software problem!\n"
Expand All @@ -234,7 +235,6 @@ 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 @@ -245,23 +245,27 @@ static void mce_panic(char *msg, struct mce *final, char *exp)

bust_spinlocks(1);
console_verbose();
print_mce_head();
/* First print corrected ones that are still unlogged */
for (i = 0; i < MCE_LOG_LEN; i++) {
struct mce *m = &mcelog.entry[i];
if ((m->status & MCI_STATUS_VAL) &&
!(m->status & MCI_STATUS_UC))
print_mce(m, &first);
if (!(m->status & MCI_STATUS_VAL))
continue;
if (!(m->status & MCI_STATUS_UC))
print_mce(m);
}
/* 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 (!(m->status & MCI_STATUS_UC))
continue;
if (!final || memcmp(m, final, sizeof(struct mce)))
print_mce(m, &first);
print_mce(m);
}
if (final)
print_mce(final, &first);
print_mce(final);
if (cpu_missing)
printk(KERN_EMERG "Some CPUs didn't answer in synchronization\n");
print_mce_tail();
Expand Down

0 comments on commit 6439d04

Please sign in to comment.