x86/cacheinfo: Use consolidated CPUID leaf 0x2 descriptor table
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:16 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:23:08 +0000 (10:23 +0100)
commitda23a6259844b576d98ad5c633eb437d3a2d90d3
treee9bb15a0d8533f88f4b8d2c9b513aada405ef55e
parent37aedb806bc68ff23bd0d90dce1564bfb0dca911
x86/cacheinfo: 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 old cache-specific
mapping, cache_table[], as it is no longer used.

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