Skip to content

Commit 4b21e71

Browse files
Ahmed S. DarwishIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Andrew Cooper <[email protected]> Cc: John Ogness <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent e7df728 commit 4b21e71

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/x86/kernel/cpu/cacheinfo.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -381,20 +381,20 @@ static void intel_cacheinfo_done(struct cpuinfo_x86 *c, unsigned int l3,
381381
static void intel_cacheinfo_0x2(struct cpuinfo_x86 *c)
382382
{
383383
unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0;
384-
const struct leaf_0x2_table *entry;
384+
const struct leaf_0x2_table *desc;
385385
union leaf_0x2_regs regs;
386386
u8 *ptr;
387387

388388
if (c->cpuid_level < 2)
389389
return;
390390

391391
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;
398398
}
399399
}
400400

0 commit comments

Comments
 (0)