diff options
author | jhb <jhb@FreeBSD.org> | 2001-01-24 21:59:25 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-01-24 21:59:25 +0000 |
commit | af00dc8eef26d6f9d2b9d3cd92429a0db97e0b3c (patch) | |
tree | 1a65f27d40bfb7ed1d2518d205618e42ea64e92b /sys/alpha | |
parent | 222035d6b123a02eab80f14e5165f2cf38dfda82 (diff) | |
download | FreeBSD-src-af00dc8eef26d6f9d2b9d3cd92429a0db97e0b3c.zip FreeBSD-src-af00dc8eef26d6f9d2b9d3cd92429a0db97e0b3c.tar.gz |
- Change fork_exit() to take a pointer to a trapframe as its 3rd argument
instead of a trapframe directly. (Requested by bde.)
- Convert the alpha switch_trampoline to call fork_exit() and use the MI
fork_return() instead of child_return().
- Axe child_return().
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/swtch.s | 16 | ||||
-rw-r--r-- | sys/alpha/alpha/trap.c | 25 | ||||
-rw-r--r-- | sys/alpha/alpha/vm_machdep.c | 4 |
3 files changed, 9 insertions, 36 deletions
diff --git a/sys/alpha/alpha/swtch.s b/sys/alpha/alpha/swtch.s index aff4d42..f456aa1 100644 --- a/sys/alpha/alpha/swtch.s +++ b/sys/alpha/alpha/swtch.s @@ -206,18 +206,16 @@ Lcs7: * * Arrange for a function to be invoked neatly, after a cpu_switch(). * - * Invokes the function specified by the s0 register with the return - * address specified by the s1 register and with one argument, a - * pointer to the executing process's proc structure. + * Invokes fork_exit() passing in three arguments: a callout function, + * a pointer to the executing process's proc structure, and a trapframe + * pointer. */ LEAF(switch_trampoline, 0) - MTX_EXIT(sched_lock) - ldiq a0, ALPHA_PSL_IPL_0 /* drop IPL to zero */ - call_pal PAL_OSF1_swpipl - mov s0, pv mov s1, ra - mov s2, a0 - jmp zero, (pv) + mov s0, a0 + mov s2, a1 + mov sp, a2 + jmp zero, fork_exit END(switch_trampoline) diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index 31f5591..f6d1f84 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -752,31 +752,6 @@ syscall(code, framep) } /* - * Process the tail end of a fork() for the child. - */ -void -child_return(p) - struct proc *p; -{ - - /* - * Return values in the frame set by cpu_fork(). - */ - - userret(p, p->p_md.md_tf, 0); -#ifdef KTRACE - if (KTRPOINT(p, KTR_SYSRET)) { - if (!mtx_owned(&Giant)) - mtx_enter(&Giant, MTX_DEF); - ktrsysret(p->p_tracep, SYS_fork, 0, 0); - } -#endif - - if (mtx_owned(&Giant)) - mtx_exit(&Giant, MTX_DEF); -} - -/* * Process an asynchronous software trap. * This is relatively easy. */ diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index c60f971..c5c8cd5 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -196,7 +196,7 @@ cpu_fork(p1, p2, flags) p2tf->tf_regs[FRAME_A4] = 1; /* is child (FreeBSD) */ /* - * Arrange for continuation at child_return(), which + * Arrange for continuation at fork_return(), which * will return to exception_return(). Note that the child * process doesn't stay in the kernel for long! * @@ -204,7 +204,7 @@ cpu_fork(p1, p2, flags) */ up->u_pcb.pcb_hw.apcb_ksp = (u_int64_t)p2tf; up->u_pcb.pcb_context[0] = - (u_int64_t)child_return; /* s0: pc */ + (u_int64_t)fork_return; /* s0: pc */ up->u_pcb.pcb_context[1] = (u_int64_t)exception_return; /* s1: ra */ up->u_pcb.pcb_context[2] = (u_long) p2; /* s2: a0 */ |