Skip to content

Commit

Permalink
[IA64] Use set_cpus_allowed_ptr
Browse files Browse the repository at this point in the history
Use set_cpus_allowed_ptr rather than set_cpus_allowed.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Julia Lawall authored and Tony Luck committed May 18, 2010
1 parent 93f7c93 commit 552dce3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions arch/ia64/kernel/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ processor_get_freq (
dprintk("processor_get_freq\n");

saved_mask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, cpumask_of(cpu));
if (smp_processor_id() != cpu)
goto migrate_end;

/* processor_get_pstate gets the instantaneous frequency */
ret = processor_get_pstate(&value);

if (ret) {
set_cpus_allowed(current, saved_mask);
set_cpus_allowed_ptr(current, &saved_mask);
printk(KERN_WARNING "get performance failed with error %d\n",
ret);
ret = 0;
Expand All @@ -131,7 +131,7 @@ processor_get_freq (
ret = (clock_freq*1000);

migrate_end:
set_cpus_allowed(current, saved_mask);
set_cpus_allowed_ptr(current, &saved_mask);
return ret;
}

Expand All @@ -151,7 +151,7 @@ processor_set_freq (
dprintk("processor_set_freq\n");

saved_mask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(cpu));
set_cpus_allowed_ptr(current, cpumask_of(cpu));
if (smp_processor_id() != cpu) {
retval = -EAGAIN;
goto migrate_end;
Expand Down Expand Up @@ -208,7 +208,7 @@ processor_set_freq (
retval = 0;

migrate_end:
set_cpus_allowed(current, saved_mask);
set_cpus_allowed_ptr(current, &saved_mask);
return (retval);
}

Expand Down
5 changes: 2 additions & 3 deletions arch/ia64/kernel/salinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,9 @@ static void
call_on_cpu(int cpu, void (*fn)(void *), void *arg)
{
cpumask_t save_cpus_allowed = current->cpus_allowed;
cpumask_t new_cpus_allowed = cpumask_of_cpu(cpu);
set_cpus_allowed(current, new_cpus_allowed);
set_cpus_allowed_ptr(current, cpumask_of(cpu));
(*fn)(arg);
set_cpus_allowed(current, save_cpus_allowed);
set_cpus_allowed_ptr(current, &save_cpus_allowed);
}

static void
Expand Down
4 changes: 2 additions & 2 deletions arch/ia64/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
return 0;

oldmask = current->cpus_allowed;
retval = set_cpus_allowed(current, cpumask_of_cpu(cpu));
retval = set_cpus_allowed_ptr(current, cpumask_of(cpu));
if (unlikely(retval))
return retval;

retval = cpu_cache_sysfs_init(cpu);
set_cpus_allowed(current, oldmask);
set_cpus_allowed_ptr(current, &oldmask);
if (unlikely(retval < 0))
return retval;

Expand Down

0 comments on commit 552dce3

Please sign in to comment.