]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/cacheinfo: Rename CPUID(0x2) descriptors iterator parameter
authorAhmed S. Darwish <darwi@linutronix.de>
Thu, 8 May 2025 15:02:35 +0000 (17:02 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 16 May 2025 08:49:55 +0000 (10:49 +0200)
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
arch/x86/kernel/cpu/cacheinfo.c

index b6349c1792dd56a146ebfb191aa1c93339ed209f..adfa7e8bb865571cbcfc20c471be8f8bc7183e63 100644 (file)
@@ -381,7 +381,7 @@ static void intel_cacheinfo_done(struct cpuinfo_x86 *c, unsigned int l3,
 static void intel_cacheinfo_0x2(struct cpuinfo_x86 *c)
 {
        unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0;
-       const struct leaf_0x2_table *entry;
+       const struct leaf_0x2_table *desc;
        union leaf_0x2_regs regs;
        u8 *ptr;
 
@@ -389,12 +389,12 @@ static void intel_cacheinfo_0x2(struct cpuinfo_x86 *c)
                return;
 
        cpuid_leaf_0x2(&regs);
-       for_each_cpuid_0x2_desc(regs, ptr, entry) {
-               switch (entry->c_type) {
-               case CACHE_L1_INST:     l1i += entry->c_size; break;
-               case CACHE_L1_DATA:     l1d += entry->c_size; break;
-               case CACHE_L2:          l2  += entry->c_size; break;
-               case CACHE_L3:          l3  += entry->c_size; break;
+       for_each_cpuid_0x2_desc(regs, ptr, desc) {
+               switch (desc->c_type) {
+               case CACHE_L1_INST:     l1i += desc->c_size; break;
+               case CACHE_L1_DATA:     l1d += desc->c_size; break;
+               case CACHE_L2:          l2  += desc->c_size; break;
+               case CACHE_L3:          l3  += desc->c_size; break;
                }
        }