Commit cdbedc61 authored by Thomas Gleixner's avatar Thomas Gleixner

mips: Use generic idle loop

Signed-off-by: default avatarThomas 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: default avatarCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/20130321215234.754954871@linutronix.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e962bb9e
...@@ -34,6 +34,7 @@ config MIPS ...@@ -34,6 +34,7 @@ config MIPS
select HAVE_MEMBLOCK_NODE_MAP select HAVE_MEMBLOCK_NODE_MAP
select ARCH_DISCARD_MEMBLOCK select ARCH_DISCARD_MEMBLOCK
select GENERIC_SMP_IDLE_THREAD select GENERIC_SMP_IDLE_THREAD
select GENERIC_IDLE_LOOP
select BUILDTIME_EXTABLE_SORT select BUILDTIME_EXTABLE_SORT
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_CMOS_UPDATE select GENERIC_CMOS_UPDATE
......
...@@ -41,44 +41,26 @@ ...@@ -41,44 +41,26 @@
#include <asm/inst.h> #include <asm/inst.h>
#include <asm/stacktrace.h> #include <asm/stacktrace.h>
/* #ifdef CONFIG_HOTPLUG_CPU
* The idle thread. There's no useful work to be done, so just try to conserve void arch_cpu_idle_dead(void)
* power and have a low exit latency (ie sit in a loop waiting for somebody to
* say that they'd like to reschedule)
*/
void __noreturn cpu_idle(void)
{ {
int cpu; /* What the heck is this check doing ? */
if (!cpu_isset(smp_processor_id(), cpu_callin_map))
/* CPU is going idle. */ play_dead();
cpu = smp_processor_id(); }
#endif
/* endless idle loop with no priority at all */ void arch_cpu_idle(void)
while (1) { {
tick_nohz_idle_enter();
rcu_idle_enter();
while (!need_resched() && cpu_online(cpu)) {
#ifdef CONFIG_MIPS_MT_SMTC #ifdef CONFIG_MIPS_MT_SMTC
extern void smtc_idle_loop_hook(void); extern void smtc_idle_loop_hook(void);
smtc_idle_loop_hook(); smtc_idle_loop_hook();
#endif #endif
if (cpu_wait)
if (cpu_wait) {
/* Don't trace irqs off for idle */
stop_critical_timings();
(*cpu_wait)(); (*cpu_wait)();
start_critical_timings(); else
} local_irq_enable();
}
#ifdef CONFIG_HOTPLUG_CPU
if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map))
play_dead();
#endif
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
}
} }
asmlinkage void ret_from_fork(void); asmlinkage void ret_from_fork(void);
......
...@@ -139,7 +139,7 @@ asmlinkage __cpuinit void start_secondary(void) ...@@ -139,7 +139,7 @@ asmlinkage __cpuinit void start_secondary(void)
WARN_ON_ONCE(!irqs_disabled()); WARN_ON_ONCE(!irqs_disabled());
mp_ops->smp_finish(); mp_ops->smp_finish();
cpu_idle(); cpu_startup_entry(CPUHP_ONLINE);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment