]> git.ipfire.org Git - thirdparty/linux.git/commit
EDAC/amd64: Remove NUM_CONTROLLERS macro
authorAvadhut Naik <avadhut.naik@amd.com>
Thu, 6 Nov 2025 01:54:45 +0000 (01:54 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 6 Nov 2025 11:51:33 +0000 (12:51 +0100)
commit6a857969150908ff1deebb8b368a872281d103bd
treebd97f69ca935e5bb60e5c6e9a43f77e47321c496
parente9abd990aefd7d8a64f90fff2d391e42b8d512f7
EDAC/amd64: Remove NUM_CONTROLLERS macro

Currently, the NUM_CONTROLLERS macro is used to limit the amount of memory
controllers (UMCs) available per node. The number of UMCs available per node,
however, is already cached by the max_mcs variable of struct amd64_pvt.

Allocate the relevant data structures dynamically using the variable instead
of static allocation through the macro.

The max_mcs variable is used for legacy systems too. These systems have a max
of 2 controllers. Since the default value of max_mcs, set in per_family_init(),
is 2, these legacy systems are also covered.

Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20251106015727.1987246-1-avadhut.naik@amd.com
drivers/edac/amd64_edac.c
drivers/edac/amd64_edac.h