Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227320
b: refs/heads/master
c: bad11e0
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov committed Jan 7, 2011
1 parent 35b6b1e commit a2ca136
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 1b07ca47ff2fbffbe09d8b0a0a25d8747a3cdcae
refs/heads/master: bad11e031862294265145d87dd4be1ae4af0d57f
14 changes: 8 additions & 6 deletions trunk/drivers/edac/mce_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,18 +836,21 @@ static struct notifier_block amd_mce_dec_nb = {

static int __init mce_amd_init(void)
{
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
struct cpuinfo_x86 *c = &boot_cpu_data;

if (c->x86_vendor != X86_VENDOR_AMD)
return 0;

if ((boot_cpu_data.x86 < 0xf || boot_cpu_data.x86 > 0x12) &&
(boot_cpu_data.x86 != 0x14 || boot_cpu_data.x86_model > 0xf))
if ((c->x86 < 0xf || c->x86 > 0x12) &&
(c->x86 != 0x14 || c->x86_model > 0xf) &&
(c->x86 != 0x15 || c->x86_model > 0xf))
return 0;

fam_ops = kzalloc(sizeof(struct amd_decoder_ops), GFP_KERNEL);
if (!fam_ops)
return -ENOMEM;

switch (boot_cpu_data.x86) {
switch (c->x86) {
case 0xf:
fam_ops->dc_mce = k8_dc_mce;
fam_ops->ic_mce = k8_ic_mce;
Expand Down Expand Up @@ -887,8 +890,7 @@ static int __init mce_amd_init(void)
break;

default:
printk(KERN_WARNING "Huh? What family is that: %d?!\n",
boot_cpu_data.x86);
printk(KERN_WARNING "Huh? What family is that: %d?!\n", c->x86);
kfree(fam_ops);
return -EINVAL;
}
Expand Down

0 comments on commit a2ca136

Please sign in to comment.