Skip to contentSkip to conversation

i7core_edac and edac_mce

PATCH In review Mauro Carvalho Chehab 4 participants 10 messages Sep 24, 2009 – Oct 14, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover i7core_edac and edac_mce

The content of this patch series is at:
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/i7core.git for_linus

The first submission were done on Sept, 5 but weren't reviewed until yesterday.

It is not yet a pull request. It is just the last version, after the last review.

My intention is to submit likely tomorrow a git pull request if everything is ok and hoping that Linus will still accept it for 2.6.32.

This time I'm sending the it as a patch series for better review. The complete patchset is being sent to EDAC ML ([email protected]).

Only this email and two others of this series is c/c at LKML. If more people is interested on reviewing it, you can always look at -git and/or bluesmoke archives.

The two patches c/c at LKML are:
- the one that touches at PCI, for probing buses 254 and 255 - since, by default, ACPI bios doesn't announce those buses with MCU registers;
- edac_mce glue driver, that add two hooks on mce that are called only if a driver is registered for receiving mce log events. This is needed in order to get corrected error reports at the EDAC driver.

Cheers,
Mauro

Aristeu Rozanski (1):
pci: Add a probing code that seeks for an specific bus

Keith Mannthey (2):
i7core_edac: Fix ecc enable shift
i7core_edac: Probe on Xeons eariler

Mauro Carvalho Chehab (60):
i7core_edac: Add an EDAC memory controller driver for Nehalem
chipsets
i7core_edac: Add error insertion code for Nehalem
i7core_edac: Add more status functions to EDAC driver
i7core_edac: Registers all supported MC functions
i7core_edac: Show read/write virtual/physical channel association
i7core_edac: A few fixes at error injection code
i7core_edac: need mci->edac_check, otherwise module removal doesn't
work
i7core_edac: Add a memory check routine, based on device 3 function 4
i7core_edac: Add additional tests for error detection
i7core_edac: Properly fill struct csrow_info
i7core_edac: Improve error handling
i7core_edac: Add more information about each active dimm
i7core_edac: Get more info about the memory DIMMs
i7core_edac: Memory info fixes and preparation for properly filling
cswrow data
i7core_edac: fill csrows edac sysfs info
i7core_edac: CodingStyle fixes
edac_mce: Add an interface driver to report mce errors via edac edac/Kconfig: edac_mce can't be module
i7core_edac: Add edac_mce glue
i7core_edac: Adds write unlock to MC registers
i7core_edac: Add a code to probe Xeon 55xx bus
i7core_edac: add support for more than one MC socket
i7core_edac: maps all sockets as if ther are one MC controller
i7core_edac: decode mcelog error and send it via edac interface
i7core_edac: some fixes at memory error parser
i7core: fix probing on Xeon55xx
i7core: check if the memory error is fatal or non-fatal
i7core: enrich error information based on memory transaction type
i7core: fix get_devices routine for Xeon55xx
i7core: better document i7core_get_active_channels()
i7core: add socket info at the debug msg
i7core: remove some uneeded noisy debug messages
i7core_edac: Some cleanups at displayed info
i7core_edac: some fixes at error injection code
i7core_edac: fix error codes for sysfs error injection interface
i7core_edac: fix error injection
Documentation/edac.txt: Add Nehalem specific EDAC characteristics
i7core_edac: CodingSyle fixes/cleanups
i7core_edac: Print an error message if pci register fails
i7core_edac: Use Device 3 function 2 to report errors with RDIMM's
i7core: Use registered memories per processor
i7core_edac: Improve corrected_error_counts output for RDIMM
i7core: temporary workaround to allow it to compile against 2.6.30 Dynamically allocate memory for PCI devices
i7core_edac: create one mc per socket/QPI
i7core_edac: sanity check: print a warning if a mcelog is ignored
i7core_edac: a few fixes for multiple mc's Documentation/edac.txt: Improve it to reflect the latest changes at
the driver
i7core_edac: Fix a bug when printing error counts with RDIMMs
i7core_edac: at remove, don't remove all pci devices at once
i7core_edac: remove static counter for max sockets
i7core_edac: change remove module strategy
i7core_edac: We need to use list_for_each_entry_safe to avoid errors
i7core_edac: Avoid printing a warning when debug is disabled
edac_core: Allow the creation of sysfs groups
i7core_edac: Add support for sysfs addrmatch group
edac: store/show methods for device groups weren't working
edac: Don't create csrow entries on instance groups
i7core_edac: Convert UDIMM error counters into a proper sysfs group Documentation/edac.txt: Reflect the sysfs changes at the document

 Documentation/edac.txt           |  153 +++
 arch/x86/include/asm/pci_x86.h   |    2 +
 arch/x86/kernel/cpu/mcheck/mce.c |   12 +
 arch/x86/pci/legacy.c            |   43 +-
 drivers/edac/Kconfig             |   13 +
 drivers/edac/Makefile            |    4 +-
 drivers/edac/edac_core.h         |   14 +-
 drivers/edac/edac_mc_sysfs.c     |  152 +++-
 drivers/edac/edac_mce.c          |   61 ++
 drivers/edac/i7core_edac.c       | 1947 ++++++++++++++++++++++++++++++++++++++
 include/linux/edac_mce.h         |   31 +
 include/linux/pci.h              |    1 +
 include/linux/pci_ids.h          |   19 +
 13 files changed, 2407 insertions(+), 45 deletions(-)
 create mode 100644 drivers/edac/edac_mce.c
 create mode 100644 drivers/edac/i7core_edac.c
 create mode 100644 include/linux/edac_mce.h
#1 lore raw
Quoted 25 lines · Mauro Carvalho Chehab

The content of this patch series is at:
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/i7core.git for_linus

The first submission were done on Sept, 5 but weren't reviewed until yesterday.

It is not yet a pull request. It is just the last version, after the last review.

My intention is to submit likely tomorrow a git pull request if everything is ok and hoping that Linus will still accept it for 2.6.32.

This time I'm sending the it as a patch series for better review. The complete patchset is being sent to EDAC ML ([email protected]).

Only this email and two others of this series is c/c at LKML. If more people is interested on reviewing it, you can always look at -git and/or bluesmoke archives.

The two patches c/c at LKML are:
- the one that touches at PCI, for probing buses 254 and 255 - since, by default, ACPI bios doesn't announce those buses with MCU registers;
- edac_mce glue driver, that add two hooks on mce that are called only if a driver is registered for receiving mce log events. This is needed in order to get corrected error reports at the EDAC driver.

Quoted 2 lines

Cheers,
Mauro

Interesting, but yes, definitely it needs more reviews.

Thanks,
H.Seto

Subject: [UNTESTED PATCH] i7core_edac: avoid spinlock on fatal error

Be careful on MCE context, or it might cause a deadlock.

---
 drivers/edac/i7core_edac.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/edac/i7core_edac.c +6 -4
index 97f6d17..f915a39 100644
@@ -1679,6 +1679,12 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
 		return 0;
 	}
 
+	/* Handle fatal errors immediately */
+	if (mce->mcgstatus & 1) {
+		i7core_mce_output_error(mci, mce);
+		return 1;
+	}
+
 	spin_lock_irqsave(&pvt->mce_lock, flags);
 	if (pvt->mce_count < MCE_LOG_LEN) {
 		memcpy(&pvt->mce_entry[pvt->mce_count], mce, sizeof(*mce));
@@ -1686,10 +1692,6 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
 	}
 	spin_unlock_irqrestore(&pvt->mce_lock, flags);
 
-	/* Handle fatal errors immediately */
-	if (mce->mcgstatus & 1)
-		i7core_check_error(mci);
-
 	/* Advice mcelog that the error were handled */
 	return 1;
 }
Signature · 1 line
1.6.4.3
#2 lore raw

cover i7core_edac and edac_mce

In reply to Mauro Carvalho Chehab

As pointed By Arjan, Hidetoshi and Borislav, the edac glue had the risk of causing dead locks with NMI code. Due to that, I'm submitting a patch that replaces it to use, instead, a ringbuffer.

I also found a bug at the new edac sysfs methods when more than one memory controller were used, and added a small patch to improve error injection address mask.

Please review.

The entire patch series is available at:
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/i7core.git for_linus

Cheers,
Maur

Signature · 9 lines
Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
#3 lore raw

PATCH 1/3 edac: Create an unique instance for each kobj

In reply to Mauro Carvalho Chehab

Current code only works when there's just one memory controller, since we need one kobj for each instance.

---
 drivers/edac/edac_core.h     |   21 ++++++++---
 drivers/edac/edac_mc_sysfs.c |   75 +++++++++++++++++++++++++++--------------
 2 files changed, 64 insertions(+), 32 deletions(-)
drivers/edac/edac_core.h +15 -6
index d035ee9..f84da6e 100644
@@ -341,23 +341,29 @@ struct csrow_info {
 };
 
 struct mcidev_sysfs_group {
-	const char *name;
-	struct mcidev_sysfs_attribute *mcidev_attr;
-	struct kobject kobj;
+	const char *name;				/* group name */
+	struct mcidev_sysfs_attribute *mcidev_attr;	/* group attributes */
+};
+
+struct mcidev_sysfs_group_kobj {
+	struct list_head list;		/* list for all instances within a mc */
+
+	struct kobject kobj;		/* kobj for the group */
 
+	struct mcidev_sysfs_group *grp;	/* group description table */
 	struct mem_ctl_info *mci;	/* the parent */
 };
 
-
 /* mcidev_sysfs_attribute structure
  *	used for driver sysfs attributes and in mem_ctl_info
  * 	sysfs top level entries
  */
 struct mcidev_sysfs_attribute {
+	/* It should use either attr or grp */
 	struct attribute attr;
+	struct mcidev_sysfs_group *grp;	/* Points to a group of attributes */
 
-	struct mcidev_sysfs_group *grp;
-
+	/* Ops for show/store values at the attribute - not used on group */
         ssize_t (*show)(struct mem_ctl_info *,char *);
         ssize_t (*store)(struct mem_ctl_info *, const char *,size_t);
 };
@@ -435,6 +441,9 @@ struct mem_ctl_info {
 	/* edac sysfs device control */
 	struct kobject edac_mci_kobj;
 
+	/* list for all grp instances within a mc */
+	struct list_head grp_kobj_list;
+
 	/* Additional top controller level attributes, but specified
 	 * by the low level driver.
 	 *
drivers/edac/edac_mc_sysfs.c +49 -26

143 lines not on this page · raw message

Signature · 9 lines
Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
#4 lore raw

Re: [PATCH 1/3] edac: Create an unique instance for each kobj

Quoted 22 lines · On Sun, 4 Oct 2009 16:43:54 -0300 Mauro Carvalho Chehab <[email protected]>…

Current code only works when there's just one memory controller, since we need one kobj for each instance.

---
 drivers/edac/edac_core.h     |   21 ++++++++---
 drivers/edac/edac_mc_sysfs.c |   75 +++++++++++++++++++++++++++--------------
 2 files changed, 64 insertions(+), 32 deletions(-)
drivers/edac/edac_core.h +2 -3
index d035ee9..f84da6e 100644
@@ -341,23 +341,29 @@ struct csrow_info {
 };
 
 struct mcidev_sysfs_group {
-	const char *name;
-	struct mcidev_sysfs_attribute *mcidev_attr;
-	struct kobject kobj;
+	const char *name;				/* group name */
+	struct mcidev_sysfs_attribute *mcidev_attr;	/* group attributes */

drivers/edac/edac_core.h struct csrow_info { · line 355

Quoted 10 lines
drivers/edac/edac_core.h +7 -0
+};
+
+struct mcidev_sysfs_group_kobj {
+	struct list_head list;		/* list for all instances within a mc */
+
+	struct kobject kobj;		/* kobj for the group */
 
+	struct mcidev_sysfs_group *grp;	/* group description table */
 	struct mem_ctl_info *mci;	/* the parent */
 };

I don't know which kernel you're patching here, but it doesn't look anything like mine...

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

#5 lore raw

Re: [PATCH 1/3] edac: Create an unique instance for each kobj

Hi Andrew,

Em Tue, 13 Oct 2009 20:01:17 -0700
Andrew Morton <[email protected]> escreveu:

Quoted 7 lines · On Sun, 4 Oct 2009 16:43:54 -0300 Mauro Carvalho Chehab <[email protected]>…
Quoted 3 lines

Current code only works when there's just one memory controller, since we need one kobj for each instance.

I don't know which kernel you're patching here, but it doesn't look anything like mine...

It is on i7core_edac git tree. This tree were added to linux-next. You'll be able to see it starting from today's linux-next.

Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

#6 lore raw

RE: [PATCH 1/3] edac: Create an unique instance for each kobj

Is this all into a dev tree, or are there patches for a SLES 11 (2.6.27) ?

-----Original Message-----
From: Mauro Carvalho Chehab [mailto:[email protected]]
Sent: Wednesday, October 14, 2009 4:42 AM
To: Andrew Morton
Cc: Ingo Molnar; [email protected]; [email protected]
Subject: Re: [PATCH 1/3] edac: Create an unique instance for each kobj

Hi Andrew,

Em Tue, 13 Oct 2009 20:01:17 -0700
Andrew Morton <[email protected]> escreveu:

Quoted 7 lines · On Sun, 4 Oct 2009 16:43:54 -0300 Mauro Carvalho Chehab <[email protected]>…
Quoted 3 lines

Current code only works when there's just one memory controller, since we need one kobj for each instance.

I don't know which kernel you're patching here, but it doesn't look anything like mine...

It is on i7core_edac git tree. This tree were added to linux-next. You'll be able to see it starting from today's linux-next.

Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
bluesmoke-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluesmoke-devel

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

#7 lore raw

Re: [PATCH 1/3] edac: Create an unique instance for each kobj

Em Wed, 14 Oct 2009 14:50:10 +0000
"Colbert, Rusty" <[email protected]> escreveu:

Quoted 1 line

Is this all into a dev tree, or are there patches for a SLES 11 (2.6.27) ?

The patches at i7core_edac git tree aren't upstream. They are only at development trees.

Quoted 37 lines

-----Original Message-----
From: Mauro Carvalho Chehab [mailto:[email protected]]
Sent: Wednesday, October 14, 2009 4:42 AM
To: Andrew Morton
Cc: Ingo Molnar; [email protected]; [email protected]
Subject: Re: [PATCH 1/3] edac: Create an unique instance for each kobj

Hi Andrew,

Em Tue, 13 Oct 2009 20:01:17 -0700
Andrew Morton <[email protected]> escreveu:

Quoted 7 lines · On Sun, 4 Oct 2009 16:43:54 -0300 Mauro Carvalho Chehab <[email protected]>…
Quoted 3 lines

Current code only works when there's just one memory controller, since we need one kobj for each instance.

I don't know which kernel you're patching here, but it doesn't look anything like mine...

It is on i7core_edac git tree. This tree were added to linux-next. You'll be able to see it starting from today's linux-next.

Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
bluesmoke-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluesmoke-devel

Signature · 9 lines
Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
#8 lore raw

PATCH 2/3 i7core_edac: Use a lockless ringbuffer

In reply to Mauro Carvalho Chehab
Quoted 1 line

From ece799f1fbe9af74c518c00ab5dd271ba9eb8855 Mon Sep 17 00:00:00 2001

From: Mauro Carvalho Chehab <[email protected]>
Date: Sun, 4 Oct 2009 10:15:40 -0300
Subject: [PATCH] i7core_edac: Use a lockless ringbuffer

---
 drivers/edac/i7core_edac.c |   83 +++++++++++++++++++++++++++++---------------
 1 files changed, 55 insertions(+), 28 deletions(-)
drivers/edac/i7core_edac.c +55 -28
index 97f6d17..94aeca0 100644
@@ -28,7 +28,6 @@
 #include <linux/edac.h>
 #include <linux/mmzone.h>
 #include <linux/edac_mce.h>
-#include <linux/spinlock.h>
 #include <linux/smp.h>
 #include <asm/processor.h>
 
@@ -239,9 +238,16 @@ struct i7core_pvt {
 
 	/* mcelog glue */
 	struct edac_mce		edac_mce;
+
+	/* Fifo double buffers */
 	struct mce		mce_entry[MCE_LOG_LEN];
-	unsigned		mce_count;
-	spinlock_t		mce_lock;
+	struct mce		mce_outentry[MCE_LOG_LEN];
+
+	/* Fifo in/out counters */
+	unsigned		mce_in, mce_out;
+
+	/* Count indicator to show errors not got */
+	unsigned		mce_overrun;
 };
 
 /* Static vars */
@@ -1617,30 +1623,50 @@ static void i7core_check_error(struct mem_ctl_info *mci)
 	struct i7core_pvt *pvt = mci->pvt_info;
 	int i;
 	unsigned count = 0;
-	struct mce *m = NULL;
-	unsigned long flags;
+	struct mce *m;
 
-	/* Copy all mce errors into a temporary buffer */
-	spin_lock_irqsave(&pvt->mce_lock, flags);
-	if (pvt->mce_count) {
-		m = kmalloc(sizeof(*m) * pvt->mce_count, GFP_ATOMIC);
+	/*
+	 * MCE first step: Copy all mce errors into a temporary buffer
+	 * We use a double buffering here, to reduce the risk of
+	 * loosing an error.
+	 */
+	smp_rmb();
+	count = (pvt->mce_out + sizeof(mce_entry) - pvt->mce_in)
+		% sizeof(mce_entry);
+	if (!count)
+		return;
 
-		if (m) {
-			count = pvt->mce_count;
-			memcpy(m, &pvt->mce_entry, sizeof(*m) * count);
-		}
-		pvt->mce_count = 0;
-	}
+	m = pvt->mce_outentry;
+	if (pvt->mce_in + count > sizeof(mce_entry)) {
+		unsigned l = sizeof(mce_entry) - pvt->mce_in;
 
-	spin_unlock_irqrestore(&pvt->mce_lock, flags);
+		memcpy(m, &pvt->mce_entry[pvt->mce_in], sizeof(*m) * l);
+		smp_wmb();
+		pvt->mce_in = 0;
+		count -= l;
+		m += l;
+	}
+	memcpy(m, &pvt->mce_entry[pvt->mce_in], sizeof(*m) * count);
+	smp_wmb();
+	pvt->mce_in += count;
+
+	smp_rmb();
+	if (pvt->mce_overrun) {
+		i7core_printk(KERN_ERR, "Lost %d memory errors\n",
+			      pvt->mce_overrun);
+		smp_wmb();
+		pvt->mce_overrun = 0;
+	}
 
-	/* proccess mcelog errors */
+	/*
+	 * MCE second step: parse errors and display
+	 */
 	for (i = 0; i < count; i++)
-		i7core_mce_output_error(mci, &m[i]);
+		i7core_mce_output_error(mci, &pvt->mce_outentry[i]);
 
-	kfree(m);
-
-	/* check memory count errors */
+	/*
+	 * Now, let's increment CE error counts
+	 */
 	if (!pvt->is_registered)
 		i7core_udimm_check_mc_ecc_err(mci);
 	else
@@ -1657,7 +1683,6 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
 {
 	struct mem_ctl_info *mci = priv;
 	struct i7core_pvt *pvt = mci->pvt_info;
-	unsigned long flags;
 
 	/*
 	 * Just let mcelog handle it if the error is
@@ -1679,12 +1704,15 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
 		return 0;
 	}
 
-	spin_lock_irqsave(&pvt->mce_lock, flags);
-	if (pvt->mce_count < MCE_LOG_LEN) {
-		memcpy(&pvt->mce_entry[pvt->mce_count], mce, sizeof(*mce));
-		pvt->mce_count++;
+	smp_rmb();
+	if ((pvt->mce_out + 1) % sizeof(mce_entry) == pvt->mce_in) {
+		smp_wmb();
+		pvt->mce_overrun++;
+		return 0;
 	}
-	spin_unlock_irqrestore(&pvt->mce_lock, flags);
+	smp_wmb();
+	pvt->mce_out = (pvt->mce_out + 1) % sizeof(mce_entry);
+	memcpy(&pvt->mce_entry[pvt->mce_out], mce, sizeof(*mce));
 
 	/* Handle fatal errors immediately */
 	if (mce->mcgstatus & 1)
@@ -1777,7 +1805,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev,
 	/* Registers on edac_mce in order to receive memory errors */
 	pvt->edac_mce.priv = mci;
 	pvt->edac_mce.check_error = i7core_mce_check_error;
-	spin_lock_init(&pvt->mce_lock);
 
 	rc = edac_mce_register(&pvt->edac_mce);
 	if (unlikely(rc < 0)) 
Signature · 9 lines
Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
#9 lore raw

PATCH 3/3 i7core_edac: Better parse "any" addrmask

In reply to Mauro Carvalho Chehab
Quoted 1 line

From ddc7940d3a68483e750e286bfe78d52bdf9231d1 Mon Sep 17 00:00:00 2001

From: Mauro Carvalho Chehab <[email protected]>
Date: Sun, 4 Oct 2009 11:54:56 -0300
Subject: [PATCH] i7core_edac: Better parse "any" addrmask

Instead of accepting just "any", accept also "any\n"

---
 drivers/edac/i7core_edac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/i7core_edac.c +1 -1
index 94aeca0..477b62a 100644
@@ -800,7 +800,7 @@ static ssize_t i7core_inject_store_##param(			\
 	if (pvt->inject.enable)					\
 		disable_inject(mci);				\
 								\
-	if (!strcasecmp(data, "any"))				\
+	if (!strcasecmp(data, "any") || !strcasecmp(data, "any\n"))\
 		value = -1;					\
 	else {							\
 		rc = strict_strtoul(data, 10, &value);		
Signature · 9 lines
Cheers,
Mauro

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf