patch-2.1.37 linux/arch/sparc/kernel/process.c

Next file: linux/arch/sparc/kernel/ptrace.c
Previous file: linux/arch/sparc/kernel/init_task.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/arch/sparc/kernel/process.c linux/arch/sparc/kernel/process.c
@@ -1,4 +1,4 @@
-/*  $Id: process.c,v 1.93 1997/04/11 08:55:40 davem Exp $
+/*  $Id: process.c,v 1.96 1997/05/01 08:53:33 davem Exp $
  *  linux/arch/sparc/kernel/process.c
  *
  *  Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -441,12 +441,12 @@
 
 	if(regs->psr & PSR_PS)
 		stack_offset -= REGWIN_SZ;
-	childregs = ((struct pt_regs *) (p->kernel_stack_page + stack_offset));
+	childregs = ((struct pt_regs *) (((unsigned long)p) + stack_offset));
 	copy_regs(childregs, regs);
 	new_stack = (((struct reg_window *) childregs) - 1);
 	copy_regwin(new_stack, (((struct reg_window *) regs) - 1));
 
-	p->tss.ksp = p->saved_kernel_stack = (unsigned long) new_stack;
+	p->tss.ksp = (unsigned long) new_stack;
 #ifdef __SMP__
 	p->tss.kpc = (((unsigned long) ret_from_smpfork) - 0x8);
 	p->tss.kpsr = current->tss.fork_kpsr | PSR_PIL;
@@ -467,7 +467,7 @@
 		p->tss.flags &= ~SPARC_FLAG_KTHREAD;
 		p->tss.current_ds = USER_DS;
 
-		if (sp != current->tss.kregs->u_regs[UREG_FP]) {
+		if (sp != regs->u_regs[UREG_FP]) {
 			struct sparc_stackf *childstack;
 			struct sparc_stackf *parentstack;
 
@@ -475,9 +475,8 @@
 			 * This is a clone() call with supplied user stack.
 			 * Set some valid stack frames to give to the child.
 			 */
-			childstack = (struct sparc_stackf *)sp;
-			parentstack = (struct sparc_stackf *)
-					current->tss.kregs->u_regs[UREG_FP];
+			childstack = (struct sparc_stackf *) sp;
+			parentstack = (struct sparc_stackf *) regs->u_regs[UREG_FP];
 
 #if 0
 			printk("clone: parent stack:\n");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov