[IA64] Use set_cpus_allowed_ptr
authorJulia Lawall <julia@diku.dk>
Fri, 26 Mar 2010 22:02:23 +0000 (23:02 +0100)
committerTony Luck <tony.luck@intel.com>
Tue, 18 May 2010 21:45:53 +0000 (14:45 -0700)
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>
arch/ia64/kernel/cpufreq/acpi-cpufreq.c
arch/ia64/kernel/salinfo.c
arch/ia64/kernel/topology.c

index b0b4e6e710f24a90fbf1b422d0a92bb038339f02..22f61526a8e1d7a5fd576eddc332e7e26c372380 100644 (file)
@@ -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);
 }
 
index e6676fca482876db425b281d476ad06ca64dc873..aa8b5fa1a8dec906c19b7ce99d6f721f60bb025b 100644 (file)
@@ -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
index 28f299de290397361565b4407f3ec0736fd7a018..0baa1bbb65fe00894e2e284bfc39c3fa9a36e5d4 100644 (file)
@@ -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;