]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/cacheinfo: Separate CPUID leaf 0x2 handling and post-processing logic
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:18 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:23:15 +0000 (10:23 +0100)
commit5adfd367589cf9bb984aabfab74107bcf4402fde
tree45744674c3cf35df3b46d3fe757930e07e82f12e
parent4772304ee651b952fd098ec80a8298af9905743f
x86/cacheinfo: Separate CPUID leaf 0x2 handling and post-processing logic

The logic of init_intel_cacheinfo() is quite convoluted: it mixes leaf
0x4 parsing, leaf 0x2 parsing, plus some post-processing, in a single
place.

Begin simplifying its logic by extracting the leaf 0x2 parsing code, and
the post-processing logic, into their own functions.  While at it,
rework the SMT LLC topology ID comment for clarity.

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-24-darwi@linutronix.de
arch/x86/kernel/cpu/cacheinfo.c