aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/p4-clockmod.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-03-24 02:26:43 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-02 09:24:00 -0400
commitb43a7ffbf33be7e4d3b10b7714ee663ea2c52fe2 (patch)
tree7d3ac2733d76a785be12bfba75bfe244a5a31460 /drivers/cpufreq/p4-clockmod.c
parentfd143b4d6fb763183ef6e46d1ab84a42c59079af (diff)
cpufreq: Notify all policy->cpus in cpufreq_notify_transition()
policy->cpus contains all online cpus that have single shared clock line. And their frequencies are always updated together. Many SMP system's cpufreq drivers take care of this in individual drivers but the best place for this code is in cpufreq core. This patch modifies cpufreq_notify_transition() to notify frequency change for all cpus in policy->cpus and hence updates all users of this API. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/p4-clockmod.c')
-rw-r--r--drivers/cpufreq/p4-clockmod.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c
index 827629c9aad7..4b2e7737b939 100644
--- a/drivers/cpufreq/p4-clockmod.c
+++ b/drivers/cpufreq/p4-clockmod.c
@@ -125,10 +125,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
125 return 0; 125 return 0;
126 126
127 /* notifiers */ 127 /* notifiers */
128 for_each_cpu(i, policy->cpus) { 128 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
129 freqs.cpu = i;
130 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
131 }
132 129
133 /* run on each logical CPU, 130 /* run on each logical CPU,
134 * see section 13.15.3 of IA32 Intel Architecture Software 131 * see section 13.15.3 of IA32 Intel Architecture Software
@@ -138,10 +135,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
138 cpufreq_p4_setdc(i, p4clockmod_table[newstate].index); 135 cpufreq_p4_setdc(i, p4clockmod_table[newstate].index);
139 136
140 /* notifiers */ 137 /* notifiers */
141 for_each_cpu(i, policy->cpus) { 138 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
142 freqs.cpu = i;
143 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
144 }
145 139
146 return 0; 140 return 0;
147} 141}