summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>1997-07-28 23:46:10 +0000
committermickey <mickey@openbsd.org>1997-07-28 23:46:10 +0000
commit4b68685260eb0c37fd08a3a08dc4a7ccef4b4914 (patch)
tree9c4536c365997daf9bb6684edd41124bbf0791e4
parentadopt for assym.h (diff)
downloadwireguard-openbsd-4b68685260eb0c37fd08a3a08dc4a7ccef4b4914.tar.xz
wireguard-openbsd-4b68685260eb0c37fd08a3a08dc4a7ccef4b4914.zip
do multipage pmap_pageable
-rw-r--r--sys/arch/i386/i386/pmap.c10
-rw-r--r--sys/arch/i386/i386/pmap.old.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 3e7d0d0db44..0192a847f51 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.16 1997/01/07 05:37:32 tholo Exp $ */
+/* $OpenBSD: pmap.c,v 1.17 1997/07/28 23:46:10 mickey Exp $ */
/* $NetBSD: pmap.c,v 1.36 1996/05/03 19:42:22 christos Exp $ */
/*
@@ -1555,11 +1555,13 @@ pmap_pageable(pmap, sva, eva, pageable)
* If we are making a PT page pageable then all valid
* mappings must be gone from that page. Hence it should
* be all zeros and there is no need to clean it.
- * Assumptions:
- * - we are called with only one page at a time
+ * Assumption:
* - PT pages have only one pv_table entry
*/
- if (pmap == pmap_kernel() && pageable && sva + NBPG == eva) {
+ if (pmap != pmap_kernel() || !pageable)
+ return;
+
+ for ( ; sva < eva; sva += NBPG) {
register vm_offset_t pa;
register pt_entry_t *pte;
diff --git a/sys/arch/i386/i386/pmap.old.c b/sys/arch/i386/i386/pmap.old.c
index 0aa7a5d478f..6ba2811f3dd 100644
--- a/sys/arch/i386/i386/pmap.old.c
+++ b/sys/arch/i386/i386/pmap.old.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.old.c,v 1.16 1997/01/07 05:37:32 tholo Exp $ */
+/* $OpenBSD: pmap.old.c,v 1.17 1997/07/28 23:46:10 mickey Exp $ */
/* $NetBSD: pmap.c,v 1.36 1996/05/03 19:42:22 christos Exp $ */
/*
@@ -1555,11 +1555,13 @@ pmap_pageable(pmap, sva, eva, pageable)
* If we are making a PT page pageable then all valid
* mappings must be gone from that page. Hence it should
* be all zeros and there is no need to clean it.
- * Assumptions:
- * - we are called with only one page at a time
+ * Assumption:
* - PT pages have only one pv_table entry
*/
- if (pmap == pmap_kernel() && pageable && sva + NBPG == eva) {
+ if (pmap != pmap_kernel() || !pageable)
+ return;
+
+ for ( ; sva < eva; sva += NBPG) {
register vm_offset_t pa;
register pt_entry_t *pte;