]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
EDAC/amd64: Support more than two controllers for chip selects handling
authorYazen Ghannam <yazen.ghannam@amd.com>
Wed, 21 Aug 2019 23:59:55 +0000 (23:59 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:25:54 +0000 (04:25 -0400)
commit05f664ac63b7cea3b8e66783788931dc79b5256c
tree356aaa529d67d0b8f17776b56cf981782e002114
parente044f3dfb528d9442f29c7037f860f6181e89481
EDAC/amd64: Support more than two controllers for chip selects handling

BugLink: https://bugs.launchpad.net/bugs/1848046
[ Upstream commit d971e28e2ce4696fcc32998c8aced5e47701fffe ]

The struct chip_select array that's used for saving chip select bases
and masks is fixed at length of two. There should be one struct
chip_select for each controller, so this array should be increased to
support systems that may have more than two controllers.

Increase the size of the struct chip_select array to eight, which is the
largest number of controllers per die currently supported on AMD
systems.

Fix number of DIMMs and Chip Select bases/masks on Family17h, because
AMD Family 17h systems support 2 DIMMs, 4 CS bases, and 2 CS masks per
channel.

Also, carve out the Family 17h+ reading of the bases/masks into a
separate function. This effectively reverts the original bases/masks
reading code to before Family 17h support was added.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20190821235938.118710-2-Yazen.Ghannam@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/edac/amd64_edac.c
drivers/edac/amd64_edac.h