Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156937
b: refs/heads/master
c: e412cd2
h: refs/heads/master
i:
  156935: 5b05fb1
v: v3
  • Loading branch information
Ingo Molnar committed Aug 17, 2009
1 parent 4f5bb4e commit 01b0cff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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: c7f6fa44115d401e89db730f357629d39f8e4ba6
refs/heads/master: e412cd257e0d51e0ecbb89f50953835b5a0681b2
19 changes: 14 additions & 5 deletions trunk/arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,8 +1226,13 @@ static void mce_init(void)
}

/* Add per CPU specific workarounds here */
static void mce_cpu_quirks(struct cpuinfo_x86 *c)
static int mce_cpu_quirks(struct cpuinfo_x86 *c)
{
if (c->x86_vendor == X86_VENDOR_UNKNOWN) {
pr_info("MCE: unknown CPU type - not enabling MCE support.\n");
return -EOPNOTSUPP;
}

/* This should be disabled by the BIOS, but isn't always */
if (c->x86_vendor == X86_VENDOR_AMD) {
if (c->x86 == 15 && banks > 4) {
Expand Down Expand Up @@ -1274,14 +1279,19 @@ static void mce_cpu_quirks(struct cpuinfo_x86 *c)
monarch_timeout < 0)
monarch_timeout = USEC_PER_SEC;

/* There are also broken BIOSes on some Pentium M systems. */
if (c->x86 == 6 && c->x86_model == 13 && mce_bootlog < 0)
/*
* There are also broken BIOSes on some Pentium M and
* earlier systems:
*/
if (c->x86 == 6 && c->x86_model <= 13 && mce_bootlog < 0)
mce_bootlog = 0;
}
if (monarch_timeout < 0)
monarch_timeout = 0;
if (mce_bootlog != 0)
mce_panic_timeout = 30;

return 0;
}

static void __cpuinit mce_ancient_init(struct cpuinfo_x86 *c)
Expand Down Expand Up @@ -1342,11 +1352,10 @@ void __cpuinit mcheck_init(struct cpuinfo_x86 *c)
if (!mce_available(c))
return;

if (mce_cap_init() < 0) {
if (mce_cap_init() < 0 || mce_cpu_quirks(c) < 0) {
mce_disabled = 1;
return;
}
mce_cpu_quirks(c);

machine_check_vector = do_machine_check;

Expand Down

0 comments on commit 01b0cff

Please sign in to comment.