]> www.infradead.org Git - users/hch/misc.git/commit
x86/cpu: Introduce and use CPUID leaf 0x2 parsing helpers
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:32:58 +0000 (14:32 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:22:06 +0000 (10:22 +0100)
commitfe78079ec07fd48a19abcfeac74bc97e07171fb6
tree08f3dcfa31f49e55fd9be1afdb73e5e33550ac34
parent09a1da4beb310420b720994f7b6599e8d0bce3e1
x86/cpu: Introduce and use CPUID leaf 0x2 parsing helpers

Introduce CPUID leaf 0x2 parsing helpers at <asm/cpuid/leaf_0x2_api.h>.
This allows sharing the leaf 0x2's output validation and iteration logic
across both x86/cpu intel.c and cacheinfo.c.

Start by converting intel.c to the new API.

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-4-darwi@linutronix.de
arch/x86/include/asm/cpuid.h
arch/x86/include/asm/cpuid/leaf_0x2_api.h [new file with mode: 0644]
arch/x86/include/asm/cpuid/types.h
arch/x86/kernel/cpu/intel.c