Commit 3caa37519ccbb200c7fbbf6ff4fb306a30f29425

Authored by Masami Hiramatsu
Committed by Ingo Molnar
1 parent 087a4eb559

x86: Use __stop_machine() in text_poke_smp()

Use __stop_machine() in text_poke_smp() because the caller
must get online_cpus before calling text_poke_smp(), but
stop_machine() do it again. We don't need it.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
LKML-Reference: <20101014031036.4100.83989.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

arch/x86/kernel/alternative.c
... ... @@ -637,7 +637,8 @@
637 637 tpp.len = len;
638 638 atomic_set(&stop_machine_first, 1);
639 639 wrote_text = 0;
640   - stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
  640 + /* Use __stop_machine() because the caller already got online_cpus. */
  641 + __stop_machine(stop_machine_text_poke, (void *)&tpp, NULL);
641 642 return addr;
642 643 }
643 644