summaryrefslogtreecommitdiff
path: root/drivers/edac
diff options
context:
space:
mode:
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>2024-08-14 14:10:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-04 16:29:56 +0200
commite0be8f2d64d65c8b7a93f10b25c5631abc892661 (patch)
tree8ec3517bba54360563e1bf7f146bcd5a4a138197 /drivers/edac
parent2a4a997adb36b06b49d5664b99bf9ba211a3d784 (diff)
downloadlinux-e0be8f2d64d65c8b7a93f10b25c5631abc892661.tar.gz
linux-e0be8f2d64d65c8b7a93f10b25c5631abc892661.tar.bz2
linux-e0be8f2d64d65c8b7a93f10b25c5631abc892661.zip
EDAC/igen6: Fix conversion of system address to physical memory address
commit 0ad875f442e95d69a1145a38aabac2fd29984fe3 upstream. The conversion of system address to physical memory address (as viewed by the memory controller) by igen6_edac is incorrect when the system address is above the TOM (Total amount Of populated physical Memory) for Elkhart Lake and Ice Lake (Neural Network Processor). Fix this conversion. Fixes: 10590a9d4f23 ("EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC") Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/stable/20240814061011.43545-1-qiuxu.zhuo%40intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/igen6_edac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c
index a2984e9bed3a..a0edb61a5a01 100644
--- a/drivers/edac/igen6_edac.c
+++ b/drivers/edac/igen6_edac.c
@@ -245,7 +245,7 @@ static u64 ehl_err_addr_to_imc_addr(u64 eaddr, int mc)
if (igen6_tom <= _4GB)
return eaddr + igen6_tolud - _4GB;
- if (eaddr < _4GB)
+ if (eaddr >= igen6_tom)
return eaddr + igen6_tolud - igen6_tom;
return eaddr;