Commit 7c122fca authored by Dave Jones's avatar Dave Jones

[CPUFREQ] replace for_each_cpu with for_each_cpu_mask in p4-clockmod

From: Bruno Ducrot
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent d37e1fe9
......@@ -132,18 +132,15 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
#endif
/* notifiers */
for_each_cpu(i) {
if (cpu_isset(i, affected_cpu_map)) {
for_each_cpu_mask(i, affected_cpu_map) {
freqs.cpu = i;
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
}
}
/* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software
* Developer's Manual, Volume 3
*/
for_each_cpu(i) {
if (cpu_isset(i, affected_cpu_map)) {
for_each_cpu_mask(i, affected_cpu_map) {
cpumask_t this_cpu = cpumask_of_cpu(i);
set_cpus_allowed(current, this_cpu);
......@@ -151,16 +148,13 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
cpufreq_p4_setdc(i, p4clockmod_table[newstate].index);
}
}
set_cpus_allowed(current, cpus_allowed);
/* notifiers */
for_each_cpu(i) {
if (cpu_isset(i, affected_cpu_map)) {
for_each_cpu_mask(i, affected_cpu_map) {
freqs.cpu = i;
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
}
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment