mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
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: Paul Jackson <pj@sgi.com> Reviewed-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
141ad0688a
commit
068b12772a
@ -589,7 +589,7 @@ static ssize_t show_cpus(cpumask_t mask, char *buf)
|
||||
ssize_t i = 0;
|
||||
unsigned int cpu;
|
||||
|
||||
for_each_cpu_mask(cpu, mask) {
|
||||
for_each_cpu_mask_nr(cpu, mask) {
|
||||
if (i)
|
||||
i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), " ");
|
||||
i += scnprintf(&buf[i], (PAGE_SIZE - i - 2), "%u", cpu);
|
||||
@ -835,7 +835,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
for_each_cpu_mask(j, policy->cpus) {
|
||||
for_each_cpu_mask_nr(j, policy->cpus) {
|
||||
if (cpu == j)
|
||||
continue;
|
||||
|
||||
@ -898,14 +898,14 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
|
||||
}
|
||||
|
||||
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;
|
||||
per_cpu(policy_cpu, j) = policy->cpu;
|
||||
}
|
||||
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
|
||||
/* symlink affected CPUs */
|
||||
for_each_cpu_mask(j, policy->cpus) {
|
||||
for_each_cpu_mask_nr(j, policy->cpus) {
|
||||
if (j == cpu)
|
||||
continue;
|
||||
if (!cpu_online(j))
|
||||
@ -945,7 +945,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
|
||||
|
||||
err_out_unregister:
|
||||
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;
|
||||
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
|
||||
@ -1028,7 +1028,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
|
||||
* links afterwards.
|
||||
*/
|
||||
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)
|
||||
continue;
|
||||
cpufreq_cpu_data[j] = NULL;
|
||||
@ -1038,7 +1038,7 @@ static int __cpufreq_remove_dev(struct sys_device *sys_dev)
|
||||
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
|
||||
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)
|
||||
continue;
|
||||
dprintk("removing link for cpu %u\n", j);
|
||||
|
@ -497,7 +497,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
|
||||
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;
|
||||
j_dbs_info = &per_cpu(cpu_dbs_info, j);
|
||||
j_dbs_info->cur_policy = policy;
|
||||
|
@ -367,7 +367,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
|
||||
|
||||
/* Get Idle Time */
|
||||
idle_ticks = UINT_MAX;
|
||||
for_each_cpu_mask(j, policy->cpus) {
|
||||
for_each_cpu_mask_nr(j, policy->cpus) {
|
||||
cputime64_t total_idle_ticks;
|
||||
unsigned int tmp_idle_ticks;
|
||||
struct cpu_dbs_info_s *j_dbs_info;
|
||||
@ -521,7 +521,7 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
|
||||
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;
|
||||
j_dbs_info = &per_cpu(cpu_dbs_info, j);
|
||||
j_dbs_info->cur_policy = policy;
|
||||
|
Loading…
Reference in New Issue
Block a user