diff options
Diffstat (limited to 'arch/sparc/kernel/process_32.c')
| -rw-r--r-- | arch/sparc/kernel/process_32.c | 83 | 
1 files changed, 3 insertions, 80 deletions
| diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 13cb5638fab8..adfcaeab3ddc 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c @@ -34,7 +34,6 @@  #include <asm/oplib.h>  #include <linux/uaccess.h>  #include <asm/page.h> -#include <asm/pgalloc.h>  #include <asm/delay.h>  #include <asm/processor.h>  #include <asm/psr.h> @@ -257,33 +256,6 @@ clone_stackframe(struct sparc_stackf __user *dst,  	return sp;  } -asmlinkage int sparc_do_fork(unsigned long clone_flags, -                             unsigned long stack_start, -                             struct pt_regs *regs, -                             unsigned long stack_size) -{ -	unsigned long parent_tid_ptr, child_tid_ptr; -	unsigned long orig_i1 = regs->u_regs[UREG_I1]; -	long ret; - -	parent_tid_ptr = regs->u_regs[UREG_I2]; -	child_tid_ptr = regs->u_regs[UREG_I4]; - -	ret = do_fork(clone_flags, stack_start, stack_size, -		      (int __user *) parent_tid_ptr, -		      (int __user *) child_tid_ptr); - -	/* If we get an error and potentially restart the system -	 * call, we're screwed because copy_thread() clobbered -	 * the parent's %o1.  So detect that case and restore it -	 * here. -	 */ -	if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK) -		regs->u_regs[UREG_I1] = orig_i1; - -	return ret; -} -  /* Copy a Sparc thread.  The fork() return value conventions   * under SunOS are nothing short of bletcherous:   * Parent -->  %o0 == childs  pid, %o1 == 0 @@ -300,8 +272,8 @@ asmlinkage int sparc_do_fork(unsigned long clone_flags,  extern void ret_from_fork(void);  extern void ret_from_kernel_thread(void); -int copy_thread(unsigned long clone_flags, unsigned long sp, -		unsigned long arg, struct task_struct *p) +int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, +		struct task_struct *p, unsigned long tls)  {  	struct thread_info *ti = task_thread_info(p);  	struct pt_regs *childregs, *regs = current_pt_regs(); @@ -403,60 +375,11 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,  	regs->u_regs[UREG_I1] = 0;  	if (clone_flags & CLONE_SETTLS) -		childregs->u_regs[UREG_G7] = regs->u_regs[UREG_I3]; +		childregs->u_regs[UREG_G7] = tls;  	return 0;  } -/* - * fill in the fpu structure for a core dump. - */ -int dump_fpu (struct pt_regs * regs, elf_fpregset_t * fpregs) -{ -	if (used_math()) { -		memset(fpregs, 0, sizeof(*fpregs)); -		fpregs->pr_q_entrysize = 8; -		return 1; -	} -#ifdef CONFIG_SMP -	if (test_thread_flag(TIF_USEDFPU)) { -		put_psr(get_psr() | PSR_EF); -		fpsave(¤t->thread.float_regs[0], ¤t->thread.fsr, -		       ¤t->thread.fpqueue[0], ¤t->thread.fpqdepth); -		if (regs != NULL) { -			regs->psr &= ~(PSR_EF); -			clear_thread_flag(TIF_USEDFPU); -		} -	} -#else -	if (current == last_task_used_math) { -		put_psr(get_psr() | PSR_EF); -		fpsave(¤t->thread.float_regs[0], ¤t->thread.fsr, -		       ¤t->thread.fpqueue[0], ¤t->thread.fpqdepth); -		if (regs != NULL) { -			regs->psr &= ~(PSR_EF); -			last_task_used_math = NULL; -		} -	} -#endif -	memcpy(&fpregs->pr_fr.pr_regs[0], -	       ¤t->thread.float_regs[0], -	       (sizeof(unsigned long) * 32)); -	fpregs->pr_fsr = current->thread.fsr; -	fpregs->pr_qcnt = current->thread.fpqdepth; -	fpregs->pr_q_entrysize = 8; -	fpregs->pr_en = 1; -	if(fpregs->pr_qcnt != 0) { -		memcpy(&fpregs->pr_q[0], -		       ¤t->thread.fpqueue[0], -		       sizeof(struct fpq) * fpregs->pr_qcnt); -	} -	/* Zero out the rest. */ -	memset(&fpregs->pr_q[fpregs->pr_qcnt], 0, -	       sizeof(struct fpq) * (32 - fpregs->pr_qcnt)); -	return 1; -} -  unsigned long get_wchan(struct task_struct *task)  {  	unsigned long pc, fp, bias = 0; |