[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251104075544.3243606-4-yubowen8@huawei.com>
Date: Tue, 4 Nov 2025 15:55:44 +0800
From: Bowen Yu <yubowen8@...wei.com>
To: <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<catalin.marinas@....com>, <will@...nel.org>, <beata.michalska@....com>,
<ptsm@...ux.microsoft.com>, <linuxarm@...wei.com>,
<jonathan.cameron@...wei.com>
CC: <zhanjie9@...ilicon.com>, <prime.zeng@...ilicon.com>,
<wanghuiqiang@...wei.com>, <xuwei5@...wei.com>, <zhenglifeng1@...wei.com>,
<yubowen8@...wei.com>, <zhangpengjie2@...wei.com>
Subject: [PATCH 3/3] arm64: topology: Remove redundant housekeeping_cpu() checks in arch_freq_get_on_cpu
This patch removes redundant !housekeeping_cpu() check since it is
inherently done when checking jiffies.
Signed-off-by: Bowen Yu <yubowen8@...wei.com>
---
arch/arm64/kernel/topology.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index f1370a4a4df9..6981ef3019d3 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -310,20 +310,13 @@ int arch_freq_get_on_cpu(int cpu)
* (and thus freq scale), if available, for given policy: this boils
* down to identifying an active cpu within the same freq domain, if any.
*/
- if (!housekeeping_cpu(cpu, HK_TYPE_TICK) ||
- time_is_before_jiffies(last_update + msecs_to_jiffies(AMU_SAMPLE_EXP_MS))) {
+ if (time_is_before_jiffies(last_update + msecs_to_jiffies(AMU_SAMPLE_EXP_MS))) {
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
int ref_cpu;
if (!policy)
return -EINVAL;
- if (!cpumask_intersects(policy->related_cpus,
- housekeeping_cpumask(HK_TYPE_TICK))) {
- cpufreq_cpu_put(policy);
- return -EOPNOTSUPP;
- }
-
for_each_cpu_wrap(ref_cpu, policy->cpus, cpu + 1) {
if (ref_cpu == start_cpu) {
/* Prevent verifying same CPU twice */
--
2.33.0
Powered by blists - more mailing lists