Skip to contentSkip to conversation

edac: i5100 ack error detection register after each read

PATCH In review Niklas Söderlund 4 participants 5 messages Dec 9, 2011 – Feb 22, 2012 EDAC-core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 edac: i5100 ack error detection register after each read

If I only ack the detection register after a error have been detected I'm unable to reliably detect errors. I have verified this behavior using both an error injection DIMM and software to inject errors.

I can't find any documentation supporting this behavior in Intel 5100 Memory Controller Hub Chipset, see 1. So this is all based on experimentation.

[1] Intel® 5100 Memory Controller Hub Chipset

    http://www.intel.com/content/dam/doc/datasheet/5100-
	memory-controller-hub-chipset-datasheet.pdf
---
 drivers/edac/i5100_edac.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
drivers/edac/i5100_edac.c +4 -7
index bcbdeec..ec728e9 100644
@@ -535,23 +535,20 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
 static void i5100_check_error(struct mem_ctl_info *mci)
 {
 	struct i5100_priv *priv = mci->pvt_info;
-	u32 dw;
-
+	u32 dw, dw2;
 
 	pci_read_config_dword(priv->mc, I5100_FERR_NF_MEM, &dw);
 	if (i5100_ferr_nf_mem_any(dw)) {
-		u32 dw2;
 
 		pci_read_config_dword(priv->mc, I5100_NERR_NF_MEM, &dw2);
-		if (dw2)
-			pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM,
-					       dw2);
-		pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
 
 		i5100_read_log(mci, i5100_ferr_nf_mem_chan_indx(dw),
 			       i5100_ferr_nf_mem_any(dw),
 			       i5100_nerr_nf_mem_any(dw2));
+
+		pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM, dw2);
 	}
+	pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
 }
 
 /* The i5100 chipset will scrub the entire memory once, then
Signature · 1 line
1.7.7.3
#1 lore raw

Adding Tony.

Quoted 53 lines · Niklas Söderlund

If I only ack the detection register after a error have been detected I'm unable to reliably detect errors. I have verified this behavior using both an error injection DIMM and software to inject errors.

I can't find any documentation supporting this behavior in Intel 5100 Memory Controller Hub Chipset, see 1. So this is all based on experimentation.

[1] Intel® 5100 Memory Controller Hub Chipset

    http://www.intel.com/content/dam/doc/datasheet/5100-
	memory-controller-hub-chipset-datasheet.pdf
---
 drivers/edac/i5100_edac.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
drivers/edac/i5100_edac.c +4 -7
index bcbdeec..ec728e9 100644
@@ -535,23 +535,20 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
 static void i5100_check_error(struct mem_ctl_info *mci)
 {
 	struct i5100_priv *priv = mci->pvt_info;
-	u32 dw;
-
+	u32 dw, dw2;
 
 	pci_read_config_dword(priv->mc, I5100_FERR_NF_MEM, &dw);
 	if (i5100_ferr_nf_mem_any(dw)) {
-		u32 dw2;
 
 		pci_read_config_dword(priv->mc, I5100_NERR_NF_MEM, &dw2);
-		if (dw2)
-			pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM,
-					       dw2);
-		pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
 
 		i5100_read_log(mci, i5100_ferr_nf_mem_chan_indx(dw),
 			       i5100_ferr_nf_mem_any(dw),
 			       i5100_nerr_nf_mem_any(dw2));
+
+		pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM, dw2);
 	}
+	pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
 }
 
 /* The i5100 chipset will scrub the entire memory once, then
Signature · 1 line
1.7.7.3
Signature · 8 lines
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
#2 lore raw

Hi Tony,

Is there any interest in this patch?

Quoted 57 lines · Borislav Petkov

Adding Tony.

Quoted 53 lines · Niklas Söderlund

If I only ack the detection register after a error have been detected I'm unable to reliably detect errors. I have verified this behavior using both an error injection DIMM and software to inject errors.

I can't find any documentation supporting this behavior in Intel 5100 Memory Controller Hub Chipset, see 1. So this is all based on experimentation.

[1] Intel® 5100 Memory Controller Hub Chipset

     http://www.intel.com/content/dam/doc/datasheet/5100-
	memory-controller-hub-chipset-datasheet.pdf
---
  drivers/edac/i5100_edac.c |   11 ++++-------
  1 files changed, 4 insertions(+), 7 deletions(-)
drivers/edac/i5100_edac.c +4 -8
index bcbdeec..ec728e9 100644
@@ -535,23 +535,20 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
  static void i5100_check_error(struct mem_ctl_info *mci)
  {
  	struct i5100_priv *priv = mci->pvt_info;
-	u32 dw;
-
+	u32 dw, dw2;
 
  	pci_read_config_dword(priv->mc, I5100_FERR_NF_MEM,&dw);
  	if (i5100_ferr_nf_mem_any(dw)) {
-		u32 dw2;
 
  		pci_read_config_dword(priv->mc, I5100_NERR_NF_MEM,&dw2);
-		if (dw2)
-			pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM,
-					       dw2);
-		pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
 
  		i5100_read_log(mci, i5100_ferr_nf_mem_chan_indx(dw),
  			       i5100_ferr_nf_mem_any(dw),
  			       i5100_nerr_nf_mem_any(dw2));
+
+		pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM, dw2);
  	}
+	pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
  }
 
  /* The i5100 chipset will scrub the entire memory once, then
--

1.7.7.3

maintainer
#3 lore raw

Mauro: Since this has been tested, do you care that the documentation doesn't appear to describe this behavior?

-Tony

-----Original Message-----
From: Niklas Söderlund [mailto:[email protected]]
Sent: Tuesday, February 21, 2012 2:27 AM
To: Luck, Tony
Cc: Borislav Petkov; [email protected]; [email protected]
Subject: Re: [PATCH] edac: i5100 ack error detection register after each read

Hi Tony,

Is there any interest in this patch?

Quoted 51 lines · Borislav Petkov

Adding Tony.

Quoted 48 lines · Niklas Söderlund

If I only ack the detection register after a error have been detected I'm unable to reliably detect errors. I have verified this behavior using both an error injection DIMM and software to inject errors.

I can't find any documentation supporting this behavior in Intel 5100 Memory Controller Hub Chipset, see 1. So this is all based on experimentation.

[1] Intel® 5100 Memory Controller Hub Chipset

     http://www.intel.com/content/dam/doc/datasheet/5100-
	memory-controller-hub-chipset-datasheet.pdf
---
  drivers/edac/i5100_edac.c |   11 ++++-------
  1 files changed, 4 insertions(+), 7 deletions(-)
drivers/edac/i5100_edac.c +4 -7
index bcbdeec..ec728e9 100644
@@ -535,23 +535,20 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
  static void i5100_check_error(struct mem_ctl_info *mci)
  {
  	struct i5100_priv *priv = mci->pvt_info;
-	u32 dw;
-
+	u32 dw, dw2;
 
  	pci_read_config_dword(priv->mc, I5100_FERR_NF_MEM,&dw);
  	if (i5100_ferr_nf_mem_any(dw)) {
-		u32 dw2;
 
  		pci_read_config_dword(priv->mc, I5100_NERR_NF_MEM,&dw2);
-		if (dw2)
-			pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM,
-					       dw2);
-		pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
 
  		i5100_read_log(mci, i5100_ferr_nf_mem_chan_indx(dw),
  			       i5100_ferr_nf_mem_any(dw),
  			       i5100_nerr_nf_mem_any(dw2));
+
+		pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM, dw2);
  	}
+	pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
  }
 
Quoted 6 lines
Quoted 5 lines
drivers/edac/i5100_edac.c +0 -1
  /* The i5100 chipset will scrub the entire memory once, then
--

1.7.7.3

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

#4 lore raw

Hi Tony,

Em 21-02-2012 22:58, Luck, Tony escreveu:

Quoted 2 lines

Mauro: Since this has been tested, do you care that the documentation doesn't appear to describe this behavior?

On some chipsets, the documentation allows more than one way to read it.

Yet, the common behavior to ack for an error on those Intel 3xxxx/5xxx/7xxx memory controllers is to do:

	pci_read_config_dword(priv->mc, reg, &dw);
	pci_write_config_dword(priv->mc, reg, dw);

Which is exactly what Niklas patch is doing, so it looks fine for me.

Quoted 72 lines

-Tony

-----Original Message-----
From: Niklas Söderlund [mailto:[email protected]]
Sent: Tuesday, February 21, 2012 2:27 AM
To: Luck, Tony
Cc: Borislav Petkov; [email protected]; [email protected]
Subject: Re: [PATCH] edac: i5100 ack error detection register after each read

Hi Tony,

Is there any interest in this patch?

Quoted 57 lines · Borislav Petkov

Adding Tony.

Quoted 53 lines · Niklas Söderlund

If I only ack the detection register after a error have been detected I'm unable to reliably detect errors. I have verified this behavior using both an error injection DIMM and software to inject errors.

I can't find any documentation supporting this behavior in Intel 5100 Memory Controller Hub Chipset, see 1. So this is all based on experimentation.

[1] Intel® 5100 Memory Controller Hub Chipset

     http://www.intel.com/content/dam/doc/datasheet/5100-
	memory-controller-hub-chipset-datasheet.pdf
---
  drivers/edac/i5100_edac.c |   11 ++++-------
  1 files changed, 4 insertions(+), 7 deletions(-)
drivers/edac/i5100_edac.c +4 -8
index bcbdeec..ec728e9 100644
@@ -535,23 +535,20 @@ static void i5100_read_log(struct mem_ctl_info *mci, int chan,
  static void i5100_check_error(struct mem_ctl_info *mci)
  {
  	struct i5100_priv *priv = mci->pvt_info;
-	u32 dw;
-
+	u32 dw, dw2;
 
  	pci_read_config_dword(priv->mc, I5100_FERR_NF_MEM,&dw);
  	if (i5100_ferr_nf_mem_any(dw)) {
-		u32 dw2;
 
  		pci_read_config_dword(priv->mc, I5100_NERR_NF_MEM,&dw2);
-		if (dw2)
-			pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM,
-					       dw2);
-		pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
 
  		i5100_read_log(mci, i5100_ferr_nf_mem_chan_indx(dw),
  			       i5100_ferr_nf_mem_any(dw),
  			       i5100_nerr_nf_mem_any(dw2));
+
+		pci_write_config_dword(priv->mc, I5100_NERR_NF_MEM, dw2);
  	}
+	pci_write_config_dword(priv->mc, I5100_FERR_NF_MEM, dw);
  }
 
  /* The i5100 chipset will scrub the entire memory once, then
--

1.7.7.3