mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <borislav.petkov@amd.com>
To: akpm@linux-foundation.org, greg@kroah.com
Cc: <linux-kernel@vger.kernel.org>,
	Doug Thompson <dougthompson@xmission.com>,
	Borislav Petkov <borislav.petkov@amd.com>
Subject: [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs
Date: Tue, 28 Apr 2009 17:06:12 +0200	[thread overview]
Message-ID: <1240931173-17477-21-git-send-email-borislav.petkov@amd.com> (raw)
In-Reply-To: <1240931173-17477-1-git-send-email-borislav.petkov@amd.com>

From: Doug Thompson <dougthompson@xmission.com>

Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
 drivers/edac/amd64_edac.c |  130 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 130 insertions(+), 0 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 3c04fd6..1f62346 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -4654,3 +4654,133 @@ static ssize_t amd64_hole_show(struct mem_ctl_info *mci, char *data)
 
 #endif	/* DEBUG */
 
+/*
+ * Per MC instance Attribute/Control data control structure
+ *	Can add for debug or for normal use
+ */
+static struct mcidev_sysfs_attribute amd64_mc_sysfs_ctls_attrs[] = {
+
+#ifdef CONFIG_EDAC_AMD64_OPTERON_ERROR_INJECTION
+	/* Error injection methods */
+	{
+		.attr = {
+			.name = "z_inject_section",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = NULL,
+		.store = amd64_inject_section_store,
+	},
+	{
+		.attr = {
+			.name = "z_inject_word",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = NULL,
+		.store = amd64_inject_word_store,
+	},
+	{
+		.attr = {
+			.name = "z_inject_bit_map",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = NULL,
+		.store = amd64_inject_bit_store,
+	},
+	{
+		.attr = {
+			.name = "z_inject_write",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = NULL,
+		.store = amd64_inject_write_store,
+	},
+	{
+		.attr = {
+			.name = "z_inject_read",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = NULL,
+		.store = amd64_inject_read_store,
+	},
+#endif	/* CONFIG_EDAC_AMD64_OPTERON_ERROR_INJECTION */
+
+#ifdef	CONFIG_EDAC_DEBUG
+	/* RAW register accessors */
+	{
+		.attr = {
+			.name = "zctl_nbea",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = amd64_nbea_show,
+		.store = amd64_nbea_store,
+	},
+	{
+		.attr = {
+			.name = "zctl_nbsl",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = amd64_nbsl_show,
+		.store = amd64_nbsl_store,
+	},
+	{
+		.attr = {
+			.name = "zctl_nbsh",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = amd64_nbsh_show,
+		.store = amd64_nbsh_store,
+	},
+	{
+		.attr = {
+			.name = "zctl_nbcfg",
+			.mode = (S_IRUGO | S_IWUSR)
+		},
+		.show = amd64_nbcfg_show,
+		.store = amd64_nbcfg_store,
+	},
+	{
+		.attr = {
+			.name = "zhw_dhar",
+			.mode = (S_IRUGO)
+		},
+		.show = amd64_dhar_show,
+		.store = NULL,
+	},
+	{
+		.attr = {
+			.name = "zhw_dbam",
+			.mode = (S_IRUGO)
+		},
+		.show = amd64_dbam_show,
+		.store = NULL,
+	},
+	{
+		.attr = {
+			.name = "zhw_topmem",
+			.mode = (S_IRUGO)
+		},
+		.show = amd64_topmem_show,
+		.store = NULL,
+	},
+	{
+		.attr = {
+			.name = "zhw_topmem2",
+			.mode = (S_IRUGO)
+		},
+		.show = amd64_topmem2_show,
+		.store = NULL,
+	},
+	{
+		.attr = {
+			.name = "zhw_hole",
+			.mode = (S_IRUGO)
+		},
+		.show = amd64_hole_show,
+		.store = NULL,
+	},
+#endif
+	{
+		.attr = { .name = NULL}
+	}
+};
+
-- 
1.6.2.4



  parent reply	other threads:[~2009-04-28 15:25 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 15:05 [RFC PATCH 00/21] amd64_edac: EDAC module for AMD64 Borislav Petkov
2009-04-28 15:05 ` [PATCH 01/21] amd64_edac: add PCI config register defines Borislav Petkov
2009-04-28 15:05 ` [PATCH 02/21] amd64_edac: add driver structs Borislav Petkov
2009-04-28 18:13   ` Andrew Morton
2009-04-28 19:02     ` Borislav Petkov
2009-04-28 15:05 ` [PATCH 03/21] amd64_edac: add memory scrubber interface Borislav Petkov
2009-04-28 15:05 ` [PATCH 04/21] amd64_edac: add sys addr to memory controller mapping helpers Borislav Petkov
2009-04-28 15:05 ` [PATCH 05/21] amd64_edac: add functionality to compute the DRAM hole Borislav Petkov
2009-04-28 15:05 ` [PATCH 06/21] amd64_edac: add DRAM address type conversion facilities Borislav Petkov
2009-04-28 15:05 ` [PATCH 07/21] amd64_edac: add helper to dump relevant registers Borislav Petkov
2009-04-28 15:06 ` [PATCH 08/21] amd64_edac: assign DRAM chip select base and mask in a family-specific way Borislav Petkov
2009-04-28 15:06 ` [PATCH 09/21] amd64_edac: add k8-specific methods Borislav Petkov
2009-04-28 15:06 ` [PATCH 10/21] amd64_edac: add f10-and-later methods-p1 Borislav Petkov
2009-04-28 15:06 ` [PATCH 11/21] amd64_edac: add f10-and-later methods-p2 Borislav Petkov
2009-04-28 15:06 ` [PATCH 12/21] amd64_edac: add f10-and-later methods-p3 Borislav Petkov
2009-04-28 15:06 ` [PATCH 13/21] amd64_edac: add per-family descriptors Borislav Petkov
2009-04-28 15:06 ` [PATCH 14/21] amd64_edac: add msr accessors operating on all cpus Borislav Petkov
2009-04-28 18:21   ` Andrew Morton
2009-04-28 18:31     ` H. Peter Anvin
2009-04-28 19:23     ` Borislav Petkov
2009-04-28 15:06 ` [PATCH 15/21] amd64_edac: add x4 chipkill syndrome mapping table Borislav Petkov
2009-04-28 15:06 ` [PATCH 16/21] amd64_edac: add error decoding logic Borislav Petkov
2009-04-28 15:06 ` [PATCH 17/21] amd64_edac: add EDAC core-related initializers Borislav Petkov
2009-04-28 15:06 ` [PATCH 18/21] amd64_edac: add ECC reporting initializers Borislav Petkov
2009-04-28 15:06 ` [PATCH 19/21] amd64_edac: add debugging/testing code Borislav Petkov
2009-04-28 18:30   ` Andrew Morton
2009-04-28 15:06 ` Borislav Petkov [this message]
2009-04-28 15:06 ` [PATCH 21/21] amd64_edac: add module registration routines Borislav Petkov
2009-04-28 15:58 ` [RFC PATCH 00/21] amd64_edac: EDAC module for AMD64 Greg KH
2009-04-28 16:06   ` Borislav Petkov
2009-04-28 18:34     ` Andrew Morton
2009-04-28 19:58       ` Greg KH
2009-04-29 16:54 [RFC PATCH 00/21 v2] " Borislav Petkov
2009-04-29 16:55 ` [PATCH 20/21] amd64_edac: add DRAM error injection logic using sysfs Borislav Petkov
2009-04-29 18:17   ` Ingo Molnar
2009-05-05  0:06   ` Mauro Carvalho Chehab
2009-04-30  6:28 Doug Thompson
2009-04-30  8:34 ` Ingo Molnar
2009-04-30 13:55 Doug Thompson

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=1240931173-17477-21-git-send-email-borislav.petkov@amd.com \
    --to=borislav.petkov@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=dougthompson@xmission.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.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®