| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pmap.c,v 1.167 2012/02/21 19:10:13 bouyer Exp $ */ | | 1 | /* $NetBSD: pmap.c,v 1.168 2012/02/21 19:25:05 bouyer Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Andrew Doran. | | 8 | * by Andrew Doran. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -161,27 +161,27 @@ | | | @@ -161,27 +161,27 @@ |
161 | * Hibler/Jolitz pmap, as modified for FreeBSD by John S. Dyson | | 161 | * Hibler/Jolitz pmap, as modified for FreeBSD by John S. Dyson |
162 | * and David Greenman. | | 162 | * and David Greenman. |
163 | * | | 163 | * |
164 | * [3] the Mach pmap. this pmap, from CMU, seems to have migrated | | 164 | * [3] the Mach pmap. this pmap, from CMU, seems to have migrated |
165 | * between several processors. the VAX version was done by | | 165 | * between several processors. the VAX version was done by |
166 | * Avadis Tevanian, Jr., and Michael Wayne Young. the i386 | | 166 | * Avadis Tevanian, Jr., and Michael Wayne Young. the i386 |
167 | * version was done by Lance Berc, Mike Kupfer, Bob Baron, | | 167 | * version was done by Lance Berc, Mike Kupfer, Bob Baron, |
168 | * David Golub, and Richard Draves. the alpha version was | | 168 | * David Golub, and Richard Draves. the alpha version was |
169 | * done by Alessandro Forin (CMU/Mach) and Chris Demetriou | | 169 | * done by Alessandro Forin (CMU/Mach) and Chris Demetriou |
170 | * (NetBSD/alpha). | | 170 | * (NetBSD/alpha). |
171 | */ | | 171 | */ |
172 | | | 172 | |
173 | #include <sys/cdefs.h> | | 173 | #include <sys/cdefs.h> |
174 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.167 2012/02/21 19:10:13 bouyer Exp $"); | | 174 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.168 2012/02/21 19:25:05 bouyer Exp $"); |
175 | | | 175 | |
176 | #include "opt_user_ldt.h" | | 176 | #include "opt_user_ldt.h" |
177 | #include "opt_lockdebug.h" | | 177 | #include "opt_lockdebug.h" |
178 | #include "opt_multiprocessor.h" | | 178 | #include "opt_multiprocessor.h" |
179 | #include "opt_xen.h" | | 179 | #include "opt_xen.h" |
180 | #if !defined(__x86_64__) | | 180 | #if !defined(__x86_64__) |
181 | #include "opt_kstack_dr0.h" | | 181 | #include "opt_kstack_dr0.h" |
182 | #endif /* !defined(__x86_64__) */ | | 182 | #endif /* !defined(__x86_64__) */ |
183 | | | 183 | |
184 | #include <sys/param.h> | | 184 | #include <sys/param.h> |
185 | #include <sys/systm.h> | | 185 | #include <sys/systm.h> |
186 | #include <sys/proc.h> | | 186 | #include <sys/proc.h> |
187 | #include <sys/pool.h> | | 187 | #include <sys/pool.h> |
| @@ -4205,27 +4205,27 @@ pmap_alloc_level(pd_entry_t * const *pde | | | @@ -4205,27 +4205,27 @@ pmap_alloc_level(pd_entry_t * const *pde |
4205 | xpq_queue_pte_update( | | 4205 | xpq_queue_pte_update( |
4206 | xpmap_ptetomach(cpu_pdep), pte); | | 4206 | xpmap_ptetomach(cpu_pdep), pte); |
4207 | } | | 4207 | } |
4208 | } | | 4208 | } |
4209 | #endif /* PAE || __x86_64__ */ | | 4209 | #endif /* PAE || __x86_64__ */ |
4210 | #else /* XEN */ | | 4210 | #else /* XEN */ |
4211 | pdep[i] = pte; | | 4211 | pdep[i] = pte; |
4212 | #endif /* XEN */ | | 4212 | #endif /* XEN */ |
4213 | KASSERT(level != PTP_LEVELS || nkptp[level - 1] + | | 4213 | KASSERT(level != PTP_LEVELS || nkptp[level - 1] + |
4214 | pl_i(VM_MIN_KERNEL_ADDRESS, level) == i); | | 4214 | pl_i(VM_MIN_KERNEL_ADDRESS, level) == i); |
4215 | nkptp[level - 1]++; | | 4215 | nkptp[level - 1]++; |
4216 | va += nbpd[level - 1]; | | 4216 | va += nbpd[level - 1]; |
4217 | } | | 4217 | } |
4218 | xpq_flush_queue(); | | 4218 | pmap_pte_flush(); |
4219 | } | | 4219 | } |
4220 | #ifdef XEN | | 4220 | #ifdef XEN |
4221 | splx(s); | | 4221 | splx(s); |
4222 | #endif | | 4222 | #endif |
4223 | } | | 4223 | } |
4224 | | | 4224 | |
4225 | /* | | 4225 | /* |
4226 | * pmap_growkernel: increase usage of KVM space | | 4226 | * pmap_growkernel: increase usage of KVM space |
4227 | * | | 4227 | * |
4228 | * => we allocate new PTPs for the kernel and install them in all | | 4228 | * => we allocate new PTPs for the kernel and install them in all |
4229 | * the pmaps on the system. | | 4229 | * the pmaps on the system. |
4230 | */ | | 4230 | */ |
4231 | | | 4231 | |