|
@@ -58,11 +58,6 @@
|
|
|
|
|
|
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
|
|
asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
|
|
|
|
|
|
-static int hlt_counter;
|
|
|
|
-
|
|
|
|
-unsigned long boot_option_idle_override = 0;
|
|
|
|
-EXPORT_SYMBOL(boot_option_idle_override);
|
|
|
|
-
|
|
|
|
DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
|
|
DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
|
|
EXPORT_PER_CPU_SYMBOL(current_task);
|
|
EXPORT_PER_CPU_SYMBOL(current_task);
|
|
|
|
|
|
@@ -77,55 +72,6 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
|
|
return ((unsigned long *)tsk->thread.sp)[3];
|
|
return ((unsigned long *)tsk->thread.sp)[3];
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
- * Powermanagement idle function, if any..
|
|
|
|
- */
|
|
|
|
-void (*pm_idle)(void);
|
|
|
|
-EXPORT_SYMBOL(pm_idle);
|
|
|
|
-
|
|
|
|
-void disable_hlt(void)
|
|
|
|
-{
|
|
|
|
- hlt_counter++;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-EXPORT_SYMBOL(disable_hlt);
|
|
|
|
-
|
|
|
|
-void enable_hlt(void)
|
|
|
|
-{
|
|
|
|
- hlt_counter--;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-EXPORT_SYMBOL(enable_hlt);
|
|
|
|
-
|
|
|
|
-/*
|
|
|
|
- * We use this if we don't have any better
|
|
|
|
- * idle routine..
|
|
|
|
- */
|
|
|
|
-void default_idle(void)
|
|
|
|
-{
|
|
|
|
- if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
|
|
|
|
- current_thread_info()->status &= ~TS_POLLING;
|
|
|
|
- /*
|
|
|
|
- * TS_POLLING-cleared state must be visible before we
|
|
|
|
- * test NEED_RESCHED:
|
|
|
|
- */
|
|
|
|
- smp_mb();
|
|
|
|
-
|
|
|
|
- if (!need_resched())
|
|
|
|
- safe_halt(); /* enables interrupts racelessly */
|
|
|
|
- else
|
|
|
|
- local_irq_enable();
|
|
|
|
- current_thread_info()->status |= TS_POLLING;
|
|
|
|
- } else {
|
|
|
|
- local_irq_enable();
|
|
|
|
- /* loop is done by the caller */
|
|
|
|
- cpu_relax();
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-#ifdef CONFIG_APM_MODULE
|
|
|
|
-EXPORT_SYMBOL(default_idle);
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
#include <asm/nmi.h>
|
|
#include <asm/nmi.h>
|
|
/* We don't actually take CPU down, just spin without interrupts. */
|
|
/* We don't actually take CPU down, just spin without interrupts. */
|