android_kernel_xiaomi_sm8350/drivers/edac
Yazen Ghannam 62f6260f70 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: e53a3b267f ("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>
2021-11-17 09:48:36 +01:00
..
altera_edac.c
altera_edac.h
amd64_edac_dbg.c
amd64_edac_inj.c
amd64_edac.c EDAC/amd64: Handle three rank interleaving mode 2021-11-17 09:48:36 +01:00
amd64_edac.h
amd76x_edac.c
amd8111_edac.c
amd8111_edac.h
amd8131_edac.c
amd8131_edac.h
armada_xp_edac.c EDAC/armada-xp: Fix output of uncorrectable error counter 2021-10-20 11:40:14 +02:00
aspeed_edac.c
bluefield_edac.c
cell_edac.c
cpc925_edac.c
debugfs.c
e7xxx_edac.c
e752x_edac.c
edac_device_sysfs.c
edac_device.c
edac_device.h
edac_mc_sysfs.c
edac_mc.c
edac_mc.h
edac_module.c
edac_module.h
edac_pci_sysfs.c
edac_pci.c
edac_pci.h
fsl_ddr_edac.c
fsl_ddr_edac.h
ghes_edac.c
highbank_l2_edac.c
highbank_mc_edac.c
i7core_edac.c
i10nm_base.c EDAC/i10nm: Fix NVDIMM detection 2021-09-15 09:47:30 +02:00
i3000_edac.c
i3200_edac.c
i5000_edac.c
i5100_edac.c
i5400_edac.c
i7300_edac.c
i82443bxgx_edac.c
i82860_edac.c
i82875p_edac.c
i82975x_edac.c
ie31200_edac.c
Kconfig
layerscape_edac.c
Makefile
mce_amd.c
mce_amd.h
mpc85xx_edac.c
mpc85xx_edac.h
mv64x60_edac.c
mv64x60_edac.h
octeon_edac-l2c.c
octeon_edac-lmc.c
octeon_edac-pc.c
octeon_edac-pci.c
pasemi_edac.c
pnd2_edac.c EDAC/Intel: Do not load EDAC driver when running as a guest 2021-07-14 16:53:18 +02:00
pnd2_edac.h
ppc4xx_edac.c
ppc4xx_edac.h
qcom_edac.c
r82600_edac.c
sb_edac.c EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell 2021-11-17 09:48:22 +01:00
sifive_edac.c
skx_base.c EDAC/Intel: Do not load EDAC driver when running as a guest 2021-07-14 16:53:18 +02:00
skx_common.c
skx_common.h
synopsys_edac.c EDAC/synopsys: Fix wrong value type assignment for edac_mode 2021-09-30 10:09:26 +02:00
thunderx_edac.c
ti_edac.c EDAC/ti: Add missing MODULE_DEVICE_TABLE 2021-07-14 16:53:16 +02:00
wq.c
x38_edac.c
xgene_edac.c