summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2021-10-05 18:44:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 21:16:30 +0300
commitd0b693aa948b7d73d4c102c6bdc238a3240bca4e (patch)
treeae15df6ebd504be2fc3173f5f831169a81b07b9e /kernel
parent3357b8a431b3c2b5ef443a134b5abf702ef927a7 (diff)
downloadlinux-d0b693aa948b7d73d4c102c6bdc238a3240bca4e.tar.xz
EDAC/amd64: Handle three rank interleaving mode
[ Upstream commit 9f4873fb6af7966de8fcbd95c36b61351c1c4b1f ] AMD Rome systems and later support interleaving between three identical ranks within a channel. Check for this mode by counting the number of enabled chip selects and comparing their masks. If there are exactly three enabled chip selects and their masks are identical, then three rank interleaving is enabled. The size of a rank is determined from its mask value. However, three rank interleaving doesn't follow the method of swapping an interleave bit with the most significant bit. Rather, the interleave bit is flipped and the most significant bit remains the same. There is only a single interleave bit in this case. Account for this when determining the chip select size by keeping the most significant bit at its original value and ignoring any zero bits. This will return a full bitmask in [MSB:1]. Fixes: e53a3b267fb0 ("EDAC/amd64: Find Chip Select memory size using Address Mask") Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20211005154419.2060504-1-yazen.ghannam@amd.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions