Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/cacheinfo: Rename CPUID(0x2) descriptors iterator parameter

The CPUID(0x2) descriptors iterator has been renamed from:

for_each_leaf_0x2_entry()

to:

for_each_cpuid_0x2_desc()

since it iterates over CPUID(0x2) cache and TLB "descriptors", not
"entries".

In the macro's x86/cacheinfo call-site, rename the parameter denoting the
parsed descriptor at each iteration from 'entry' to 'desc'.

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: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: x86-cpuid@lists.linux.dev
Link: https://lore.kernel.org/r/20250508150240.172915-7-darwi@linutronix.de

authored by

Ahmed S. Darwish and committed by
Ingo Molnar
4b21e71a e7df7289

+7 -7
+7 -7
arch/x86/kernel/cpu/cacheinfo.c
··· 381 381 static void intel_cacheinfo_0x2(struct cpuinfo_x86 *c) 382 382 { 383 383 unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; 384 - const struct leaf_0x2_table *entry; 384 + const struct leaf_0x2_table *desc; 385 385 union leaf_0x2_regs regs; 386 386 u8 *ptr; 387 387 ··· 389 389 return; 390 390 391 391 cpuid_leaf_0x2(&regs); 392 - for_each_cpuid_0x2_desc(regs, ptr, entry) { 393 - switch (entry->c_type) { 394 - case CACHE_L1_INST: l1i += entry->c_size; break; 395 - case CACHE_L1_DATA: l1d += entry->c_size; break; 396 - case CACHE_L2: l2 += entry->c_size; break; 397 - case CACHE_L3: l3 += entry->c_size; break; 392 + for_each_cpuid_0x2_desc(regs, ptr, desc) { 393 + switch (desc->c_type) { 394 + case CACHE_L1_INST: l1i += desc->c_size; break; 395 + case CACHE_L1_DATA: l1d += desc->c_size; break; 396 + case CACHE_L2: l2 += desc->c_size; break; 397 + case CACHE_L3: l3 += desc->c_size; break; 398 398 } 399 399 } 400 400