From: Ahmed S. Darwish Date: Thu, 8 May 2025 15:02:36 +0000 (+0200) Subject: x86/cpu/intel: Rename CPUID(0x2) descriptors iterator parameter X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=119deb95b0bc2793d4b002549444ce0aec346b4f;p=users%2Fdwmw2%2Flinux.git x86/cpu/intel: 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/cpu call-site, rename the parameter denoting the parsed descriptor at each iteration from 'entry' to 'desc'. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Cc: H. Peter Anvin Cc: Andrew Cooper Cc: John Ogness Cc: x86-cpuid@lists.linux.dev Link: https://lore.kernel.org/r/20250508150240.172915-8-darwi@linutronix.de --- diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index f8141b5d3e303..076eaa41b8c81 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -648,11 +648,11 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size) } #endif -static void intel_tlb_lookup(const struct leaf_0x2_table *entry) +static void intel_tlb_lookup(const struct leaf_0x2_table *desc) { - short entries = entry->entries; + short entries = desc->entries; - switch (entry->t_type) { + switch (desc->t_type) { case STLB_4K: tlb_lli_4k = max(tlb_lli_4k, entries); tlb_lld_4k = max(tlb_lld_4k, entries); @@ -709,7 +709,7 @@ static void intel_tlb_lookup(const struct leaf_0x2_table *entry) static void intel_detect_tlb(struct cpuinfo_x86 *c) { - const struct leaf_0x2_table *entry; + const struct leaf_0x2_table *desc; union leaf_0x2_regs regs; u8 *ptr; @@ -717,8 +717,8 @@ static void intel_detect_tlb(struct cpuinfo_x86 *c) return; cpuid_leaf_0x2(®s); - for_each_cpuid_0x2_desc(regs, ptr, entry) - intel_tlb_lookup(entry); + for_each_cpuid_0x2_desc(regs, ptr, desc) + intel_tlb_lookup(desc); } static const struct cpu_dev intel_cpu_dev = {