x86: Merge the x86_32 and x86_64 cpu_idle() functions
authorRichard Weinberger <richard@nod.at>
Sun, 25 Mar 2012 21:00:04 +0000 (23:00 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 26 Mar 2012 01:16:07 +0000 (03:16 +0200)
commit90e240142bd31ff10aeda5a280a53153f4eff004
treeae612bacc2cfd2fedc4c5c22c29dd326f8b93ae7
parentf5243d6de7ae232e1d81e44ae9756bbd8c988fcd
x86: Merge the x86_32 and x86_64 cpu_idle() functions

Both functions are mostly identical.
The differences are:

- x86_32's cpu_idle() makes use of check_pgt_cache(), which is a
  nop on both x86_32 and x86_64.

- x86_64's cpu_idle() uses enter/__exit_idle/(), on x86_32 these
  function are a nop.

- In contrast to x86_32, x86_64 calls rcu_idle_enter/exit() in
  the innermost loop because idle notifications need RCU.
  Calling these function on x86_32 also in the innermost loop
  does not hurt.

So we can merge both functions.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: paulmck@linux.vnet.ibm.com
Cc: josh@joshtriplett.org
Cc: tj@kernel.org
Link: http://lkml.kernel.org/r/1332709204-22496-1-git-send-email-richard@nod.at
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/idle.h
arch/x86/kernel/process.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c