| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pmap.c,v 1.79 2020/06/24 08:27:47 ryo Exp $ */ | | 1 | /* $NetBSD: pmap.c,v 1.80 2020/06/27 00:46:37 rin Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org> | | 4 | * Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org> |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -17,27 +17,27 @@ | | | @@ -17,27 +17,27 @@ |
17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | | 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | | 19 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, |
20 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | | 20 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 22 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | | 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
24 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | | 24 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
25 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 25 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
26 | * POSSIBILITY OF SUCH DAMAGE. | | 26 | * POSSIBILITY OF SUCH DAMAGE. |
27 | */ | | 27 | */ |
28 | | | 28 | |
29 | #include <sys/cdefs.h> | | 29 | #include <sys/cdefs.h> |
30 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.79 2020/06/24 08:27:47 ryo Exp $"); | | 30 | __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.80 2020/06/27 00:46:37 rin Exp $"); |
31 | | | 31 | |
32 | #include "opt_arm_debug.h" | | 32 | #include "opt_arm_debug.h" |
33 | #include "opt_ddb.h" | | 33 | #include "opt_ddb.h" |
34 | #include "opt_multiprocessor.h" | | 34 | #include "opt_multiprocessor.h" |
35 | #include "opt_pmap.h" | | 35 | #include "opt_pmap.h" |
36 | #include "opt_uvmhist.h" | | 36 | #include "opt_uvmhist.h" |
37 | | | 37 | |
38 | #include <sys/param.h> | | 38 | #include <sys/param.h> |
39 | #include <sys/types.h> | | 39 | #include <sys/types.h> |
40 | #include <sys/kmem.h> | | 40 | #include <sys/kmem.h> |
41 | #include <sys/vmem.h> | | 41 | #include <sys/vmem.h> |
42 | #include <sys/atomic.h> | | 42 | #include <sys/atomic.h> |
43 | #include <sys/asan.h> | | 43 | #include <sys/asan.h> |
| @@ -121,27 +121,27 @@ PMAP_COUNTER(protect_unmanaged, "pmap_pr | | | @@ -121,27 +121,27 @@ PMAP_COUNTER(protect_unmanaged, "pmap_pr |
121 | PMAP_COUNTER(protect_pvmanaged, "pmap_protect pv-tracked unmanaged pages"); | | 121 | PMAP_COUNTER(protect_pvmanaged, "pmap_protect pv-tracked unmanaged pages"); |
122 | | | 122 | |
123 | PMAP_COUNTER(clear_modify, "pmap_clear_modify call"); | | 123 | PMAP_COUNTER(clear_modify, "pmap_clear_modify call"); |
124 | PMAP_COUNTER(clear_modify_pages, "pmap_clear_modify pages"); | | 124 | PMAP_COUNTER(clear_modify_pages, "pmap_clear_modify pages"); |
125 | PMAP_COUNTER(clear_reference, "pmap_clear_reference call"); | | 125 | PMAP_COUNTER(clear_reference, "pmap_clear_reference call"); |
126 | PMAP_COUNTER(clear_reference_pages, "pmap_clear_reference pages"); | | 126 | PMAP_COUNTER(clear_reference_pages, "pmap_clear_reference pages"); |
127 | | | 127 | |
128 | PMAP_COUNTER(fixup_referenced, "page reference emulations"); | | 128 | PMAP_COUNTER(fixup_referenced, "page reference emulations"); |
129 | PMAP_COUNTER(fixup_modified, "page modification emulations"); | | 129 | PMAP_COUNTER(fixup_modified, "page modification emulations"); |
130 | | | 130 | |
131 | PMAP_COUNTER(kern_mappings_bad, "kernel pages mapped (bad color)"); | | 131 | PMAP_COUNTER(kern_mappings_bad, "kernel pages mapped (bad color)"); |
132 | PMAP_COUNTER(kern_mappings_bad_wired, "kernel pages mapped (wired bad color)"); | | 132 | PMAP_COUNTER(kern_mappings_bad_wired, "kernel pages mapped (wired bad color)"); |
133 | PMAP_COUNTER(user_mappings_bad, "user pages mapped (bad color, not wired)"); | | 133 | PMAP_COUNTER(user_mappings_bad, "user pages mapped (bad color, not wired)"); |
134 | PMAP_COUNTER(user_mappings_bad_wired, "user pages mapped (bad colo, wiredr)"); | | 134 | PMAP_COUNTER(user_mappings_bad_wired, "user pages mapped (bad color, wired)"); |
135 | PMAP_COUNTER(kern_mappings, "kernel pages mapped"); | | 135 | PMAP_COUNTER(kern_mappings, "kernel pages mapped"); |
136 | PMAP_COUNTER(user_mappings, "user pages mapped"); | | 136 | PMAP_COUNTER(user_mappings, "user pages mapped"); |
137 | PMAP_COUNTER(user_mappings_changed, "user mapping changed"); | | 137 | PMAP_COUNTER(user_mappings_changed, "user mapping changed"); |
138 | PMAP_COUNTER(kern_mappings_changed, "kernel mapping changed"); | | 138 | PMAP_COUNTER(kern_mappings_changed, "kernel mapping changed"); |
139 | PMAP_COUNTER(uncached_mappings, "uncached pages mapped"); | | 139 | PMAP_COUNTER(uncached_mappings, "uncached pages mapped"); |
140 | PMAP_COUNTER(unmanaged_mappings, "unmanaged pages mapped"); | | 140 | PMAP_COUNTER(unmanaged_mappings, "unmanaged pages mapped"); |
141 | PMAP_COUNTER(pvmanaged_mappings, "pv-tracked unmanaged pages mapped"); | | 141 | PMAP_COUNTER(pvmanaged_mappings, "pv-tracked unmanaged pages mapped"); |
142 | PMAP_COUNTER(managed_mappings, "managed pages mapped"); | | 142 | PMAP_COUNTER(managed_mappings, "managed pages mapped"); |
143 | PMAP_COUNTER(mappings, "pages mapped (including remapped)"); | | 143 | PMAP_COUNTER(mappings, "pages mapped (including remapped)"); |
144 | PMAP_COUNTER(remappings, "pages remapped"); | | 144 | PMAP_COUNTER(remappings, "pages remapped"); |
145 | | | 145 | |
146 | PMAP_COUNTER(pv_entry_cannotalloc, "pv_entry allocation failure"); | | 146 | PMAP_COUNTER(pv_entry_cannotalloc, "pv_entry allocation failure"); |
147 | | | 147 | |