diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:50:02 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:29 -0400 |
commit | aba92c9e2cf3042bf6efc68fa2e4235ba01bf499 (patch) | |
tree | bf98c8d2db2ee55dcb14147500ee2659dc0b2cfc | |
parent | 0dc8153cfebac68c9523b8852b14f10b31209f08 (diff) |
unicore: Use generic idle loop
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>
-rw-r--r-- | arch/unicore32/Kconfig | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/process.c | 21 |
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 | |||
17 | select ARCH_WANT_FRAME_POINTERS | 17 | select ARCH_WANT_FRAME_POINTERS |
18 | select GENERIC_IOMAP | 18 | select GENERIC_IOMAP |
19 | select MODULES_USE_ELF_REL | 19 | select MODULES_USE_ELF_REL |
20 | select GENERIC_IDLE_LOOP | ||
20 | help | 21 | help |
21 | UniCore-32 is 32-bit Instruction Set Architecture, | 22 | UniCore-32 is 32-bit Instruction Set Architecture, |
22 | including a series of low-power-consumption RISC chip | 23 | 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[] = { | |||
45 | "UK18", "UK19", "UK1A", "EXTN", "UK1C", "UK1D", "UK1E", "SUSR" | 45 | "UK18", "UK19", "UK1A", "EXTN", "UK1C", "UK1D", "UK1E", "SUSR" |
46 | }; | 46 | }; |
47 | 47 | ||
48 | void cpu_idle(void) | 48 | void arch_cpu_idle(void) |
49 | { | 49 | { |
50 | /* endless idle loop with no priority at all */ | 50 | cpu_do_idle(); |
51 | while (1) { | 51 | local_irq_enable(); |
52 | tick_nohz_idle_enter(); | ||
53 | rcu_idle_enter(); | ||
54 | while (!need_resched()) { | ||
55 | local_irq_disable(); | ||
56 | stop_critical_timings(); | ||
57 | cpu_do_idle(); | ||
58 | local_irq_enable(); | ||
59 | start_critical_timings(); | ||
60 | } | ||
61 | rcu_idle_exit(); | ||
62 | tick_nohz_idle_exit(); | ||
63 | preempt_enable_no_resched(); | ||
64 | schedule(); | ||
65 | preempt_disable(); | ||
66 | } | ||
67 | } | 52 | } |
68 | 53 | ||
69 | static char reboot_mode = 'h'; | 54 | static char reboot_mode = 'h'; |