patch-2.2.4 linux/arch/sparc/kernel/entry.S
Next file: linux/arch/sparc/kernel/head.S
Previous file: linux/arch/sparc/kernel/devices.c
Back to the patch index
Back to the overall index
- Lines: 68
- Date:
Wed Mar 10 16:53:36 1999
- Orig file:
v2.2.3/linux/arch/sparc/kernel/entry.S
- Orig date:
Thu Nov 19 09:56:27 1998
diff -u --recursive --new-file v2.2.3/linux/arch/sparc/kernel/entry.S linux/arch/sparc/kernel/entry.S
@@ -1,10 +1,10 @@
-/* $Id: entry.S,v 1.153 1998/11/11 15:12:33 jj Exp $
+/* $Id: entry.S,v 1.157 1999/01/19 07:54:32 davem Exp $
* arch/sparc/kernel/entry.S: Sparc trap low-level entry points.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
* Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
* Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
- * Copyright (C) 1996,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au)
*/
@@ -1380,11 +1380,13 @@
/* Now that we have a real sys_clone, sys_fork() is
* implemented in terms of it. Our _real_ implementation
- * of SunOS vfork() will use sys_clone() instead.
+ * of SunOS vfork() will use sys_vfork().
+ *
+ * XXX These three should be consolidated into mostly shared
+ * XXX code just like on sparc64... -DaveM
*/
.align 4
- .globl C_LABEL(sys_fork), C_LABEL(sys_vfork), flush_patch_two
-C_LABEL(sys_vfork):
+ .globl C_LABEL(sys_fork), flush_patch_two
C_LABEL(sys_fork):
mov %o7, %l5
flush_patch_two:
@@ -1422,6 +1424,23 @@
call C_LABEL(do_fork)
mov %l5, %o7
+ /* Whee, real vfork! */
+ .globl C_LABEL(sys_vfork), flush_patch_four
+C_LABEL(sys_vfork):
+flush_patch_four:
+ FLUSH_ALL_KERNEL_WINDOWS;
+ rd %psr, %g4
+ WRITE_PAUSE
+ rd %wim, %g5
+ WRITE_PAUSE
+ std %g4, [%curptr + AOFF_task_tss + AOFF_thread_fork_kpsr]
+ sethi %hi(0x4000 | 0x0100 | SIGCHLD), %o0
+ mov %fp, %o1
+ or %o0, %lo(0x4000 | 0x0100 | SIGCHLD), %o0
+ sethi %hi(C_LABEL(do_fork)), %l1
+ jmpl %l1 + %lo(C_LABEL(do_fork)), %g0
+ add %sp, REGWIN_SZ, %o2
+
.align 4
linux_sparc_ni_syscall:
sethi %hi(C_LABEL(sys_ni_syscall)), %l7
@@ -1454,11 +1473,10 @@
#ifdef __SMP__
.globl C_LABEL(ret_from_smpfork)
C_LABEL(ret_from_smpfork):
- /* Nowadays all we need to do is drop the scheduler lock. */
- sethi %hi(C_LABEL(scheduler_lock)), %o4
- stb %g0, [%o4 + %lo(C_LABEL(scheduler_lock))]
wr %l0, PSR_ET, %psr
WRITE_PAUSE
+ call schedule_tail
+ nop
b C_LABEL(ret_sys_call)
ld [%sp + REGWIN_SZ + PT_I0], %o0
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)