smp_call_function_single() now knows how to call the function on the
current cpu.

Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 kernel/time/tick-broadcast.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 8001d37..fe36b9a 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -241,21 +241,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);
 }
 
 /*
-- 
1.5.2.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to