]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/cpu: Use consolidated CPUID leaf 0x2 descriptor table
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:17 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:23:12 +0000 (10:23 +0100)
commit4772304ee651b952fd098ec80a8298af9905743f
tree5c0af9df2a47dd3c96e0cbf6731ae481a86901f0
parentda23a6259844b576d98ad5c633eb437d3a2d90d3
x86/cpu: Use consolidated CPUID leaf 0x2 descriptor table

CPUID leaf 0x2 output is a stream of one-byte descriptors, each implying
certain details about the CPU's cache and TLB entries.

At previous commits, the mapping tables for such descriptors were merged
into one consolidated table.  The mapping was also transformed into a
hash lookup instead of a loop-based lookup for each descriptor.

Use the new consolidated table and its hash-based lookup through the
for_each_leaf_0x2_tlb_entry() accessor.

Remove the TLB-specific mapping, intel_tlb_table[], as it is now no
longer used.  Remove the <cpuid/types.h> macro, for_each_leaf_0x2_desc(),
since the converted code was its last user.

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-23-darwi@linutronix.de
arch/x86/include/asm/cpuid/types.h
arch/x86/kernel/cpu/intel.c