[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250310104844.GDZ87DjFQef8GaREqg@fat_crate.local>
Date: Mon, 10 Mar 2025 11:48:44 +0100
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 v7 3/4] x86/cpu: Update x86_match_cpu() to also use
cpu-type
On Thu, Mar 06, 2025 at 06:18:36PM -0800, Pawan Gupta wrote:
> +static bool x86_match_vendor_cpu_type(struct cpuinfo_x86 *c, const struct x86_cpu_id *m)
> +{
> + if (m->cpu_type == X86_CPU_TYPE_ANY)
> + return true;
> +
> + /* Hybrid CPUs are special, they are assumed to match all cpu-types */
> + if (boot_cpu_has(X86_FEATURE_HYBRID_CPU))
check_for_deprecated_apis: WARNING: arch/x86/kernel/cpu/match.c:25: Do not use boot_cpu_has() - use cpu_feature_enabled() instead.
> + return true;
> +
> + if (c->x86_vendor == X86_VENDOR_INTEL)
> + return m->cpu_type == c->topo.intel_type;
> + if (c->x86_vendor == X86_VENDOR_AMD)
> + return m->cpu_type == c->topo.amd_type;
> +
> + return false;
> +}
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists