aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2013-03-21 22:50:02 +0100
committerThomas Gleixner <[email protected]>2013-04-08 17:39:29 +0200
commitaba92c9e2cf3042bf6efc68fa2e4235ba01bf499 (patch)
treebf98c8d2db2ee55dcb14147500ee2659dc0b2cfc
parent0dc8153cfebac68c9523b8852b14f10b31209f08 (diff)
unicore: Use generic idle loop
Signed-off-by: Thomas Gleixner <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Paul McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Reviewed-by: Cc: Srivatsa S. Bhat <[email protected]> Cc: Magnus Damm <[email protected]> Cc: Guan Xuetao <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
-rw-r--r--arch/unicore32/Kconfig1
-rw-r--r--arch/unicore32/kernel/process.c21
2 files changed, 4 insertions, 18 deletions
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 2943e3acdf0c..e12678daaed1 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -17,6 +17,7 @@ config UNICORE32
select ARCH_WANT_FRAME_POINTERS
select GENERIC_IOMAP
select MODULES_USE_ELF_REL
+ select GENERIC_IDLE_LOOP
help
UniCore-32 is 32-bit Instruction Set Architecture,
including a series of low-power-consumption RISC chip
diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c
index 872d7e22d847..7fab86d7c5d4 100644
--- a/arch/unicore32/kernel/process.c
+++ b/arch/unicore32/kernel/process.c
@@ -45,25 +45,10 @@ static const char * const processor_modes[] = {
"UK18", "UK19", "UK1A", "EXTN", "UK1C", "UK1D", "UK1E", "SUSR"
};
-void cpu_idle(void)
+void arch_cpu_idle(void)
{
- /* endless idle loop with no priority at all */
- while (1) {
- tick_nohz_idle_enter();
- rcu_idle_enter();
- while (!need_resched()) {
- local_irq_disable();
- stop_critical_timings();
- cpu_do_idle();
- local_irq_enable();
- start_critical_timings();
- }
- rcu_idle_exit();
- tick_nohz_idle_exit();
- preempt_enable_no_resched();
- schedule();
- preempt_disable();
- }
+ cpu_do_idle();
+ local_irq_enable();
}
static char reboot_mode = 'h';