Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] EDAC/amd64: Dump registers before checking ECC
@ 2020-05-06 22:06 Alexander Monakov
  0 siblings, 0 replies; only message in thread
From: Alexander Monakov @ 2020-05-06 22:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Monakov, Borislav Petkov, linux-edac

Move dump_misc_regs earlier so decoded register contents are shown
even if ECC cannot be enabled. The dump gives info such as number of
memory controllers, so it serves as a sensible smoke-check even on
platforms without ECC memory.

Signed-off-by: Alexander Monakov <amonakov@ispras.ru>
Cc: Borislav Petkov <bp@alien8.de>
Cc: linux-edac@vger.kernel.org
---

Hi,

I used this patch when testing EDAC on AMD Family 17h Model 60h CPU,
which needs another patch (adding PCI ids) that I intend to send
shortly. I think it would be useful to have this upstream. 

 drivers/edac/amd64_edac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index f91f3bc1e0b2..1136500c5f53 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3533,6 +3533,8 @@ static int probe_one_instance(unsigned int nid)
 		goto err_enable;
 	}
 
+	dump_misc_regs(pvt);
+
 	if (!ecc_enabled(pvt)) {
 		ret = -ENODEV;
 
@@ -3559,8 +3561,6 @@ static int probe_one_instance(unsigned int nid)
 		goto err_enable;
 	}
 
-	dump_misc_regs(pvt);
-
 	return ret;
 
 err_enable:
-- 
2.26.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 22:06 [PATCH] EDAC/amd64: Dump registers before checking ECC Alexander Monakov

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git