]> git.baikalelectronics.ru Git - kernel.git/commit
EDAC/skx: Fix overflows on the DRAM row address mapping arrays
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Sat, 11 Feb 2023 01:17:28 +0000 (09:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:08 +0000 (23:03 +0900)
commitcfa403d4683b6ebd1604c59b310144bc1953e08f
treeae103c8ed44f3194af021374985181891dda1a5c
parentd22af4ea35b5bca6671772db2f5765870858fd9b
EDAC/skx: Fix overflows on the DRAM row address mapping arrays

[ Upstream commit 71b1e3ba3fed5a34c5fac6d3a15c2634b04c1eb7 ]

The current DRAM row address mapping arrays skx_{open,close}_row[]
only support ranks with sizes up to 16G. Decoding a rank address
to a DRAM row address for a 32G rank by using either one of the
above arrays by the skx_edac driver, will result in an overflow on
the array.

For a 32G rank, the most significant DRAM row address bit (the
bit17) is mapped from the bit34 of the rank address. Add this new
mapping item to both arrays to fix the overflow issue.

Fixes: 203349138022 ("EDAC, skx_edac: Add EDAC driver for Skylake")
Reported-by: Feng Xu <feng.f.xu@intel.com>
Tested-by: Feng Xu <feng.f.xu@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/all/20230211011728.71764-1-qiuxu.zhuo@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/edac/skx_base.c