Commit 1971b187 authored by Jie Zhan's avatar Jie Zhan Committed by Viresh Kumar
Browse files

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: default avatarBowen Yu <yubowen8@huawei.com>
Signed-off-by: Bowen Yu <yubowen8@huawei.com> # Changing loglevel to debug
Signed-off-by: default avatarJie Zhan <zhanjie9@hisilicon.com>
[ Viresh: Added back the dropped comment. ]
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 9600156b
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -142,15 +142,14 @@ 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) {
			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.
		 * Don't abort as the CPU was offline while the driver was
		 * getting registered.
		 */
			if (cpu_online(cpu))
		if (ret && cpu_online(cpu)) {
			pr_debug("%s: failed to read perf counters for cpu:%d: %d\n",
				__func__, cpu, ret);
			return;
		}
	}