From: Borislav Petkov <bp@amd64.org>
To: <linux-edac@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <x86@kernel.org>,
Borislav Petkov <borislav.petkov@amd.com>
Subject: [PATCH 12/12] EDAC, MCE: Enable MCE decoding on F15h
Date: Wed, 10 Nov 2010 20:02:21 +0100 [thread overview]
Message-ID: <1289415741-15000-13-git-send-email-bp@amd64.org> (raw)
In-Reply-To: <1289415741-15000-1-git-send-email-bp@amd64.org>
From: Borislav Petkov <borislav.petkov@amd.com>
Now that everything is inplace, enable MCE decoding on F15h. Make
initcall routine a bit more readable.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
drivers/edac/mce_amd.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index 0a19d26..59ad34c 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -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;
@@ -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;
}
--
1.7.3.1.50.g1e633
prev parent reply other threads:[~2010-11-10 19:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 19:02 [PATCH 00/12] EDAC, MCE: F15h MCE decoding Borislav Petkov
2010-11-10 19:02 ` [PATCH 01/12] EDAC, MCE: Select extended error code mask Borislav Petkov
2010-11-10 19:12 ` Luck, Tony
2010-11-10 19:15 ` Luck, Tony
2010-11-10 19:23 ` Borislav Petkov
2010-11-10 19:02 ` [PATCH 02/12] EDAC, MCE: Add F15h DC MCE decoder Borislav Petkov
2010-11-10 19:02 ` [PATCH 03/12] EDAC, MCE: Add F15h IC " Borislav Petkov
2010-11-10 19:02 ` [PATCH 04/12] EDAC, MCE: Add F15h CU " Borislav Petkov
2010-11-10 19:02 ` [PATCH 05/12] EDAC, MCE: No F15h LS " Borislav Petkov
2010-11-10 19:02 ` [PATCH 06/12] EDAC, MCE: Add an F15h NB " Borislav Petkov
2010-11-10 19:02 ` [PATCH 07/12] EDAC, MCE: Add F15 EX " Borislav Petkov
2010-11-10 19:02 ` [PATCH 08/12] EDAC, MCE: Add F15h FP " Borislav Petkov
2010-11-10 19:02 ` [PATCH 09/12] EDAC, MCE: Overhaul error fields extraction macros Borislav Petkov
2010-11-10 19:02 ` [PATCH 10/12] EDAC, MCE: Shorten error report formatting Borislav Petkov
2010-11-10 19:02 ` [PATCH 11/12] EDAC, MCE: Allow F15h bank 6 MCE injection Borislav Petkov
2010-11-10 19:02 ` Borislav Petkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1289415741-15000-13-git-send-email-bp@amd64.org \
--to=bp@amd64.org \
--cc=borislav.petkov@amd.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome