From: Namhyung Kim <namhyung@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Stephane Eranian <eranian@google.com>,
Dapeng Mi <dapeng1.mi@linux.intel.com>
Subject: [PATCH] perf/x86/intel: Keep anythread_deprecated capability
Date: Mon, 13 Apr 2026 14:29:33 -0700 [thread overview]
Message-ID: <20260413212933.2495502-1-namhyung@kernel.org> (raw)
In update_pmu_cap(), it reads MSR_IA32_PERF_CAPABILITIES on non-MTL CPUs
to update the PMU capabilities. But it resets the anythread_deprecated
bit on GNR so I can see /sys/bus/event_source/devices/cpu/format/any
even if dmesg says AnyThread is deprecated.
# dmesg | grep -A10 AnyThread
[ 10.662423] Performance Events: XSAVE Architectural LBR, PEBS fmt5+-baseline, AnyThread deprecated, Granite Rapids events, 32-deep LBR, full-width counters, Intel PMU driver.
[ 10.663172] ... version: 5
[ 10.663173] ... bit width: 48
[ 10.663174] ... generic counters: 8
[ 10.663174] ... generic bitmap: 00000000000000ff
[ 10.663175] ... fixed-purpose counters: 4
[ 10.663176] ... fixed-purpose bitmap: 000000000000000f
[ 10.663176] ... value mask: 0000ffffffffffff
[ 10.663177] ... max period: 00007fffffffffff
[ 10.663178] ... global_ctrl mask: 0001000f000000ff
[ 10.668979] signal: max sigframe size: 11952
I guess it's not intentional and we want to keep deprecating anythread
on these machines.
Fixes: 25c623f41438fafc ("perf/x86/intel: Parse CPUID archPerfmonExt leaves for non-hybrid CPUs")
Cc: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
arch/x86/events/intel/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 4768236c054bbcf8..f1fae640cc8e5991 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -5945,8 +5945,12 @@ static void update_pmu_cap(struct pmu *pmu)
}
if (!intel_pmu_broken_perf_cap()) {
+ bool anythread = hybrid(pmu, intel_cap).anythread_deprecated;
+
/* Perf Metric (Bit 15) and PEBS via PT (Bit 16) are hybrid enumeration */
rdmsrq(MSR_IA32_PERF_CAPABILITIES, hybrid(pmu, intel_cap).capabilities);
+ /* It seems anythread_deprecated is deleted unintentionally */
+ hybrid(pmu, intel_cap).anythread_deprecated = anythread;
}
}
--
2.54.0.rc0.605.g598a273b03-goog
next reply other threads:[~2026-04-13 21:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 21:29 Namhyung Kim [this message]
2026-04-14 2:09 ` [PATCH] perf/x86/intel: Keep anythread_deprecated capability Mi, Dapeng
2026-04-14 6:56 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260413212933.2495502-1-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox