diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-07-28 23:46:11 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-07-28 23:46:11 +0000 |
commit | 6a582a198d0dab12b717f6bb38cff2ea752922da (patch) | |
tree | 7a93100ae5a8bfa46a91cc4d7f0a3bb82b9fb17c /sys/arch | |
parent | 57ecfd692c2ea481e5992beb34158dc94d0b4cbf (diff) |
do multipage pmap_pageable
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/pmap.c | 10 | ||||
-rw-r--r-- | sys/arch/i386/i386/pmap.old.c | 10 |
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; |