/*
* the idle loop on a Sparc... ;)
*/
-int cpu_idle(void)
+void cpu_idle(void)
{
- if (current->pid != 0)
- return -EPERM;
-
/* endless idle loop with no priority at all */
for (;;) {
/* If current->work.need_resched is zero we should really
schedule();
check_pgt_cache();
}
- return 0;
}
#else
*/
#define idle_me_harder() (cpu_data(smp_processor_id()).idle_volume += 1)
#define unidle_me() (cpu_data(smp_processor_id()).idle_volume = 0)
-int cpu_idle(void)
+void cpu_idle(void)
{
set_thread_flag(TIF_POLLING_NRFLAG);
while(1) {
mm_segment_t old_fs;
__asm__ __volatile__ ("flushw");
- rw = (struct reg_window32 __user *)((long)(unsigned)regs->u_regs[14]);
+ rw = compat_ptr((unsigned)regs->u_regs[14]);
old_fs = get_fs();
set_fs (USER_DS);
if (copy_from_user (&r_w, rw, sizeof(r_w))) {
}
#ifdef CONFIG_SMP
-static spinlock_t regdump_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(regdump_lock);
#endif
void __show_regs(struct pt_regs * regs)
if (test_thread_flag(TIF_32BIT)) {
struct mm_struct *mm = t->task->mm;
pgd_t *pgd0 = &mm->pgd[0];
+ pud_t *pud0 = pud_offset(pgd0, 0);
- if (pgd_none(*pgd0)) {
- pmd_t *page = pmd_alloc_one_fast(NULL, 0);
- if (!page)
- page = pmd_alloc_one(NULL, 0);
- pgd_set(pgd0, page);
+ if (pud_none(*pud0)) {
+ pmd_t *page = pmd_alloc_one(mm, 0);
+ pud_set(pud0, page);
}
- pgd_cache = ((unsigned long) pgd_val(*pgd0)) << 11UL;
+ pgd_cache = get_pgd_cache(pgd0);
}
__asm__ __volatile__("stxa %0, [%1] %2\n\t"
"membar #Sync"
{
int __user *parent_tid_ptr, *child_tid_ptr;
- clone_flags &= ~CLONE_IDLETASK;
-
#ifdef CONFIG_COMPAT
if (test_thread_flag(TIF_32BIT)) {
parent_tid_ptr = compat_ptr(regs->u_regs[UREG_I2]);
p->thread.smp_lock_pc = 0;
#endif
- p->set_child_tid = p->clear_child_tid = NULL;
-
/* Calculate offset to stack_frame & pt_regs */
child_trap_frame = ((char *)t) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ));
memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));
current_thread_info()->xfsr[0] = 0;
current_thread_info()->fpsaved[0] = 0;
regs->tstate &= ~TSTATE_PEF;
+ task_lock(current);
current->ptrace &= ~PT_DTRACE;
+ task_unlock(current);
}
out:
return error;