Skip to content

Commit 1971b18

Browse files
jiezhan0214vireshk
authored andcommitted
cpufreq: CPPC: Don't warn if FIE init fails to read counters
During the CPPC FIE initialization, reading perf counters on offline cpus should be expected to fail. Don't warn on this case. Also, change the error log level to debug since FIE is optional. Co-developed-by: Bowen Yu <yubowen8@huawei.com> Signed-off-by: Bowen Yu <yubowen8@huawei.com> # Changing loglevel to debug Signed-off-by: Jie Zhan <zhanjie9@hisilicon.com> [ Viresh: Added back the dropped comment. ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 9600156 commit 1971b18

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,15 @@ static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy)
142142
init_irq_work(&cppc_fi->irq_work, cppc_irq_work);
143143

144144
ret = cppc_get_perf_ctrs(cpu, &cppc_fi->prev_perf_fb_ctrs);
145-
if (ret) {
146-
pr_warn("%s: failed to read perf counters for cpu:%d: %d\n",
147-
__func__, cpu, ret);
148145

149-
/*
150-
* Don't abort if the CPU was offline while the driver
151-
* was getting registered.
152-
*/
153-
if (cpu_online(cpu))
154-
return;
146+
/*
147+
* Don't abort as the CPU was offline while the driver was
148+
* getting registered.
149+
*/
150+
if (ret && cpu_online(cpu)) {
151+
pr_debug("%s: failed to read perf counters for cpu:%d: %d\n",
152+
__func__, cpu, ret);
153+
return;
155154
}
156155
}
157156

0 commit comments

Comments
 (0)