Re: [PATCH v7 2/4] x86/cpu: Add cpu_type to struct x86_cpu_id
From: Borislav Petkov
Date: Sun Mar 09 2025 - 13:33:44 EST
On Thu, Mar 06, 2025 at 06:18:20PM -0800, Pawan Gupta wrote:
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index d67614f7b7f1..18e996acb49a 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -692,6 +692,7 @@ struct x86_cpu_id {
> __u16 feature; /* bit index */
> /* Solely for kernel-internal use: DO NOT EXPORT to userspace! */
> __u16 flags;
> + __u8 cpu_type;
The struct is called "x86_cpu_id" and all its members describe a CPU. There's
no need to have more "cpu_" redundancy in the member names - just call that
"type". It is clear that it is about a CPU's type.
The macro names having "CPU" - X86_CPU_TYPE_ANY - are fine I guess.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette