From: Avi Kivity Date: Wed, 17 Oct 2007 06:26:24 +0000 (-0700) Subject: time: simplify smp_call_function_single() call sequence X-Git-Tag: v2.6.24-rc1~747 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bf020cb7b3918e186309db21d75cb91ebafc9d6f;p=linux-2.6-omap-h63xx.git time: simplify smp_call_function_single() call sequence smp_call_function_single() now knows how to call the function on the current cpu. Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Avi Kivity Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index fc3fc79b3d5..fab9dd8bbd6 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c @@ -274,21 +274,12 @@ out: */ void tick_broadcast_on_off(unsigned long reason, int *oncpu) { - int cpu = get_cpu(); - - if (!cpu_isset(*oncpu, cpu_online_map)) { + if (!cpu_isset(*oncpu, cpu_online_map)) printk(KERN_ERR "tick-braodcast: ignoring broadcast for " "offline CPU #%d\n", *oncpu); - } else { - - if (cpu == *oncpu) - tick_do_broadcast_on_off(&reason); - else - smp_call_function_single(*oncpu, - tick_do_broadcast_on_off, - &reason, 1, 1); - } - put_cpu(); + else + smp_call_function_single(*oncpu, tick_do_broadcast_on_off, + &reason, 1, 1); } /*