Re: [PATCH v1 8/9] x86/cpuid: Rename native_cpuid() to cpuid_native()
Ingo Molnar <[email protected]>
| Newsgroups | dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
* Ahmed S. Darwish <[email protected]> wrote: > In order to let all the APIs under <cpuid/api.h> have a shared "cpuid_" > namespace, rename native_cpuid() to cpuid_native(). > > Adjust all call-sites accordingly. > > Suggested-by: Ingo Molnar <[email protected]> > Signed-off-by: Ahmed S. Darwish <[email protected]> > --- > arch/x86/boot/compressed/sev.c | 6 +++--- > arch/x86/include/asm/cpuid/api.h | 6 +++--- > arch/x86/kernel/cpu/microcode/intel.c | 2 +- > arch/x86/kernel/cpu/microcode/internal.h | 4 ++-- > arch/x86/kernel/paravirt.c | 2 +- > arch/x86/mm/mem_encrypt_identity.c | 6 +++--- > arch/x86/xen/enlighten_pv.c | 4 ++-- > 7 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c > index f054bf52c10a..4b617f8f9b7f 100644 > --- a/arch/x86/boot/compressed/sev.c > +++ b/arch/x86/boot/compressed/sev.c > @@ -494,7 +494,7 @@ static int sev_check_cpu_support(void) > /* Check for the SME/SEV support leaf */ > eax = 0x80000000; > ecx = 0; > - native_cpuid(&eax, &ebx, &ecx, &edx); > + cpuid_native(&eax, &ebx, &ecx, &edx); > if (eax < 0x8000001f) > return -ENODEV; I'm torn about this one. native_*() is a pretty generic way to denote baremetal methods, all around the x86 tree: starship:~/tip> git grep -E '\<native_' arch/x86/ | wc -l 682 Likewise for: native_cpuid_eax() native_cpuid_ebx() native_cpuid_ecx() native_cpuid_edx() I think it might be better to leave these as native_cpuid_*, because shifting a naming inconsistency into another namespace isn't really a net improvement. 'git grep cpuid_eax' will still give meaningful results, so greppability of cpuid_ APIs only suffers somewhat. The for_each_cpuid_ methods are already outliers. There's always a bigger fish^W prefix. ;-) Thanks, Ingo