[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241018161956.GCZxKKrLeTg0VTdfWA@fat_crate.local>
Date: Fri, 18 Oct 2024 18:19:56 +0200
From: Borislav Petkov <bp@...en8.de>
To: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
daniel.sneddon@...ux.intel.com, tony.luck@...el.com,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux-perf-users@...r.kernel.org,
Josh Poimboeuf <jpoimboe@...nel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Brice Goglin <brice.goglin@...il.com>,
Mario Limonciello <mario.limonciello@....com>,
Perry Yuan <Perry.Yuan@....com>,
Dapeng Mi <dapeng1.mi@...ux.intel.com>
Subject: Re: [PATCH v4 02/10] x86/cpu/topology: Add CPU type to struct
cpuinfo_topology
On Mon, Sep 30, 2024 at 07:47:24AM -0700, Pawan Gupta wrote:
> Subject: Re: [PATCH v4 02/10] x86/cpu/topology: Add CPU type to struct...
x86/cpu: ...
is enough.
> diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
> index 4a686f0e5dbf..61c8336bc99b 100644
> --- a/arch/x86/include/asm/processor.h
> +++ b/arch/x86/include/asm/processor.h
> @@ -105,6 +105,17 @@ struct cpuinfo_topology {
> // Cache level topology IDs
> u32 llc_id;
> u32 l2c_id;
> +
> + // Hardware defined CPU-type
> + union {
> + u32 hw_cpu_type;
> + struct {
> + /* CPUID.1A.EAX[23-0] */
Might as well stick to only // comments as we do those in headers now.
> + u32 intel_core_native_model_id:24;
wow, that needs a whole breath to speak: "intel_core_native_model_id".
"core" and "native" look like they wanna go. What is that field supposed to
mean even?
> + /* CPUID.1A.EAX[31-24] */
> + u32 intel_core_type:8;
> + };
> + };
> };
...
> +enum x86_topology_hw_cpu_type topology_hw_cpu_type(struct cpuinfo_x86 *c)
> +{
> + if (c->x86_vendor == X86_VENDOR_INTEL)
> + return c->topo.intel_core_type;
> +
> + return c->topo.hw_cpu_type;
Huh, the other vendors are not enabled. This should return
TOPO_HW_CPU_TYPE_UNKNOWN then.
I know, it does but make explicit pls.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists