[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240618212801.GJZnH74Q4yknT-4X12@fat_crate.local>
Date: Tue, 18 Jun 2024 23:28:01 +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>
Subject: Re: [PATCH PATCH 1/9] x86/cpu/topology: Add x86_cpu_type to struct
cpuinfo_topology
On Mon, Jun 17, 2024 at 02:11:26AM -0700, Pawan Gupta wrote:
> --- a/arch/x86/include/asm/processor.h
> +++ b/arch/x86/include/asm/processor.h
> @@ -95,6 +95,9 @@ struct cpuinfo_topology {
> // Core ID relative to the package
> u32 core_id;
>
> + // CPU-type e.g. performance, efficiency etc.
> + u8 cpu_type;
> +
> // Logical ID mappings
> u32 logical_pkg_id;
> u32 logical_die_id;
> diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
> index abe3a8f22cbd..b28ad9422afb 100644
> --- a/arch/x86/include/asm/topology.h
> +++ b/arch/x86/include/asm/topology.h
> @@ -41,6 +41,14 @@
> /* Mappings between logical cpu number and node number */
> DECLARE_EARLY_PER_CPU(int, x86_cpu_to_node_map);
>
> +#define X86_CPU_TYPE_INTEL_SHIFT 24
> +
> +enum x86_topo_cpu_type {
> + X86_CPU_TYPE_UNKNOWN = 0,
> + X86_CPU_TYPE_INTEL_ATOM = 0x20,
> + X86_CPU_TYPE_INTEL_CORE = 0x40,
Can we unify those core types and do our own (our == Linux) defines instead of
using Intels or AMDs?
There will be AMD variants too soon:
https://lore.kernel.org/r/7aad57a98b37fa5893d4fe602d3dcef5c3f755d5.1718606975.git.perry.yuan@amd.com
so can we have generic defines like
PERF_CORE
EFF_CORE
bla_CORE
and so on
?
And then map each vendor's types to the Linux types?
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists