From: Yicong Yang <yangyccccc@gmail.com>
To: will@kernel.org, mark.rutland@arm.com,
linux-arm-kernel@lists.infradead.org
Cc: yangyccccc@gmail.com
Subject: [PATCH -next] perf: arm_pmu: Fix build on arm if !CONFIG_GENERIC_ARCH_TOPOLOGY
Date: Tue, 4 Nov 2025 21:40:04 +0800 [thread overview]
Message-ID: <20251104134004.6964-1-yangyccccc@gmail.com> (raw)
The SMT implementation is retrieved by topology_core_has_smt() which
depends on CONFIG_GENERIC_ARCH_TOPOLOGY. The config is optional on
arm platforms so protect the usage with CONFIG_GENERIC_ARCH_TOPOLOGY.
Fixes: c3d78c34ad00 ("perf: arm_pmuv3: Don't use PMCCNTR_EL0 on SMT cores")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511041757.vuCGOmFc-lkp@intel.com/
Signed-off-by: Yicong Yang <yangyccccc@gmail.com>
---
drivers/perf/arm_pmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index ae437791b5f8..f38bdeb906f0 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -925,11 +925,13 @@ int armpmu_register(struct arm_pmu *pmu)
if (ret)
return ret;
+#ifdef CONFIG_GENERIC_ARCH_TOPOLOGY
/*
* By this stage we know our supported CPUs on either DT/ACPI platforms,
* detect the SMT implementation.
*/
pmu->has_smt = topology_core_has_smt(cpumask_first(&pmu->supported_cpus));
+#endif
if (!pmu->set_event_filter)
pmu->pmu.capabilities |= PERF_PMU_CAP_NO_EXCLUDE;
--
2.50.1 (Apple Git-155)
next reply other threads:[~2025-11-04 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 13:40 Yicong Yang [this message]
2025-11-04 16:33 ` [PATCH -next] perf: arm_pmu: Fix build on arm if !CONFIG_GENERIC_ARCH_TOPOLOGY Will Deacon
2025-11-05 8:01 ` Yicong Yang
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=20251104134004.6964-1-yangyccccc@gmail.com \
--to=yangyccccc@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=will@kernel.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;
as well as URLs for NNTP newsgroup(s).