mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
bfin: 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: Mike Frysinger <vapier@gentoo.org> Link: http://lkml.kernel.org/r/20130321215234.014923303@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
01426478df
commit
25d67f860f
@ -41,6 +41,7 @@ config BLACKFIN
|
|||||||
select USE_GENERIC_SMP_HELPERS if SMP
|
select USE_GENERIC_SMP_HELPERS if SMP
|
||||||
select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
|
select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
|
||||||
select GENERIC_SMP_IDLE_THREAD
|
select GENERIC_SMP_IDLE_THREAD
|
||||||
|
select GENERIC_IDLE_LOOP
|
||||||
select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
|
select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
|
||||||
select HAVE_MOD_ARCH_SPECIFIC
|
select HAVE_MOD_ARCH_SPECIFIC
|
||||||
select MODULES_USE_ELF_RELA
|
select MODULES_USE_ELF_RELA
|
||||||
|
@ -46,15 +46,14 @@ EXPORT_SYMBOL(pm_power_off);
|
|||||||
* The idle loop on BFIN
|
* The idle loop on BFIN
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_IDLE_L1
|
#ifdef CONFIG_IDLE_L1
|
||||||
static void default_idle(void)__attribute__((l1_text));
|
void arch_cpu_idle(void)__attribute__((l1_text));
|
||||||
void cpu_idle(void)__attribute__((l1_text));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is our default idle handler. We need to disable
|
* This is our default idle handler. We need to disable
|
||||||
* interrupts here to ensure we don't miss a wakeup call.
|
* interrupts here to ensure we don't miss a wakeup call.
|
||||||
*/
|
*/
|
||||||
static void default_idle(void)
|
void arch_cpu_idle(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_IPIPE
|
#ifdef CONFIG_IPIPE
|
||||||
ipipe_suspend_domain();
|
ipipe_suspend_domain();
|
||||||
@ -66,31 +65,12 @@ static void default_idle(void)
|
|||||||
hard_local_irq_enable();
|
hard_local_irq_enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
#ufdef CONFIG_HOTPLUG_CPU
|
||||||
* The idle thread. We try to conserve power, while trying to keep
|
void arch_cpu_idle_dead(void)
|
||||||
* overall latency low. The architecture specific idle is passed
|
|
||||||
* a value to indicate the level of "idleness" of the system.
|
|
||||||
*/
|
|
||||||
void cpu_idle(void)
|
|
||||||
{
|
{
|
||||||
/* endless idle loop with no priority at all */
|
|
||||||
while (1) {
|
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
|
||||||
if (cpu_is_offline(smp_processor_id()))
|
|
||||||
cpu_die();
|
cpu_die();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
tick_nohz_idle_enter();
|
|
||||||
rcu_idle_enter();
|
|
||||||
while (!need_resched())
|
|
||||||
default_idle();
|
|
||||||
rcu_idle_exit();
|
|
||||||
tick_nohz_idle_exit();
|
|
||||||
preempt_enable_no_resched();
|
|
||||||
schedule();
|
|
||||||
preempt_disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do necessary setup to start up a newly executed thread.
|
* Do necessary setup to start up a newly executed thread.
|
||||||
|
@ -335,7 +335,7 @@ void __cpuinit secondary_start_kernel(void)
|
|||||||
*/
|
*/
|
||||||
calibrate_delay();
|
calibrate_delay();
|
||||||
|
|
||||||
cpu_idle();
|
cpu_startup_entry(CPUHP_ONLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init smp_prepare_boot_cpu(void)
|
void __init smp_prepare_boot_cpu(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user