diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:49:44 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:25 -0400 |
commit | ccf8e78fe2a7e92b6d43de8023786b9dd199aab1 (patch) | |
tree | 0077bd1f61b3ca13fd75d62acf0a2aa7b3fae7af /arch/frv | |
parent | 8dc7c5ecd8d0f739728d844ee794c4fae169f9c2 (diff) |
frv: 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: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20130321215234.217235264@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/frv')
-rw-r--r-- | arch/frv/Kconfig | 1 | ||||
-rw-r--r-- | arch/frv/kernel/process.c | 27 |
2 files changed, 6 insertions, 22 deletions
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 2ce731f9aa4d..0d998db2039e 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -8,6 +8,7 @@ config FRV | |||
8 | select HAVE_GENERIC_HARDIRQS | 8 | select HAVE_GENERIC_HARDIRQS |
9 | select VIRT_TO_BUS | 9 | select VIRT_TO_BUS |
10 | select GENERIC_IRQ_SHOW | 10 | select GENERIC_IRQ_SHOW |
11 | select GENERIC_IDLE_LOOP | ||
11 | select HAVE_DEBUG_BUGVERBOSE | 12 | select HAVE_DEBUG_BUGVERBOSE |
12 | select ARCH_HAVE_NMI_SAFE_CMPXCHG | 13 | select ARCH_HAVE_NMI_SAFE_CMPXCHG |
13 | select GENERIC_CPU_DEVICES | 14 | select GENERIC_CPU_DEVICES |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 23916b2a12a2..5d40aeb7712e 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -59,29 +59,12 @@ static void core_sleep_idle(void) | |||
59 | mb(); | 59 | mb(); |
60 | } | 60 | } |
61 | 61 | ||
62 | void (*idle)(void) = core_sleep_idle; | 62 | void arch_cpu_idle(void) |
63 | |||
64 | /* | ||
65 | * The idle thread. There's no useful work to be | ||
66 | * done, so just try to conserve power and have a | ||
67 | * low exit latency (ie sit in a loop waiting for | ||
68 | * somebody to say that they'd like to reschedule) | ||
69 | */ | ||
70 | void cpu_idle(void) | ||
71 | { | 63 | { |
72 | /* endless idle loop with no priority at all */ | 64 | if (!frv_dma_inprogress) |
73 | while (1) { | 65 | core_sleep_idle(); |
74 | rcu_idle_enter(); | 66 | else |
75 | while (!need_resched()) { | 67 | local_irq_enable(); |
76 | check_pgt_cache(); | ||
77 | |||
78 | if (!frv_dma_inprogress && idle) | ||
79 | idle(); | ||
80 | } | ||
81 | rcu_idle_exit(); | ||
82 | |||
83 | schedule_preempt_disabled(); | ||
84 | } | ||
85 | } | 68 | } |
86 | 69 | ||
87 | void machine_restart(char * __unused) | 70 | void machine_restart(char * __unused) |