aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/vm_machdep.c
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2002-03-27 05:39:23 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2002-03-27 05:39:23 +0000
commitd74ac6819b2cc8e5c18a099a97ffc16616b4e94d (patch)
tree8233f61cf29e01829b91c6a5cf27defe60e6b8d8 /sys/amd64/amd64/vm_machdep.c
parent50a565560242eb8b86d01bb62036d501aa4fa52b (diff)
downloadsrc-d74ac6819b2cc8e5c18a099a97ffc16616b4e94d.tar.gz
src-d74ac6819b2cc8e5c18a099a97ffc16616b4e94d.zip
Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt
disablement assumptions in kern_fork.c by adding another API call, cpu_critical_fork_exit(). Cleanup the td_savecrit field by moving it from MI to MD. Temporarily move cpu_critical*() from <arch>/include/cpufunc.h to <arch>/<arch>/critical.c (stage-2 will clean this up). Implement interrupt deferral for i386 that allows interrupts to remain enabled inside critical sections. This also fixes an IPI interlock bug, and requires uses of icu_lock to be enclosed in a true interrupt disablement. This is the stage-1 commit. Stage-2 will occur after stage-1 has stabilized, and will move cpu_critical*() into its own header file(s) + other things. This commit may break non-i386 architectures in trivial ways. This should be temporary. Reviewed by: core Approved by: core
Notes
Notes: svn path=/head/; revision=93264
Diffstat (limited to 'sys/amd64/amd64/vm_machdep.c')
-rw-r--r--sys/amd64/amd64/vm_machdep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 59f3f89b2b58..a7e852a88955 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -193,6 +193,7 @@ cpu_fork(td1, p2, td2, flags)
pcb2->pcb_esp = (int)td2->td_frame - sizeof(void *);
pcb2->pcb_ebx = (int)td2; /* fork_trampoline argument */
pcb2->pcb_eip = (int)fork_trampoline;
+ pcb2->pcb_psl = td2->td_frame->tf_eflags & ~PSL_I; /* ints disabled */
/*-
* pcb2->pcb_dr*: cloned above.
* pcb2->pcb_savefpu: cloned above.