linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell
@ 2021-10-10 17:06 Eric Badger
  2021-10-11 15:34 ` Luck, Tony
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Badger @ 2021-10-10 17:06 UTC (permalink / raw)
  To: ebadger
  Cc: Meeta Saggi, Eric Badger, Tony Luck, Qiuxu Zhuo, Borislav Petkov,
	Mauro Carvalho Chehab, James Morse, Robert Richter,
	open list:EDAC-SBRIDGE, open list

The computation of TOHM is off by one bit. This missed bit results in
too low a value for TOHM, which can cause errors in regular memory to
incorrectly report:

  EDAC MC0: 1 CE Error at MMIOH area, on addr 0x000000207fffa680 on any memory

Reported-by: Meeta Saggi <msaggi@purestorage.com>
Signed-off-by: Eric Badger <ebadger@purestorage.com>
---
 drivers/edac/sb_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 4c626fc..1522d4a 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1052,7 +1052,7 @@ static u64 haswell_get_tohm(struct sbridge_pvt *pvt)
 	pci_read_config_dword(pvt->info.pci_vtd, HASWELL_TOHM_1, &reg);
 	rc = ((reg << 6) | rc) << 26;
 
-	return rc | 0x1ffffff;
+	return rc | 0x3ffffff;
 }
 
 static u64 knl_get_tolm(struct sbridge_pvt *pvt)
-- 


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

* Re: [PATCH] EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell
  2021-10-10 17:06 [PATCH] EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell Eric Badger
@ 2021-10-11 15:34 ` Luck, Tony
  0 siblings, 0 replies; 2+ messages in thread
From: Luck, Tony @ 2021-10-11 15:34 UTC (permalink / raw)
  To: Eric Badger
  Cc: Meeta Saggi, Qiuxu Zhuo, Borislav Petkov, Mauro Carvalho Chehab,
	James Morse, Robert Richter, open list:EDAC-SBRIDGE, open list

On Sun, Oct 10, 2021 at 10:06:56AM -0700, Eric Badger wrote:
> The computation of TOHM is off by one bit. This missed bit results in
> too low a value for TOHM, which can cause errors in regular memory to
> incorrectly report:
> 
>   EDAC MC0: 1 CE Error at MMIOH area, on addr 0x000000207fffa680 on any memory
> 
> Reported-by: Meeta Saggi <msaggi@purestorage.com>
> Signed-off-by: Eric Badger <ebadger@purestorage.com>

Applied (with added Fixes: tag and Cc: stable).

Thanks

-Tony

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

end of thread, other threads:[~2021-10-11 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-10 17:06 [PATCH] EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell Eric Badger
2021-10-11 15:34 ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).