| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pmap.c,v 1.186 2008/08/14 14:54:32 matt Exp $ */ | | 1 | /* $NetBSD: pmap.c,v 1.187 2008/09/28 21:27:11 skrll Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright 2003 Wasabi Systems, Inc. | | 4 | * Copyright 2003 Wasabi Systems, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Written by Steve C. Woodford for Wasabi Systems, Inc. | | 7 | * Written by Steve C. Woodford for Wasabi Systems, Inc. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -202,27 +202,27 @@ | | | @@ -202,27 +202,27 @@ |
202 | #include <sys/pool.h> | | 202 | #include <sys/pool.h> |
203 | #include <sys/cdefs.h> | | 203 | #include <sys/cdefs.h> |
204 | #include <sys/cpu.h> | | 204 | #include <sys/cpu.h> |
205 | #include <sys/sysctl.h> | | 205 | #include <sys/sysctl.h> |
206 | | | 206 | |
207 | #include <uvm/uvm.h> | | 207 | #include <uvm/uvm.h> |
208 | | | 208 | |
209 | #include <machine/bus.h> | | 209 | #include <machine/bus.h> |
210 | #include <machine/pmap.h> | | 210 | #include <machine/pmap.h> |
211 | #include <machine/pcb.h> | | 211 | #include <machine/pcb.h> |
212 | #include <machine/param.h> | | 212 | #include <machine/param.h> |
213 | #include <arm/arm32/katelib.h> | | 213 | #include <arm/arm32/katelib.h> |
214 | | | 214 | |
215 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.186 2008/08/14 14:54:32 matt Exp $"); | | 215 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.187 2008/09/28 21:27:11 skrll Exp $"); |
216 | | | 216 | |
217 | #ifdef PMAP_DEBUG | | 217 | #ifdef PMAP_DEBUG |
218 | | | 218 | |
219 | /* XXX need to get rid of all refs to this */ | | 219 | /* XXX need to get rid of all refs to this */ |
220 | int pmap_debug_level = 0; | | 220 | int pmap_debug_level = 0; |
221 | | | 221 | |
222 | /* | | 222 | /* |
223 | * for switching to potentially finer grained debugging | | 223 | * for switching to potentially finer grained debugging |
224 | */ | | 224 | */ |
225 | #define PDB_FOLLOW 0x0001 | | 225 | #define PDB_FOLLOW 0x0001 |
226 | #define PDB_INIT 0x0002 | | 226 | #define PDB_INIT 0x0002 |
227 | #define PDB_ENTER 0x0004 | | 227 | #define PDB_ENTER 0x0004 |
228 | #define PDB_REMOVE 0x0008 | | 228 | #define PDB_REMOVE 0x0008 |
| @@ -2277,27 +2277,27 @@ pmap_clearbit(struct vm_page *pg, u_int | | | @@ -2277,27 +2277,27 @@ pmap_clearbit(struct vm_page *pg, u_int |
2277 | printf("pmap_clearbit: pm %p va 0x%lx opte 0x%08x npte 0x%08x\n", | | 2277 | printf("pmap_clearbit: pm %p va 0x%lx opte 0x%08x npte 0x%08x\n", |
2278 | pm, va, opte, npte)); | | 2278 | pm, va, opte, npte)); |
2279 | } | | 2279 | } |
2280 | | | 2280 | |
2281 | #ifdef PMAP_CACHE_VIPT | | 2281 | #ifdef PMAP_CACHE_VIPT |
2282 | /* | | 2282 | /* |
2283 | * If we need to sync the I-cache and we haven't done it yet, do it. | | 2283 | * If we need to sync the I-cache and we haven't done it yet, do it. |
2284 | */ | | 2284 | */ |
2285 | if (need_syncicache && !did_syncicache) { | | 2285 | if (need_syncicache && !did_syncicache) { |
2286 | pmap_syncicache_page(pg); | | 2286 | pmap_syncicache_page(pg); |
2287 | PMAPCOUNT(exec_synced_clearbit); | | 2287 | PMAPCOUNT(exec_synced_clearbit); |
2288 | } | | 2288 | } |
2289 | /* | | 2289 | /* |
2290 | * If we are changing this to read-only, we ned to call vac_me_harder | | 2290 | * If we are changing this to read-only, we need to call vac_me_harder |
2291 | * so we can change all the read-only pages to cacheable. We pretend | | 2291 | * so we can change all the read-only pages to cacheable. We pretend |
2292 | * this as a page deletion. | | 2292 | * this as a page deletion. |
2293 | */ | | 2293 | */ |
2294 | if (need_vac_me_harder) { | | 2294 | if (need_vac_me_harder) { |
2295 | if (pg->mdpage.pvh_attrs & PVF_NC) | | 2295 | if (pg->mdpage.pvh_attrs & PVF_NC) |
2296 | pmap_vac_me_harder(pg, NULL, 0); | | 2296 | pmap_vac_me_harder(pg, NULL, 0); |
2297 | } | | 2297 | } |
2298 | #endif | | 2298 | #endif |
2299 | | | 2299 | |
2300 | simple_unlock(&pg->mdpage.pvh_slock); | | 2300 | simple_unlock(&pg->mdpage.pvh_slock); |
2301 | PMAP_HEAD_TO_MAP_UNLOCK(); | | 2301 | PMAP_HEAD_TO_MAP_UNLOCK(); |
2302 | } | | 2302 | } |
2303 | | | 2303 | |