/*
* Power management idle function
- * Set in pm platform drivers
+ * Set in pm platform drivers (apc.c and pmc.c)
*/
void (*pm_idle)(void);
/*
* the idle loop on a Sparc... ;)
*/
-int cpu_idle(void)
+void cpu_idle(void)
{
- int ret = -EPERM;
-
if (current->pid != 0)
goto out;
}
while((!need_resched()) && pm_idle) {
- (*pm_idle)(); /* XXX Huh? On sparc?! */
+ (*pm_idle)();
}
schedule();
check_pgt_cache();
}
- ret = 0;
out:
- return ret;
+ return;
}
#else
/* This is being executed in task 0 'user space'. */
-int cpu_idle(void)
+void cpu_idle(void)
{
/* endless idle loop with no priority at all */
while(1) {
EXPORT_SYMBOL(machine_power_off);
-static spinlock_t sparc_backtrace_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sparc_backtrace_lock);
void __show_backtrace(unsigned long fp)
{
#endif
}
- p->set_child_tid = p->clear_child_tid = NULL;
-
/*
* p->thread_info new_stack childregs
* ! ! ! {if(PSR_PS) }
}
}
+#ifdef CONFIG_SMP
+ /* FPU must be disabled on SMP. */
+ childregs->psr &= ~PSR_EF;
+#endif
+
/* Set the return value for the child. */
childregs->u_regs[UREG_I0] = current->pid;
childregs->u_regs[UREG_I1] = 1;
*/
int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs)
{
- if (current->used_math == 0) {
+ if (used_math()) {
memset(fpregs, 0, sizeof(*fpregs));
fpregs->pr_q_entrysize = 8;
return 1;
(char __user * __user *)regs->u_regs[base + UREG_I2],
regs);
putname(filename);
- if (error == 0)
+ if (error == 0) {
+ task_lock(current);
current->ptrace &= ~PT_DTRACE;
+ task_unlock(current);
+ }
out:
return error;
}