diff options
author | Avi Kivity <avi@qumranet.com> | 2007-10-16 23:26:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 08:42:48 -0700 |
commit | bf020cb7b3918e186309db21d75cb91ebafc9d6f (patch) | |
tree | 7a03b7a566ce3f3119812e092b72e3c65fc8b91a | |
parent | a9022e9cb9e919e31d5bc15fcef5c7186740645e (diff) | |
download | linux-stable-bf020cb7b3918e186309db21d75cb91ebafc9d6f.tar.gz linux-stable-bf020cb7b3918e186309db21d75cb91ebafc9d6f.tar.bz2 linux-stable-bf020cb7b3918e186309db21d75cb91ebafc9d6f.zip |
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 <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | 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 fc3fc79b3d59..fab9dd8bbd6b 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); } /* |