]> git.ipfire.org Git - thirdparty/linux.git/commit
EDAC/skx_common: Swap memory controller index mapping
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Thu, 31 Jul 2025 14:55:30 +0000 (22:55 +0800)
committerTony Luck <tony.luck@intel.com>
Tue, 19 Aug 2025 23:23:46 +0000 (16:23 -0700)
commit30b47b71fdc0091db5a4fa9503ad630aeb0ab3eb
tree63c6ce4aade0540e3066d21368e6082d9b07cb6d
parent59cfc06a874e01633865d0b05eba47b09b8b3a8f
EDAC/skx_common: Swap memory controller index mapping

The current mapping of memory controller indices is from physical index [1]
to logical index [2], as show below:

  skx_dev->imc[pmc].mc_mapping = lmc

Since skx_dev->imc[] is an array of present memory controller instances,
mapping memory controller indices from logical index to physical index,
as show below, is more reasonable. This is also a preparatory step for
making skx_dev->imc[] a flexible array.

  skx_dev->imc[lmc].mc_mapping = pmc

Both mappings are equivalent. No functional changes intended.

[1] Indices for memory controllers include both those present to the
    OS and those disabled by BIOS.

[2] Indices for memory controllers present to the OS.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20250731145534.2759334-4-qiuxu.zhuo@intel.com
drivers/edac/skx_common.c