| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: vm_machdep.c,v 1.145 2009/03/29 01:10:28 rmind Exp $ */ | | 1 | /* $NetBSD: vm_machdep.c,v 1.146 2009/03/30 17:48:22 dyoung Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1982, 1986 The Regents of the University of California. | | 4 | * Copyright (c) 1982, 1986 The Regents of the University of California. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to Berkeley by | | 7 | * This code is derived from software contributed to Berkeley by |
8 | * the Systems Programming Group of the University of Utah Computer | | 8 | * the Systems Programming Group of the University of Utah Computer |
9 | * Science Department, and William Jolitz. | | 9 | * Science Department, and William Jolitz. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -70,27 +70,27 @@ | | | @@ -70,27 +70,27 @@ |
70 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 70 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
71 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 71 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
72 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 72 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
73 | * SUCH DAMAGE. | | 73 | * SUCH DAMAGE. |
74 | * | | 74 | * |
75 | * @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 | | 75 | * @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 |
76 | */ | | 76 | */ |
77 | | | 77 | |
78 | /* | | 78 | /* |
79 | * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ | | 79 | * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ |
80 | */ | | 80 | */ |
81 | | | 81 | |
82 | #include <sys/cdefs.h> | | 82 | #include <sys/cdefs.h> |
83 | __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.145 2009/03/29 01:10:28 rmind Exp $"); | | 83 | __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.146 2009/03/30 17:48:22 dyoung Exp $"); |
84 | | | 84 | |
85 | #include "opt_mtrr.h" | | 85 | #include "opt_mtrr.h" |
86 | | | 86 | |
87 | #include <sys/param.h> | | 87 | #include <sys/param.h> |
88 | #include <sys/systm.h> | | 88 | #include <sys/systm.h> |
89 | #include <sys/proc.h> | | 89 | #include <sys/proc.h> |
90 | #include <sys/vnode.h> | | 90 | #include <sys/vnode.h> |
91 | #include <sys/buf.h> | | 91 | #include <sys/buf.h> |
92 | #include <sys/user.h> | | 92 | #include <sys/user.h> |
93 | #include <sys/core.h> | | 93 | #include <sys/core.h> |
94 | #include <sys/exec.h> | | 94 | #include <sys/exec.h> |
95 | #include <sys/ptrace.h> | | 95 | #include <sys/ptrace.h> |
96 | | | 96 | |
| @@ -219,27 +219,26 @@ cpu_swapout(struct lwp *l) | | | @@ -219,27 +219,26 @@ cpu_swapout(struct lwp *l) |
219 | */ | | 219 | */ |
220 | npxsave_lwp(l, true); | | 220 | npxsave_lwp(l, true); |
221 | #endif | | 221 | #endif |
222 | } | | 222 | } |
223 | | | 223 | |
224 | /* | | 224 | /* |
225 | * cpu_lwp_free is called from exit() to let machine-dependent | | 225 | * cpu_lwp_free is called from exit() to let machine-dependent |
226 | * code free machine-dependent resources. Note that this routine | | 226 | * code free machine-dependent resources. Note that this routine |
227 | * must not block. | | 227 | * must not block. |
228 | */ | | 228 | */ |
229 | void | | 229 | void |
230 | cpu_lwp_free(struct lwp *l, int proc) | | 230 | cpu_lwp_free(struct lwp *l, int proc) |
231 | { | | 231 | { |
232 | | | | |
233 | #if NNPX > 0 | | 232 | #if NNPX > 0 |
234 | /* If we were using the FPU, forget about it. */ | | 233 | /* If we were using the FPU, forget about it. */ |
235 | if (l->l_addr->u_pcb.pcb_fpcpu != NULL) | | 234 | if (l->l_addr->u_pcb.pcb_fpcpu != NULL) |
236 | npxsave_lwp(l, false); | | 235 | npxsave_lwp(l, false); |
237 | #endif | | 236 | #endif |
238 | | | 237 | |
239 | #ifdef MTRR | | 238 | #ifdef MTRR |
240 | if (proc && l->l_proc->p_md.md_flags & MDP_USEDMTRR) | | 239 | if (proc && l->l_proc->p_md.md_flags & MDP_USEDMTRR) |
241 | mtrr_clean(l->l_proc); | | 240 | mtrr_clean(l->l_proc); |
242 | #endif | | 241 | #endif |
243 | } | | 242 | } |
244 | | | 243 | |
245 | /* | | 244 | /* |