]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/cacheinfo: Clarify type markers for CPUID leaf 0x2 cache descriptors
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 13:33:12 +0000 (14:33 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 09:22:52 +0000 (10:22 +0100)
commit7596ab7a107bf70d571d75ad6ae078127f5ea11b
treed3b90146ee2a5fd080539268320233178ecf333d
parenteb1c7c08c5a8155d0d2d0a6c7fd741039b7287f1
x86/cacheinfo: Clarify type markers for CPUID leaf 0x2 cache descriptors

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

Two separate tables exist for interpreting these descriptors: one for
TLBs at intel.c and one for caches at cacheinfo.c.  These mapping tables
will be merged in further commits, among other improvements to their
model.

In preparation for this, use more descriptive type names for the leaf
0x2 descriptors associated with cpu caches.  Namely:

LVL_1_INST => CACHE_L1_INST
LVL_1_DATA => CACHE_L1_DATA
LVL_2 => CACHE_L2
LVL_3 => CACHE_L3

After the TLB and cache descriptors mapping tables are merged, this will
make it clear that such descriptors correspond to cpu caches.

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