patch-2.1.40 linux/include/asm-m68k/unistd.h

Next file: linux/include/asm-mips/bootinfo.h
Previous file: linux/include/asm-m68k/system.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.39/linux/include/asm-m68k/unistd.h linux/include/asm-m68k/unistd.h
@@ -322,9 +322,11 @@
 	set_fs (KERNEL_DS);
 
 	__asm__ __volatile__
-	  ("trap #0\n\t"		/* Linux/m68k system call */
+	  ("clrl %%d2\n\t"
+	   "trap #0\n\t"		/* Linux/m68k system call */
 	   "tstl %0\n\t"		/* child or parent */
 	   "jne 1f\n\t"			/* parent - jump */
+	   "lea %%sp@(-8192),%6\n\t"	/* reload current */
 	   "movel %3,%%sp@-\n\t"	/* push argument */
 	   "jsr %4@\n\t"		/* call fn */
 	   "movel %0,%%d1\n\t"		/* pass exit value */
@@ -333,8 +335,8 @@
 	   "1:"
 	   : "=d" (retval)
 	   : "0" (__NR_clone), "i" (__NR_exit),
-	     "r" (arg), "a" (fn), "d" (clone_arg)
-	   : "d0");
+	     "r" (arg), "a" (fn), "d" (clone_arg), "r" (current)
+	   : "d0", "d2");
 
 	set_fs (fs);
 	return retval;

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