summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorAntti P Miettinen <amiettinen@nvidia.com>2013-10-13 17:19:49 +0300
committerJuha Tukkinen <jtukkinen@nvidia.com>2013-10-14 03:44:09 -0700
commit408b0eaad865172a5b470d5de49021de75104d41 (patch)
tree6eea56ffd288771833a76d3ff16c00b01b1cb74e /drivers/cpufreq
parent717b2bc9822b7fbd2e0f5e0f5593ede4b5562ec4 (diff)
cpufreq: Fix tracing for CPU scaling
Make sure that CPU frequency change requests get always traced. Change-Id: I69c70150f44bb3baf934ca08a7cbe1c86fe3e135 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/298730 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 27684fb4ff94..aaf7d95d4453 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1506,8 +1506,13 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
int retval = -EINVAL;
unsigned int old_target_freq = target_freq;
- if (cpufreq_disabled())
+ trace_cpu_scale(policy->cpu, policy->cur, POWER_CPU_SCALE_START);
+
+ if (cpufreq_disabled()) {
+ trace_cpu_scale(policy->cpu, target_freq,
+ POWER_CPU_SCALE_DONE);
return -ENODEV;
+ }
/* Make sure that target_freq is within supported range */
if (target_freq > policy->max)
@@ -1524,9 +1529,9 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
return 0;
}
- trace_cpu_scale(policy->cpu, policy->cur, POWER_CPU_SCALE_START);
if (cpufreq_driver->target)
retval = cpufreq_driver->target(policy, target_freq, relation);
+
trace_cpu_scale(policy->cpu, target_freq, POWER_CPU_SCALE_DONE);
return retval;