diff mbox series

[v2,6/6] EDAC/amd64: Set grain per DIMM

Message ID 20191022203448.13962-7-Yazen.Ghannam@amd.com (mailing list archive)
State New, archived
Headers show
Series AMD64 EDAC: Check for nodes without memory, etc. | expand

Commit Message

Yazen Ghannam Oct. 22, 2019, 8:35 p.m. UTC
From: Yazen Ghannam <yazen.ghannam@amd.com>

The following commit introduced a warning on error reports without a
non-zero grain value.

  3724ace582d9 ("EDAC/mc: Fix grain_bits calculation")

The amd64_edac_mod module does not provide a value, so the warning will
be given on the first reported memory error.

Set the grain per DIMM to cacheline size (64 bytes). This is the current
recommendation.

Fixes: 3724ace582d9 ("EDAC/mc: Fix grain_bits calculation")
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
Link:
https://lkml.kernel.org/r/20191018153114.39378-7-Yazen.Ghannam@amd.com

v1 -> v2:
* No change.

rfc -> v1:
* New patch.

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

Comments

Borislav Petkov Oct. 25, 2019, 1:41 p.m. UTC | #1
On Tue, Oct 22, 2019 at 08:35:14PM +0000, Ghannam, Yazen wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
> 
> The following commit introduced a warning on error reports without a
> non-zero grain value.
> 
>   3724ace582d9 ("EDAC/mc: Fix grain_bits calculation")
> 
> The amd64_edac_mod module does not provide a value, so the warning will
> be given on the first reported memory error.
> 
> Set the grain per DIMM to cacheline size (64 bytes). This is the current
> recommendation.
> 
> Fixes: 3724ace582d9 ("EDAC/mc: Fix grain_bits calculation")
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
> Link:
> https://lkml.kernel.org/r/20191018153114.39378-7-Yazen.Ghannam@amd.com
> 
> v1 -> v2:
> * No change.
> 
> rfc -> v1:
> * New patch.
> 
>  drivers/edac/amd64_edac.c | 2 ++
>  1 file changed, 2 insertions(+)

This one I can take now. Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 114e7395daab..4ab7bcdede51 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2944,6 +2944,7 @@  static int init_csrows_df(struct mem_ctl_info *mci)
 			dimm->mtype = pvt->dram_type;
 			dimm->edac_mode = edac_mode;
 			dimm->dtype = dev_type;
+			dimm->grain = 64;
 		}
 	}
 
@@ -3020,6 +3021,7 @@  static int init_csrows(struct mem_ctl_info *mci)
 			dimm = csrow->channels[j]->dimm;
 			dimm->mtype = pvt->dram_type;
 			dimm->edac_mode = edac_mode;
+			dimm->grain = 64;
 		}
 	}