[PATCH v3 1/1] perf: arm_pmuv3: Don't use PMCCNTR_EL0 on SMT cores
Mark Brown
broonie at kernel.org
Thu Nov 6 06:33:47 PST 2025
On Mon, Sep 22, 2025 at 11:30:10AM +0800, Yicong Yang wrote:
> index d72d6e5aa200..daa1af2e8204 100644
> --- a/include/linux/arch_topology.h
> +++ b/include/linux/arch_topology.h
> @@ -89,6 +89,17 @@ void remove_cpu_topology(unsigned int cpuid);
> void reset_cpu_topology(void);
> int parse_acpi_topology(void);
> void freq_inv_set_max_ratio(int cpu, u64 max_rate);
> +
> +/*
> + * Architectures like ARM64 don't have reliable architectural way to get SMT
> + * information and depend on the firmware (ACPI/OF) report. Non-SMT core won't
> + * initialize thread_id so we can use this to detect the SMT implementation.
> + */
> +static inline bool topology_core_has_smt(int cpu)
> +{
> + return cpu_topology[cpu].thread_id != -1;
> +}
I'm seeing build failures in -next on arm v5 and v6:
/build/stage/linux/drivers/perf/arm_pmu.c: In function ‘armpmu_register’:
/build/stage/linux/drivers/perf/arm_pmu.c:935:24: error: implicit declaration of
function ‘topology_core_has_smt’; did you mean ‘topology_core_cpumask’? [-Wimpl
icit-function-declaration]
935 | pmu->has_smt = topology_core_has_smt(cpumask_first(&pmu->support
ed_cpus));
| ^~~~~~~~~~~~~~~~~~~~~
| topology_core_cpumask
make[5]: *** [/build/stage/linux/scripts/Makefile.build:287: drivers/perf/arm_pm
u.o] Error 1
The above function is inside a CONFIG_GENERIC_ARCH_TOPOLOGY guard, we
need a stub definition for architectures which don't have topology
support or for the users to have guards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20251106/b6e98e93/attachment.sig>
More information about the linux-arm-kernel
mailing list