[IA64] Use set_cpus_allowed_ptr
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>
This commit is contained in:
parent
93f7c93bee
commit
552dce3a07
3 changed files with 9 additions and 10 deletions
|
@ -113,7 +113,7 @@ 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;
|
||||
|
||||
|
@ -121,7 +121,7 @@ processor_get_freq (
|
|||
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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue