Re: [PATCH v5 04/35] x86/cpuid: Rename cpuid_leaf()/cpuid_subleaf() APIs

Borislav Petkov <[email protected]> Tue, 28 Oct 2025 18:50:39 +0100
Newsgroups dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel
Message-ID <20251028175039.GCaQECb5EqT1_pwqX3@fat_crate.local>
On Fri, Sep 05, 2025 at 02:14:44PM +0200, Ahmed S. Darwish wrote:
> diff --git a/arch/x86/include/asm/cpuid/api.h b/arch/x86/include/asm/cpuid/api.h
> index 44fa82e1267c..2b9750cc8a75 100644
> --- a/arch/x86/include/asm/cpuid/api.h
> +++ b/arch/x86/include/asm/cpuid/api.h
> @@ -131,12 +131,12 @@ static inline void __cpuid_read(u32 leaf, u32 subleaf, u32 *regs)
>  	__cpuid(regs + CPUID_EAX, regs + CPUID_EBX, regs + CPUID_ECX, regs + CPUID_EDX);
>  }
>  
> -#define cpuid_subleaf(leaf, subleaf, regs) {		\
> +#define cpuid_read_subleaf(leaf, subleaf, regs) {	\
>  	static_assert(sizeof(*(regs)) == 16);		\
>  	__cpuid_read(leaf, subleaf, (u32 *)(regs));	\
>  }
>  
> -#define cpuid_leaf(leaf, regs) {			\
> +#define cpuid_read(leaf, regs) {			\

Are we getting rid of that "cpuid_read" thing eventually?

Because with CPUID the only thing you can do is read - no write.

That can be sorted out when the dust settles...


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette