Module Name: src
Committed By: maxv
Date: Fri Oct 18 16:26:38 UTC 2019
Modified Files:
src/sys/arch/x86/x86: vm_machdep.c
Log Message:
Remove unused call to savectx().
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x86/x86/vm_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/vm_machdep.c
diff -u src/sys/arch/x86/x86/vm_machdep.c:1.38 src/sys/arch/x86/x86/vm_machdep.c:1.39
--- src/sys/arch/x86/x86/vm_machdep.c:1.38 Sat Oct 12 06:31:04 2019
+++ src/sys/arch/x86/x86/vm_machdep.c Fri Oct 18 16:26:38 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.38 2019/10/12 06:31:04 maxv Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.39 2019/10/18 16:26:38 maxv Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.38 2019/10/12 06:31:04 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.39 2019/10/18 16:26:38 maxv Exp $");
#include "opt_mtrr.h"
@@ -136,19 +136,11 @@ cpu_lwp_fork(struct lwp *l1, struct lwp
struct switchframe *sf;
vaddr_t uv;
+ KASSERT(l1 == curlwp || l1 == &lwp0);
+
pcb1 = lwp_getpcb(l1);
pcb2 = lwp_getpcb(l2);
- /*
- * Sync the PCB before we copy it.
- */
- if (l1 == curlwp) {
- KASSERT(pcb1 == curpcb);
- savectx(pcb1);
- } else {
- KASSERT(l1 == &lwp0);
- }
-
/* Copy the PCB from parent, except the FPU state. */
memcpy(pcb2, pcb1, offsetof(struct pcb, pcb_savefpu));