aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorvenkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>2008-08-04 14:59:07 -0400
committerDave Jones <davej@redhat.com>2008-10-09 13:52:43 -0400
commitbf0b90e357c883e8efd72954432efe652de74c76 (patch)
treea10758a069cdea10b36856b458a509b144bae3bb /drivers/cpufreq/cpufreq.c
parent8217e4f4c93e5fb59bb3cd1e6135213889349f86 (diff)
[CPUFREQ][1/6] cpufreq: Add cpu number parameter to __cpufreq_driver_getavg()
Add a cpu parameter to __cpufreq_driver_getavg(). This is needed for software cpufreq coordination where policy->cpu may not be same as the CPU on which we want to getavg frequency. A follow-on patch will use this parameter to getavg freq from all cpus in policy->cpus. Change since last patch. Fix the offline/online and suspend/resume oops reported by Youquan Song <youquan.song@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 9bbdc258624c..31d6f535a79d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1487,7 +1487,7 @@ no_policy:
1487} 1487}
1488EXPORT_SYMBOL_GPL(cpufreq_driver_target); 1488EXPORT_SYMBOL_GPL(cpufreq_driver_target);
1489 1489
1490int __cpufreq_driver_getavg(struct cpufreq_policy *policy) 1490int __cpufreq_driver_getavg(struct cpufreq_policy *policy, unsigned int cpu)
1491{ 1491{
1492 int ret = 0; 1492 int ret = 0;
1493 1493
@@ -1495,8 +1495,8 @@ int __cpufreq_driver_getavg(struct cpufreq_policy *policy)
1495 if (!policy) 1495 if (!policy)
1496 return -EINVAL; 1496 return -EINVAL;
1497 1497
1498 if (cpu_online(policy->cpu) && cpufreq_driver->getavg) 1498 if (cpu_online(cpu) && cpufreq_driver->getavg)
1499 ret = cpufreq_driver->getavg(policy->cpu); 1499 ret = cpufreq_driver->getavg(policy, cpu);
1500 1500
1501 cpufreq_cpu_put(policy); 1501 cpufreq_cpu_put(policy);
1502 return ret; 1502 return ret;