[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a33e1b1-0371-4a4e-a04d-2d76595362ab@linux.intel.com>
Date: Wed, 19 Feb 2025 15:11:37 -0500
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Sohil Mehta <sohil.mehta@...el.com>, x86@...nel.org,
Dave Hansen <dave.hansen@...ux.intel.com>, Tony Luck <tony.luck@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>, Thomas Gleixner
<tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>, "Rafael J . Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, Andy Lutomirski <luto@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>, Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>, Zhang Rui <rui.zhang@...el.com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
David Laight <david.laight.linux@...il.com>,
Dapeng Mi <dapeng1.mi@...ux.intel.com>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v3 15/15] perf/x86/p4: Replace Pentium 4 model checks with
VFM ones
On 2025-02-19 1:41 p.m., Sohil Mehta wrote:
> Introduce names for some old pentium 4 models and replace x86_model
> checks with VFM ones.
>
> Signed-off-by: Sohil Mehta <sohil.mehta@...el.com>
Reviewed-by: Kan Liang <kan.liang@...ux.intel.com>
Thanks,
Kan
> ---
> v3: No change.
> v2: No change.
> ---
> arch/x86/events/intel/p4.c | 7 ++++---
> arch/x86/include/asm/intel-family.h | 1 +
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/events/intel/p4.c b/arch/x86/events/intel/p4.c
> index 844bc4fc4724..fb726c6fc6e7 100644
> --- a/arch/x86/events/intel/p4.c
> +++ b/arch/x86/events/intel/p4.c
> @@ -10,6 +10,7 @@
> #include <linux/perf_event.h>
>
> #include <asm/perf_event_p4.h>
> +#include <asm/cpu_device_id.h>
> #include <asm/hardirq.h>
> #include <asm/apic.h>
>
> @@ -732,9 +733,9 @@ static bool p4_event_match_cpu_model(unsigned int event_idx)
> {
> /* INSTR_COMPLETED event only exist for model 3, 4, 6 (Prescott) */
> if (event_idx == P4_EVENT_INSTR_COMPLETED) {
> - if (boot_cpu_data.x86_model != 3 &&
> - boot_cpu_data.x86_model != 4 &&
> - boot_cpu_data.x86_model != 6)
> + if (boot_cpu_data.x86_vfm != INTEL_P4_PRESCOTT &&
> + boot_cpu_data.x86_vfm != INTEL_P4_PRESCOTT_2M &&
> + boot_cpu_data.x86_vfm != INTEL_P4_CEDARMILL)
> return false;
> }
>
> diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
> index 6621d796bb3d..89cb545d521b 100644
> --- a/arch/x86/include/asm/intel-family.h
> +++ b/arch/x86/include/asm/intel-family.h
> @@ -193,6 +193,7 @@
> /* Family 15 - NetBurst */
> #define INTEL_P4_WILLAMETTE IFM(15, 0x01) /* Also Xeon Foster */
> #define INTEL_P4_PRESCOTT IFM(15, 0x03)
> +#define INTEL_P4_PRESCOTT_2M IFM(15, 0x04)
> #define INTEL_P4_CEDARMILL IFM(15, 0x06) /* Also Xeon Dempsey */
>
> /* Family 19 */
Powered by blists - more mailing lists