All of lore.kernel.org
 help / color / mirror / Atom feed
* EDAC: Fix DIMM capacity unit symbol
@ 2018-09-19 14:33 Aristeu Rozanski
  0 siblings, 0 replies; 3+ messages in thread
From: Aristeu Rozanski @ 2018-09-19 14:33 UTC (permalink / raw)
  To: Tony Luck; +Cc: Borislav Petkov, Qiuxu Zhuo, Borislav Petkov, linux-edac

On Tue, Sep 18, 2018 at 05:34:33PM -0700, Tony Luck wrote:
> From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
> 
> The {i3200|i7core|sb|skx}_edac drivers show DIMM capacity in wrong unit
> symbol 'Mb'(megabit). Fix them by replacing 'Mb' with 'MiB'(mebibyte).
> 
> [Tony: These are all "edac_dbg()" messages, so this won't break scripts
>        that parse console logs]
> 
> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
>  drivers/edac/i3200_edac.c  | 2 +-
>  drivers/edac/i7core_edac.c | 2 +-
>  drivers/edac/sb_edac.c     | 2 +-
>  drivers/edac/skx_edac.c    | 4 ++--
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
> index d92d56cee101..299b441647cd 100644
> --- a/drivers/edac/i3200_edac.c
> +++ b/drivers/edac/i3200_edac.c
> @@ -399,7 +399,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
>  			if (nr_pages == 0)
>  				continue;
>  
> -			edac_dbg(0, "csrow %d, channel %d%s, size = %ld Mb\n", i, j,
> +			edac_dbg(0, "csrow %d, channel %d%s, size = %ld MiB\n", i, j,
>  				 stacked ? " (stacked)" : "", PAGES_TO_MiB(nr_pages));
>  
>  			dimm->nr_pages = nr_pages;
> diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
> index 8e120bf60624..bd65f573e381 100644
> --- a/drivers/edac/i7core_edac.c
> +++ b/drivers/edac/i7core_edac.c
> @@ -597,7 +597,7 @@ static int get_dimm_config(struct mem_ctl_info *mci)
>  			/* DDR3 has 8 I/O banks */
>  			size = (rows * cols * banks * ranks) >> (20 - 3);
>  
> -			edac_dbg(0, "\tdimm %d %d Mb offset: %x, bank: %d, rank: %d, row: %#x, col: %#x\n",
> +			edac_dbg(0, "\tdimm %d %d MiB offset: %x, bank: %d, rank: %d, row: %#x, col: %#x\n",
>  				 j, size,
>  				 RANKOFFSET(dimm_dod[j]),
>  				 banks, ranks, rows, cols);
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index 07726fb00321..7e5a092b4e9b 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -1622,7 +1622,7 @@ static int __populate_dimms(struct mem_ctl_info *mci,
>  				size = ((u64)rows * cols * banks * ranks) >> (20 - 3);
>  				npages = MiB_TO_PAGES(size);
>  
> -				edac_dbg(0, "mc#%d: ha %d channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
> +				edac_dbg(0, "mc#%d: ha %d channel %d, dimm %d, %lld MiB (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
>  					 pvt->sbridge_dev->mc, pvt->sbridge_dev->dom, i, j,
>  					 size, npages,
>  					 banks, ranks, rows, cols);
> diff --git a/drivers/edac/skx_edac.c b/drivers/edac/skx_edac.c
> index fae095162c01..b2987efa2c6d 100644
> --- a/drivers/edac/skx_edac.c
> +++ b/drivers/edac/skx_edac.c
> @@ -364,7 +364,7 @@ static int get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm,
>  	size = ((1ull << (rows + cols + ranks)) * banks) >> (20 - 3);
>  	npages = MiB_TO_PAGES(size);
>  
> -	edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
> +	edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld MiB (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
>  		 imc->mc, chan, dimmno, size, npages,
>  		 banks, 1 << ranks, rows, cols);
>  
> @@ -424,7 +424,7 @@ static int get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc,
>  	dimm->mtype = MEM_NVDIMM;
>  	dimm->edac_mode = EDAC_SECDED; /* likely better than this */
>  
> -	edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu Mb (%u pages)\n",
> +	edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu MiB (%u pages)\n",
>  		 imc->mc, chan, dimmno, size >> 20, dimm->nr_pages);
>  
>  	snprintf(dimm->label, sizeof(dimm->label), "CPU_SrcID#%u_MC#%u_Chan#%u_DIMM#%u",

Acked-by: Aristeu Rozanski <aris@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* EDAC: Fix DIMM capacity unit symbol
@ 2018-09-22 16:29 Borislav Petkov
  0 siblings, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2018-09-22 16:29 UTC (permalink / raw)
  To: Tony Luck; +Cc: Qiuxu Zhuo, Aristeu Rozanski, linux-edac

On Tue, Sep 18, 2018 at 05:34:33PM -0700, Tony Luck wrote:
> From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
> 
> The {i3200|i7core|sb|skx}_edac drivers show DIMM capacity in wrong unit
> symbol 'Mb'(megabit). Fix them by replacing 'Mb' with 'MiB'(mebibyte).
> 
> [Tony: These are all "edac_dbg()" messages, so this won't break scripts
>        that parse console logs]
> 
> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
>  drivers/edac/i3200_edac.c  | 2 +-
>  drivers/edac/i7core_edac.c | 2 +-
>  drivers/edac/sb_edac.c     | 2 +-
>  drivers/edac/skx_edac.c    | 4 ++--
>  4 files changed, 5 insertions(+), 5 deletions(-)

Applied, thx.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* EDAC: Fix DIMM capacity unit symbol
@ 2018-09-19  0:34 Luck, Tony
  0 siblings, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2018-09-19  0:34 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Qiuxu Zhuo, Tony Luck, Borislav Petkov, Aristeu Rozanski, linux-edac

From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>

The {i3200|i7core|sb|skx}_edac drivers show DIMM capacity in wrong unit
symbol 'Mb'(megabit). Fix them by replacing 'Mb' with 'MiB'(mebibyte).

[Tony: These are all "edac_dbg()" messages, so this won't break scripts
       that parse console logs]

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
 drivers/edac/i3200_edac.c  | 2 +-
 drivers/edac/i7core_edac.c | 2 +-
 drivers/edac/sb_edac.c     | 2 +-
 drivers/edac/skx_edac.c    | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
index d92d56cee101..299b441647cd 100644
--- a/drivers/edac/i3200_edac.c
+++ b/drivers/edac/i3200_edac.c
@@ -399,7 +399,7 @@ static int i3200_probe1(struct pci_dev *pdev, int dev_idx)
 			if (nr_pages == 0)
 				continue;
 
-			edac_dbg(0, "csrow %d, channel %d%s, size = %ld Mb\n", i, j,
+			edac_dbg(0, "csrow %d, channel %d%s, size = %ld MiB\n", i, j,
 				 stacked ? " (stacked)" : "", PAGES_TO_MiB(nr_pages));
 
 			dimm->nr_pages = nr_pages;
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 8e120bf60624..bd65f573e381 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -597,7 +597,7 @@ static int get_dimm_config(struct mem_ctl_info *mci)
 			/* DDR3 has 8 I/O banks */
 			size = (rows * cols * banks * ranks) >> (20 - 3);
 
-			edac_dbg(0, "\tdimm %d %d Mb offset: %x, bank: %d, rank: %d, row: %#x, col: %#x\n",
+			edac_dbg(0, "\tdimm %d %d MiB offset: %x, bank: %d, rank: %d, row: %#x, col: %#x\n",
 				 j, size,
 				 RANKOFFSET(dimm_dod[j]),
 				 banks, ranks, rows, cols);
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 07726fb00321..7e5a092b4e9b 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1622,7 +1622,7 @@ static int __populate_dimms(struct mem_ctl_info *mci,
 				size = ((u64)rows * cols * banks * ranks) >> (20 - 3);
 				npages = MiB_TO_PAGES(size);
 
-				edac_dbg(0, "mc#%d: ha %d channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
+				edac_dbg(0, "mc#%d: ha %d channel %d, dimm %d, %lld MiB (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
 					 pvt->sbridge_dev->mc, pvt->sbridge_dev->dom, i, j,
 					 size, npages,
 					 banks, ranks, rows, cols);
diff --git a/drivers/edac/skx_edac.c b/drivers/edac/skx_edac.c
index fae095162c01..b2987efa2c6d 100644
--- a/drivers/edac/skx_edac.c
+++ b/drivers/edac/skx_edac.c
@@ -364,7 +364,7 @@ static int get_dimm_info(u32 mtr, u32 amap, struct dimm_info *dimm,
 	size = ((1ull << (rows + cols + ranks)) * banks) >> (20 - 3);
 	npages = MiB_TO_PAGES(size);
 
-	edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
+	edac_dbg(0, "mc#%d: channel %d, dimm %d, %lld MiB (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n",
 		 imc->mc, chan, dimmno, size, npages,
 		 banks, 1 << ranks, rows, cols);
 
@@ -424,7 +424,7 @@ static int get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc,
 	dimm->mtype = MEM_NVDIMM;
 	dimm->edac_mode = EDAC_SECDED; /* likely better than this */
 
-	edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu Mb (%u pages)\n",
+	edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu MiB (%u pages)\n",
 		 imc->mc, chan, dimmno, size >> 20, dimm->nr_pages);
 
 	snprintf(dimm->label, sizeof(dimm->label), "CPU_SrcID#%u_MC#%u_Chan#%u_DIMM#%u",

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-22 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19 14:33 EDAC: Fix DIMM capacity unit symbol Aristeu Rozanski
  -- strict thread matches above, loose matches on Subject: below --
2018-09-22 16:29 Borislav Petkov
2018-09-19  0:34 Luck, Tony

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.