mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: <norsk5@yahoo.com>
Cc: <linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<x86@kernel.org>, Borislav Petkov <borislav.petkov@amd.com>
Subject: [PATCH 1/4] EDAC, MCE: Add F12h DC MCE decoder
Date: Wed, 13 Oct 2010 11:31:37 +0200	[thread overview]
Message-ID: <1286962300-23385-2-git-send-email-bp@amd64.org> (raw)
In-Reply-To: <1286962300-23385-1-git-send-email-bp@amd64.org>

From: Borislav Petkov <borislav.petkov@amd.com>

F12h DC MCE signatures are a subset of F10h's so reuse them.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
 drivers/edac/mce_amd.c |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index 9fa61ee..1f895df 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -74,16 +74,10 @@ static const char *f10h_nb_mce_desc[] = {
 	"ECC Error in the Probe Filter directory"
 };
 
-static bool f10h_dc_mce(u16 ec)
+static bool f12h_dc_mce(u16 ec)
 {
-	u8 r4  = (ec >> 4) & 0xf;
 	bool ret = false;
 
-	if (r4 == R4_GEN) {
-		pr_cont("during data scrub.\n");
-		return true;
-	}
-
 	if (MEM_ERROR(ec)) {
 		u8 ll = ec & 0x3;
 		ret = true;
@@ -98,6 +92,18 @@ static bool f10h_dc_mce(u16 ec)
 	return ret;
 }
 
+static bool f10h_dc_mce(u16 ec)
+{
+	u8 r4  = (ec >> 4) & 0xf;
+	u8 ll  = ec & 0x3;
+
+	if (r4 == R4_GEN && ll == LL_L1) {
+		pr_cont("during data scrub.\n");
+		return true;
+	}
+	return f12h_dc_mce(ec);
+}
+
 static bool k8_dc_mce(u16 ec)
 {
 	if (BUS_ERROR(ec)) {
@@ -632,6 +638,10 @@ static int __init mce_amd_init(void)
 		fam_ops->nb_mce = f10h_nb_mce;
 		break;
 
+	case 0x12:
+		fam_ops->dc_mce = f12h_dc_mce;
+		break;
+
 	case 0x14:
 		nb_err_cpumask  = 0x3;
 		fam_ops->dc_mce = f14h_dc_mce;
-- 
1.7.3.1.50.g1e633


  reply	other threads:[~2010-10-13  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13  9:31 [PATCH 0/4] MCE decoding on F12h Borislav Petkov
2010-10-13  9:31 ` Borislav Petkov [this message]
2010-10-13  9:31 ` [PATCH 2/4] EDAC, MCE: Add F12h IC MCE decoder Borislav Petkov
2010-10-13  9:31 ` [PATCH 3/4] EDAC, MCE: Add F12h NB " Borislav Petkov
2010-10-13  9:31 ` [PATCH 4/4] EDAC, MCE: Enable MCE decoding on F12h Borislav Petkov

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=1286962300-23385-2-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=norsk5@yahoo.com \
    --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

all inboxes | Powered by JetHome®