]> git.baikalelectronics.ru Git - kernel.git/commit
stop_machine: make stop_machine safe and efficient to call early
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 30 Sep 2011 16:10:54 +0000 (09:10 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tue, 25 Oct 2011 18:54:04 +0000 (11:54 -0700)
commitcf5aef12af4d3dc010c2fc2f65e0c3bfbf2cb1e4
treef4df4e497ba41eefd3c5a74761de90567e8a8727
parent7d8bcd88c748c4f5677f581e751331b228ebc46e
stop_machine: make stop_machine safe and efficient to call early

Make stop_machine() safe to call early in boot, before stop_machine()
has been set up, by simply calling the callback function directly if
there's only one CPU online.

[ Fixes from AKPM:
   - add comment
   - local_irq_flags, not save_flags
   - also call hard_irq_disable() for systems which need it

  Tejun suggested using an explicit flag rather than just looking at
  the online cpu count. ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
kernel/stop_machine.c