diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:49:49 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:26 -0400 |
commit | dfa174dcf841d0665065dedec2bc133227da56ef (patch) | |
tree | 330e801736ffe3b7eac4d2fefa47774bc651bf61 /arch/m68k | |
parent | 01436228bfefca77493efa00aa49a8b67167d4c5 (diff) |
m68k: 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: Geert Uytterhoeven <geert@linux-m68k.org>
Link: http://lkml.kernel.org/r/20130321215234.535485189@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/Kconfig | 1 | ||||
-rw-r--r-- | arch/m68k/kernel/process.c | 32 |
2 files changed, 5 insertions, 28 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 6de813370b8c..41859405a853 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -6,6 +6,7 @@ config M68K | |||
6 | select HAVE_DEBUG_BUGVERBOSE | 6 | select HAVE_DEBUG_BUGVERBOSE |
7 | select HAVE_GENERIC_HARDIRQS | 7 | select HAVE_GENERIC_HARDIRQS |
8 | select GENERIC_IRQ_SHOW | 8 | select GENERIC_IRQ_SHOW |
9 | select GENERIC_IDLE_LOOP | ||
9 | select GENERIC_ATOMIC64 | 10 | select GENERIC_ATOMIC64 |
10 | select HAVE_UID16 | 11 | select HAVE_UID16 |
11 | select VIRT_TO_BUS | 12 | select VIRT_TO_BUS |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index d538694ad208..c55ff719fa72 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -51,40 +51,16 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
51 | return sw->retpc; | 51 | return sw->retpc; |
52 | } | 52 | } |
53 | 53 | ||
54 | /* | 54 | void arch_cpu_idle(void) |
55 | * The idle loop on an m68k.. | ||
56 | */ | ||
57 | static void default_idle(void) | ||
58 | { | 55 | { |
59 | if (!need_resched()) | ||
60 | #if defined(MACH_ATARI_ONLY) | 56 | #if defined(MACH_ATARI_ONLY) |
61 | /* block out HSYNC on the atari (falcon) */ | 57 | /* block out HSYNC on the atari (falcon) */ |
62 | __asm__("stop #0x2200" : : : "cc"); | 58 | __asm__("stop #0x2200" : : : "cc"); |
63 | #else | 59 | #else |
64 | __asm__("stop #0x2000" : : : "cc"); | 60 | __asm__("stop #0x2000" : : : "cc"); |
65 | #endif | 61 | #endif |
66 | } | 62 | } |
67 | 63 | ||
68 | void (*idle)(void) = default_idle; | ||
69 | |||
70 | /* | ||
71 | * The idle thread. There's no useful work to be | ||
72 | * done, so just try to conserve power and have a | ||
73 | * low exit latency (ie sit in a loop waiting for | ||
74 | * somebody to say that they'd like to reschedule) | ||
75 | */ | ||
76 | void cpu_idle(void) | ||
77 | { | ||
78 | /* endless idle loop with no priority at all */ | ||
79 | while (1) { | ||
80 | rcu_idle_enter(); | ||
81 | while (!need_resched()) | ||
82 | idle(); | ||
83 | rcu_idle_exit(); | ||
84 | schedule_preempt_disabled(); | ||
85 | } | ||
86 | } | ||
87 | |||
88 | void machine_restart(char * __unused) | 64 | void machine_restart(char * __unused) |
89 | { | 65 | { |
90 | if (mach_reset) | 66 | if (mach_reset) |