cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpu
* Replace previous instances of the cpumask_of_cpu_ptr* macros with a the new (lvalue capable) generic cpumask_of_cpu(). Signed-off-by: Mike Travis <travis@sgi.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jack Steiner <steiner@sgi.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -200,12 +200,10 @@ static void drv_read(struct drv_cmd *cmd)
|
||||
static void drv_write(struct drv_cmd *cmd)
|
||||
{
|
||||
cpumask_t saved_mask = current->cpus_allowed;
|
||||
cpumask_of_cpu_ptr_declare(cpu_mask);
|
||||
unsigned int i;
|
||||
|
||||
for_each_cpu_mask_nr(i, cmd->mask) {
|
||||
cpumask_of_cpu_ptr_next(cpu_mask, i);
|
||||
set_cpus_allowed_ptr(current, cpu_mask);
|
||||
set_cpus_allowed_ptr(current, &cpumask_of_cpu(i));
|
||||
do_drv_write(cmd);
|
||||
}
|
||||
|
||||
@@ -269,12 +267,11 @@ static unsigned int get_measured_perf(unsigned int cpu)
|
||||
} aperf_cur, mperf_cur;
|
||||
|
||||
cpumask_t saved_mask;
|
||||
cpumask_of_cpu_ptr(cpu_mask, cpu);
|
||||
unsigned int perf_percent;
|
||||
unsigned int retval;
|
||||
|
||||
saved_mask = current->cpus_allowed;
|
||||
set_cpus_allowed_ptr(current, cpu_mask);
|
||||
set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu));
|
||||
if (get_cpu() != cpu) {
|
||||
/* We were not able to run on requested processor */
|
||||
put_cpu();
|
||||
@@ -340,7 +337,6 @@ static unsigned int get_measured_perf(unsigned int cpu)
|
||||
|
||||
static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
|
||||
{
|
||||
cpumask_of_cpu_ptr(cpu_mask, cpu);
|
||||
struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu);
|
||||
unsigned int freq;
|
||||
unsigned int cached_freq;
|
||||
@@ -353,7 +349,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
|
||||
}
|
||||
|
||||
cached_freq = data->freq_table[data->acpi_data->state].frequency;
|
||||
freq = extract_freq(get_cur_val(cpu_mask), data);
|
||||
freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data);
|
||||
if (freq != cached_freq) {
|
||||
/*
|
||||
* The dreaded BIOS frequency change behind our back.
|
||||
|
Reference in New Issue
Block a user