EDAC/amd64: Save max number of controllers to family type
authorYazen Ghannam <yazen.ghannam@amd.com>
Tue, 22 Oct 2019 20:35:11 +0000 (20:35 +0000)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Nov 2019 10:07:01 +0000 (11:07 +0100)
commit5e4c55276ae8758f5789722b384bb2ab3de3a24f
treead567a861183e681c66838a9992a18bf68bb863f
parent80355a3b2db9d0b713af5169e2cdd7f8fbfdad82
EDAC/amd64: Save max number of controllers to family type

The maximum number of memory controllers is fixed within a family/model
group. In most cases, this has been fixed at 2, but some systems may
have up to 8.

The struct amd64_family_type already contains family/model-specific
information, and this can be used rather than adding model checks to
various functions.

Create a new field in struct amd64_family_type for max_mcs.
Set this when setting other family type information, and use this when
needing the maximum number of memory controllers possible for a system.

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: Robert Richter <rrichter@marvell.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20191106012448.243970-4-Yazen.Ghannam@amd.com
drivers/edac/amd64_edac.c
drivers/edac/amd64_edac.h