Commit d1dba0fc authored by Thomas Gleixner's avatar Thomas Gleixner

metag: 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: James Hogan <james.hogan@imgtec.com>
Link: http://lkml.kernel.org/r/20130321215234.606480852@linutronix.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent dfa174dc
...@@ -7,6 +7,7 @@ config METAG ...@@ -7,6 +7,7 @@ config METAG
select EMBEDDED select EMBEDDED
select GENERIC_ATOMIC64 select GENERIC_ATOMIC64
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IDLE_LOOP
select GENERIC_IRQ_SHOW select GENERIC_IRQ_SHOW
select GENERIC_SMP_IDLE_THREAD select GENERIC_SMP_IDLE_THREAD
select HAVE_64BIT_ALIGNED_ACCESS select HAVE_64BIT_ALIGNED_ACCESS
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/smp.h>
#include <asm/core_reg.h> #include <asm/core_reg.h>
#include <asm/user_gateway.h> #include <asm/user_gateway.h>
#include <asm/tcm.h> #include <asm/tcm.h>
...@@ -31,7 +32,7 @@ ...@@ -31,7 +32,7 @@
/* /*
* Wait for the next interrupt and enable local interrupts * Wait for the next interrupt and enable local interrupts
*/ */
static inline void arch_idle(void) void arch_cpu_idle(void)
{ {
int tmp; int tmp;
...@@ -59,36 +60,12 @@ static inline void arch_idle(void) ...@@ -59,36 +60,12 @@ static inline void arch_idle(void)
: "r" (get_trigger_mask())); : "r" (get_trigger_mask()));
} }
void cpu_idle(void)
{
set_thread_flag(TIF_POLLING_NRFLAG);
while (1) {
tick_nohz_idle_enter();
rcu_idle_enter();
while (!need_resched()) {
/*
* We need to disable interrupts here to ensure we don't
* miss a wakeup call.
*/
local_irq_disable();
if (!need_resched()) {
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
if (cpu_is_offline(smp_processor_id())) void arch_cpu_idle_dead(void)
cpu_die(); {
#endif cpu_die();
arch_idle();
} else {
local_irq_enable();
}
}
rcu_idle_exit();
tick_nohz_idle_exit();
schedule_preempt_disabled();
}
} }
#endif
void (*pm_power_off)(void); void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off); EXPORT_SYMBOL(pm_power_off);
......
...@@ -297,7 +297,7 @@ asmlinkage void secondary_start_kernel(void) ...@@ -297,7 +297,7 @@ asmlinkage void secondary_start_kernel(void)
/* /*
* OK, it's off to the idle thread for us * OK, it's off to the idle thread for us
*/ */
cpu_idle(); cpu_startup_entry(CPUHP_ONLINE);
} }
void __init smp_cpus_done(unsigned int max_cpus) void __init smp_cpus_done(unsigned int max_cpus)
......
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