unicore: Use generic idle loop
authorThomas Gleixner <tglx@linutronix.de>
Thu, 21 Mar 2013 21:50:02 +0000 (22:50 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 8 Apr 2013 15:39:29 +0000 (17:39 +0200)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Link: http://lkml.kernel.org/r/20130321215235.415426466@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/unicore32/Kconfig
arch/unicore32/kernel/process.c

index 2943e3a..e12678d 100644 (file)
@@ -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
index 872d7e2..7fab86d 100644 (file)
@@ -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';