From: Hongye Lin <linhongye@h-partners.com> driver inclusion category: cleanup bugzilla: https://atomgit.com/openeuler/kernel/issues/9163 ---------------------------------------------------------------------- This reverts commit d08e86c77069fbbdd7fdbdaa408c198223bc0900. Fixes: d08e86c77069 ("cpufreq: CPPC: Don't warn on failing to read perf counters on offline cpus") Signed-off-by: Hongye Lin <linhongye@h-partners.com> --- drivers/cpufreq/cppc_cpufreq.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index b0a73531a4ea..073a07cb5939 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c @@ -178,14 +178,16 @@ static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy) init_irq_work(&cppc_fi->irq_work, cppc_irq_work); ret = cppc_get_perf_ctrs(cpu, &cppc_fi->prev_perf_fb_ctrs); - if (ret && cpu_online(cpu)) { + if (ret) { + pr_warn("%s: failed to read perf counters for cpu:%d: %d\n", + __func__, cpu, ret); + /* * Don't abort if the CPU was offline while the driver * was getting registered. */ - pr_debug("%s: failed to read perf counters for cpu:%d: %d\n", - __func__, cpu, ret); - return; + if (cpu_online(cpu)) + return; } } -- 2.33.0