Skip to content

Commit dfa174d

Browse files
committed
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>
1 parent 0143622 commit dfa174d

2 files changed

Lines changed: 5 additions & 28 deletions

File tree

‎arch/m68k/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ config M68K
66
select HAVE_DEBUG_BUGVERBOSE
77
select HAVE_GENERIC_HARDIRQS
88
select GENERIC_IRQ_SHOW
9+
select GENERIC_IDLE_LOOP
910
select GENERIC_ATOMIC64
1011
select HAVE_UID16
1112
select VIRT_TO_BUS

‎arch/m68k/kernel/process.c‎

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -51,40 +51,16 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
5151
return sw->retpc;
5252
}
5353

54-
/*
55-
* The idle loop on an m68k..
56-
*/
57-
static void default_idle(void)
54+
void arch_cpu_idle(void)
5855
{
59-
if (!need_resched())
6056
#if defined(MACH_ATARI_ONLY)
61-
/* block out HSYNC on the atari (falcon) */
62-
__asm__("stop #0x2200" : : : "cc");
57+
/* block out HSYNC on the atari (falcon) */
58+
__asm__("stop #0x2200" : : : "cc");
6359
#else
64-
__asm__("stop #0x2000" : : : "cc");
60+
__asm__("stop #0x2000" : : : "cc");
6561
#endif
6662
}
6763

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-
8864
void machine_restart(char * __unused)
8965
{
9066
if (mach_reset)

0 commit comments

Comments
 (0)