Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f114ed8 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: Improve governor related CPUFreq error messages



Governor error messages point to important failures in governor or
framework. Output triggering CPU and policy->cpu to help debugging.

Change-Id: I4c5c392ec973b764ec3240bb2eb455c624bcaf63
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 7197af4f
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -868,7 +868,8 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy,
	if (has_target()) {
		ret = __cpufreq_governor(policy, CPUFREQ_GOV_STOP);
		if (ret) {
			pr_err("%s: Failed to stop governor\n", __func__);
			pr_err("%s: Failed to stop governor for CPU%u, policy CPU%u\n",
			       __func__, cpu, policy->cpu);
			return ret;
		}
	}
@@ -886,7 +887,8 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy,
	if (has_target()) {
		if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
			(ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
			pr_err("%s: Failed to start governor\n", __func__);
			pr_err("%s: Failed to start governor for CPU%u, policy CPU%u\n",
			       __func__, cpu, policy->cpu);
			return ret;
		}
	}
@@ -1222,7 +1224,8 @@ static int __cpufreq_remove_dev_prepare(struct device *dev,
	if (has_target()) {
		ret = __cpufreq_governor(policy, CPUFREQ_GOV_STOP);
		if (ret) {
			pr_err("%s: Failed to stop governor\n", __func__);
			pr_err("%s: Failed to stop governor for CPU%u\n",
			       __func__, cpu);
			return ret;
		}
	}
@@ -1290,8 +1293,8 @@ static int __cpufreq_remove_dev_finish(struct device *dev,
			ret = __cpufreq_governor(policy,
					CPUFREQ_GOV_POLICY_EXIT);
			if (ret) {
				pr_err("%s: Failed to exit governor\n",
						__func__);
				pr_err("%s: Failed to exit governor for CPU%u\n",
						__func__, cpu);
				return ret;
			}
		}
@@ -1318,8 +1321,8 @@ static int __cpufreq_remove_dev_finish(struct device *dev,
		if (has_target()) {
			if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) ||
					(ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) {
				pr_err("%s: Failed to start governor\n",
						__func__);
				pr_err("%s: Failed to start governor for CPU%u, policy CPU%u\n",
						__func__, cpu, policy->cpu);
				return ret;
			}
		}