Commit 6a85796
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.com1 parent e9abd99 commit 6a85796
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3732 | 3732 | | |
3733 | 3733 | | |
3734 | 3734 | | |
| 3735 | + | |
3735 | 3736 | | |
3736 | 3737 | | |
3737 | 3738 | | |
| |||
3915 | 3916 | | |
3916 | 3917 | | |
3917 | 3918 | | |
| 3919 | + | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
3918 | 3923 | | |
3919 | 3924 | | |
3920 | 3925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
348 | 347 | | |
349 | 348 | | |
350 | 349 | | |
351 | | - | |
| 350 | + | |
352 | 351 | | |
353 | 352 | | |
354 | 353 | | |
| |||
0 commit comments