| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pmap.c,v 1.216 2010/11/02 06:33:22 uebayasi Exp $ */ | | 1 | /* $NetBSD: pmap.c,v 1.217 2010/11/03 16:59:19 uebayasi 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 |
| @@ -201,27 +201,27 @@ | | | @@ -201,27 +201,27 @@ |
201 | #include <sys/pool.h> | | 201 | #include <sys/pool.h> |
202 | #include <sys/cdefs.h> | | 202 | #include <sys/cdefs.h> |
203 | #include <sys/cpu.h> | | 203 | #include <sys/cpu.h> |
204 | #include <sys/sysctl.h> | | 204 | #include <sys/sysctl.h> |
205 | | | 205 | |
206 | #include <uvm/uvm.h> | | 206 | #include <uvm/uvm.h> |
207 | | | 207 | |
208 | #include <machine/bus.h> | | 208 | #include <machine/bus.h> |
209 | #include <machine/pmap.h> | | 209 | #include <machine/pmap.h> |
210 | #include <machine/pcb.h> | | 210 | #include <machine/pcb.h> |
211 | #include <machine/param.h> | | 211 | #include <machine/param.h> |
212 | #include <arm/arm32/katelib.h> | | 212 | #include <arm/arm32/katelib.h> |
213 | | | 213 | |
214 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.216 2010/11/02 06:33:22 uebayasi Exp $"); | | 214 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.217 2010/11/03 16:59:19 uebayasi Exp $"); |
215 | | | 215 | |
216 | #define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) | | 216 | #define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) |
217 | | | 217 | |
218 | #ifdef PMAP_DEBUG | | 218 | #ifdef PMAP_DEBUG |
219 | | | 219 | |
220 | /* XXX need to get rid of all refs to this */ | | 220 | /* XXX need to get rid of all refs to this */ |
221 | int pmap_debug_level = 0; | | 221 | int pmap_debug_level = 0; |
222 | | | 222 | |
223 | /* | | 223 | /* |
224 | * for switching to potentially finer grained debugging | | 224 | * for switching to potentially finer grained debugging |
225 | */ | | 225 | */ |
226 | #define PDB_FOLLOW 0x0001 | | 226 | #define PDB_FOLLOW 0x0001 |
227 | #define PDB_INIT 0x0002 | | 227 | #define PDB_INIT 0x0002 |
| @@ -2567,27 +2567,27 @@ pmap_flush_page(struct vm_page_md *md, p | | | @@ -2567,27 +2567,27 @@ pmap_flush_page(struct vm_page_md *md, p |
2567 | * Reflects back modify bits to the pager. | | 2567 | * Reflects back modify bits to the pager. |
2568 | */ | | 2568 | */ |
2569 | static void | | 2569 | static void |
2570 | pmap_page_remove(struct vm_page_md *md, paddr_t pa) | | 2570 | pmap_page_remove(struct vm_page_md *md, paddr_t pa) |
2571 | { | | 2571 | { |
2572 | struct l2_bucket *l2b; | | 2572 | struct l2_bucket *l2b; |
2573 | struct pv_entry *pv, *npv, **pvp; | | 2573 | struct pv_entry *pv, *npv, **pvp; |
2574 | pmap_t pm; | | 2574 | pmap_t pm; |
2575 | pt_entry_t *ptep; | | 2575 | pt_entry_t *ptep; |
2576 | bool flush; | | 2576 | bool flush; |
2577 | u_int flags; | | 2577 | u_int flags; |
2578 | | | 2578 | |
2579 | NPDEBUG(PDB_FOLLOW, | | 2579 | NPDEBUG(PDB_FOLLOW, |
2580 | printf("pmap_page_remove: pg %p (0x%08lx)\n", pg, | | 2580 | printf("pmap_page_remove: md %p (0x%08lx)\n", md, |
2581 | pa)); | | 2581 | pa)); |
2582 | | | 2582 | |
2583 | PMAP_HEAD_TO_MAP_LOCK(); | | 2583 | PMAP_HEAD_TO_MAP_LOCK(); |
2584 | simple_lock(&md->pvh_slock); | | 2584 | simple_lock(&md->pvh_slock); |
2585 | | | 2585 | |
2586 | pv = SLIST_FIRST(&md->pvh_list); | | 2586 | pv = SLIST_FIRST(&md->pvh_list); |
2587 | if (pv == NULL) { | | 2587 | if (pv == NULL) { |
2588 | #ifdef PMAP_CACHE_VIPT | | 2588 | #ifdef PMAP_CACHE_VIPT |
2589 | /* | | 2589 | /* |
2590 | * We *know* the page contents are about to be replaced. | | 2590 | * We *know* the page contents are about to be replaced. |
2591 | * Discard the exec contents | | 2591 | * Discard the exec contents |
2592 | */ | | 2592 | */ |
2593 | if (PV_IS_EXEC_P(md->pvh_attrs)) | | 2593 | if (PV_IS_EXEC_P(md->pvh_attrs)) |