Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf020cb7 authored by Avi Kivity's avatar Avi Kivity Committed by Linus Torvalds
Browse files

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: default avatarAvi Kivity <avi@qumranet.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a9022e9c
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -274,22 +274,13 @@ static void tick_do_broadcast_on_off(void *why)
 */
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,
		smp_call_function_single(*oncpu, tick_do_broadcast_on_off,
					 &reason, 1, 1);
}
	put_cpu();
}

/*
 * Set the periodic handler depending on broadcast on/off