alpha: Use generic idle loop
The core provides a generic idle poll 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: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Link: http://lkml.kernel.org/r/20130321215233.766017538@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
fa35e42a00
commit
a123322d8a
|
@ -17,6 +17,7 @@ config ALPHA
|
||||||
select ARCH_WANT_IPC_PARSE_VERSION
|
select ARCH_WANT_IPC_PARSE_VERSION
|
||||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||||
select GENERIC_SMP_IDLE_THREAD
|
select GENERIC_SMP_IDLE_THREAD
|
||||||
|
select GENERIC_IDLE_LOOP
|
||||||
select GENERIC_CMOS_UPDATE
|
select GENERIC_CMOS_UPDATE
|
||||||
select GENERIC_STRNCPY_FROM_USER
|
select GENERIC_STRNCPY_FROM_USER
|
||||||
select GENERIC_STRNLEN_USER
|
select GENERIC_STRNLEN_USER
|
||||||
|
|
|
@ -46,25 +46,6 @@
|
||||||
void (*pm_power_off)(void) = machine_power_off;
|
void (*pm_power_off)(void) = machine_power_off;
|
||||||
EXPORT_SYMBOL(pm_power_off);
|
EXPORT_SYMBOL(pm_power_off);
|
||||||
|
|
||||||
void
|
|
||||||
cpu_idle(void)
|
|
||||||
{
|
|
||||||
current_thread_info()->status |= TS_POLLING;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
/* FIXME -- EV6 and LCA45 know how to power down
|
|
||||||
the CPU. */
|
|
||||||
|
|
||||||
rcu_idle_enter();
|
|
||||||
while (!need_resched())
|
|
||||||
cpu_relax();
|
|
||||||
|
|
||||||
rcu_idle_exit();
|
|
||||||
schedule_preempt_disabled();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct halt_info {
|
struct halt_info {
|
||||||
int mode;
|
int mode;
|
||||||
char *restart_cmd;
|
char *restart_cmd;
|
||||||
|
|
|
@ -167,8 +167,7 @@ smp_callin(void)
|
||||||
cpuid, current, current->active_mm));
|
cpuid, current, current->active_mm));
|
||||||
|
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
/* Do nothing. */
|
cpu_startup_entry(CPUHP_ONLINE);
|
||||||
cpu_idle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
|
/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
|
||||||
|
|
Loading…
Reference in a new issue