Commit 068b1277 authored by Mike Travis's avatar Mike Travis Committed by Thomas Gleixner

cpufreq: use performance variant for_each_cpu_mask_nr

Change references from for_each_cpu_mask to for_each_cpu_mask_nr
where appropriate
Reviewed-by: default avatarPaul Jackson <pj@sgi.com>
Reviewed-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 141ad068
...@@ -589,7 +589,7 @@ static ssize_t show_cpus(cpumask_t mask, char *buf) ...@@ -589,7 +589,7 @@ static ssize_t show_cpus(cpumask_t mask, char *buf)
ssize_t i = 0; ssize_t i = 0;
unsigned int cpu; unsigned int cpu;
for_each_cpu_mask(cpu, mask) { for_each_cpu_mask_nr(cpu, mask) {
if (i) if (i)
i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), " "); i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), " ");
i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), "%u", cpu); i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), "%u", cpu);
...@@ -835,7 +835,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) ...@@ -835,7 +835,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
} }
#endif #endif
for_each_cpu_mask(j, policy->cpus) { for_each_cpu_mask_nr(j, policy->cpus) {
if (cpu == j) if (cpu == j)
continue; continue;
...@@ -898,14 +898,14 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) ...@@ -898,14 +898,14 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
} }
spin_lock_irqsave(&cpufreq_driver_lock, flags); spin_lock_irqsave(&cpufreq_driver_lock, flags);
for_each_cpu_mask(j, policy->cpus) { for_each_cpu_mask_nr(j, policy->cpus) {
cpufreq_cpu_data[j] = policy; cpufreq_cpu_data[j] = policy;
per_cpu(policy_cpu, j) = policy->cpu; per_cpu(policy_cpu, j) = policy->cpu;
} }
spin_unlock_irqrestore(&cpufreq_driver_lock, flags); spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
/* symlink affected CPUs */ /* symlink affected CPUs */
for_each_cpu_mask(j, policy->cpus) { for_each_cpu_mask_nr(j, policy->cpus) {
if (j == cpu) if (j == cpu)
continue; continue;
if (!cpu_online(j)) if (!cpu_online(j))
...@@ -945,7 +945,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) ...@@ -945,7 +945,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
err_out_unregister: err_out_unregister:
spin_lock_irqsave(&cpufreq_driver_lock, flags); spin_lock_irqsave(&cpufreq_driver_lock, flags);
for_each_cpu_mask(j, policy->cpus) for_each_cpu_mask_nr(j, policy->cpus)
cpufreq_cpu_data[j] = NULL; cpufreq_cpu_data[j] = NULL;
spin_unlock_irqrestore(&cpufreq_driver_lock, flags); spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
...@@ -1028,7 +1028,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev) ...@@ -1028,7 +1028,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
* links afterwards. * links afterwards.
*/ */
if (unlikely(cpus_weight(data->cpus) > 1)) { if (unlikely(cpus_weight(data->cpus) > 1)) {
for_each_cpu_mask(j, data->cpus) { for_each_cpu_mask_nr(j, data->cpus) {
if (j == cpu) if (j == cpu)
continue; continue;
cpufreq_cpu_data[j] = NULL; cpufreq_cpu_data[j] = NULL;
...@@ -1038,7 +1038,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev) ...@@ -1038,7 +1038,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
spin_unlock_irqrestore(&cpufreq_driver_lock, flags); spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
if (unlikely(cpus_weight(data->cpus) > 1)) { if (unlikely(cpus_weight(data->cpus) > 1)) {
for_each_cpu_mask(j, data->cpus) { for_each_cpu_mask_nr(j, data->cpus) {
if (j == cpu) if (j == cpu)
continue; continue;
dprintk("removing link for cpu %u\n", j); dprintk("removing link for cpu %u\n", j);
......
...@@ -497,7 +497,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, ...@@ -497,7 +497,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
return rc; return rc;
} }
for_each_cpu_mask(j, policy->cpus) { for_each_cpu_mask_nr(j, policy->cpus) {
struct cpu_dbs_info_s *j_dbs_info; struct cpu_dbs_info_s *j_dbs_info;
j_dbs_info = &per_cpu(cpu_dbs_info, j); j_dbs_info = &per_cpu(cpu_dbs_info, j);
j_dbs_info->cur_policy = policy; j_dbs_info->cur_policy = policy;
......
...@@ -367,7 +367,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) ...@@ -367,7 +367,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
/* Get Idle Time */ /* Get Idle Time */
idle_ticks = UINT_MAX; idle_ticks = UINT_MAX;
for_each_cpu_mask(j, policy->cpus) { for_each_cpu_mask_nr(j, policy->cpus) {
cputime64_t total_idle_ticks; cputime64_t total_idle_ticks;
unsigned int tmp_idle_ticks; unsigned int tmp_idle_ticks;
struct cpu_dbs_info_s *j_dbs_info; struct cpu_dbs_info_s *j_dbs_info;
...@@ -521,7 +521,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy, ...@@ -521,7 +521,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
return rc; return rc;
} }
for_each_cpu_mask(j, policy->cpus) { for_each_cpu_mask_nr(j, policy->cpus) {
struct cpu_dbs_info_s *j_dbs_info; struct cpu_dbs_info_s *j_dbs_info;
j_dbs_info = &per_cpu(cpu_dbs_info, j); j_dbs_info = &per_cpu(cpu_dbs_info, j);
j_dbs_info->cur_policy = policy; j_dbs_info->cur_policy = policy;
......
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