public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Yicong Yang <yangyccccc@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: yangyccccc@gmail.com, will@kernel.org, mark.rutland@arm.com,
	linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com,
	james.clark@linaro.org, robh@kernel.org,
	anshuman.khandual@arm.com, jonathan.cameron@huawei.com,
	hejunhao3@huawei.com, linuxarm@huawei.com,
	prime.zeng@hisilicon.com, xuwei5@huawei.com,
	wangyushan12@huawei.com
Subject: Re: [PATCH v3 1/1] perf: arm_pmuv3: Don't use PMCCNTR_EL0 on SMT cores
Date: Thu, 6 Nov 2025 23:16:52 +0800	[thread overview]
Message-ID: <53c1490b-79f6-4661-bbd0-9d087bddd5bf@gmail.com> (raw)
In-Reply-To: <aQyxy3vCbk-Ux9Zp@finisterre.sirena.org.uk>

On 2025/11/6 22:33, Mark Brown wrote:
> 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.

already sent a fix out [1]. sorry for didn't notice this :(

[1] https://lore.kernel.org/all/20251105103849.4093-1-yangyccccc@gmail.com/



  reply	other threads:[~2025-11-06 15:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22  3:30 [PATCH v3 1/1] perf: arm_pmuv3: Don't use PMCCNTR_EL0 on SMT cores Yicong Yang
2025-11-03 14:57 ` Will Deacon
2025-11-06 14:33 ` Mark Brown
2025-11-06 15:16   ` Yicong Yang [this message]
2025-11-06 15:25     ` Mark Brown

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=53c1490b-79f6-4661-bbd0-9d087bddd5bf@gmail.com \
    --to=yangyccccc@gmail.com \
    --cc=anshuman.khandual@arm.com \
    --cc=broonie@kernel.org \
    --cc=hejunhao3@huawei.com \
    --cc=james.clark@linaro.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=robh@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=wangyushan12@huawei.com \
    --cc=will@kernel.org \
    --cc=xuwei5@huawei.com \
    /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