[POWERPC] Allow smp_call_function_single() to current cpu

This removes the requirement for callers to get_cpu() to check in simple
cases. i386 and x86_64 already received a similar treatment.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by Avi Kivity and committed by Paul Mackerras adff093d 08ae6cc1

+6 -1
+6 -1
arch/powerpc/kernel/smp.c
··· 284 int wait) 285 { 286 cpumask_t map = CPU_MASK_NONE; 287 - int ret = -EBUSY; 288 289 if (!cpu_online(cpu)) 290 return -EINVAL; ··· 292 cpu_set(cpu, map); 293 if (cpu != get_cpu()) 294 ret = smp_call_function_map(func,info,nonatomic,wait,map); 295 put_cpu(); 296 return ret; 297 }
··· 284 int wait) 285 { 286 cpumask_t map = CPU_MASK_NONE; 287 + int ret = 0; 288 289 if (!cpu_online(cpu)) 290 return -EINVAL; ··· 292 cpu_set(cpu, map); 293 if (cpu != get_cpu()) 294 ret = smp_call_function_map(func,info,nonatomic,wait,map); 295 + else { 296 + local_irq_disable(); 297 + func(info); 298 + local_irq_enable(); 299 + } 300 put_cpu(); 301 return ret; 302 }