]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/cacheinfo: Separate Intel CPUID leaf 0x4 handling
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:19 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:23:18 +0000 (10:23 +0100)
commit66122616e212f1b9fee7d03582a5fdab2e8ed0e4
tree2d65677b96a5b0439af2da37df5cb3ebc3268105
parent5adfd367589cf9bb984aabfab74107bcf4402fde
x86/cacheinfo: Separate Intel CPUID leaf 0x4 handling

init_intel_cacheinfo() was overly complex.  It parsed leaf 0x4 data,
leaf 0x2 data, and performed post-processing, all within one function.
Parent commit moved leaf 0x2 parsing and the post-processing logic into
their own functions.

Continue the refactoring by extracting leaf 0x4 parsing into its own
function.  Initialize local L2/L3 topology ID variables to BAD_APICID by
default, thus ensuring they can be used unconditionally.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250324133324.23458-25-darwi@linutronix.de
arch/x86/kernel/cpu/cacheinfo.c