Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 as there shouldn't be any mappings when p...
details: https://anonhg.NetBSD.org/src/rev/1ec63a0b62f0
branches: trunk
changeset: 554716:1ec63a0b62f0
user: yamt <yamt%NetBSD.org@localhost>
date: Sat Nov 01 09:07:11 2003 +0000
description:
as there shouldn't be any mappings when pmap_destroy() is called,
assert there is no remaining PTPs at that point.
diffstat:
sys/arch/i386/i386/pmap.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diffs (45 lines):
diff -r 32b39d4963f9 -r 1ec63a0b62f0 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Sat Nov 01 08:34:54 2003 +0000
+++ b/sys/arch/i386/i386/pmap.c Sat Nov 01 09:07:11 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.161 2003/10/27 14:11:47 junyoung Exp $ */
+/* $NetBSD: pmap.c,v 1.162 2003/11/01 09:07:11 yamt Exp $ */
/*
*
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.161 2003/10/27 14:11:47 junyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.162 2003/11/01 09:07:11 yamt Exp $");
#include "opt_cputype.h"
#include "opt_user_ldt.h"
@@ -1738,7 +1738,6 @@
pmap_destroy(pmap)
struct pmap *pmap;
{
- struct vm_page *pg;
int refs;
/*
@@ -1765,15 +1764,11 @@
simple_unlock(&pmaps_lock);
/*
- * free any remaining PTPs
+ * destroyed pmap shouldn't have remaining PTPs
*/
- while ((pg = TAILQ_FIRST(&pmap->pm_obj.memq)) != NULL) {
- KASSERT((pg->flags & PG_BUSY) == 0);
-
- pg->wire_count = 0;
- uvm_pagefree(pg);
- }
+ KASSERT(pmap->pm_obj.uo_npages == 0);
+ KASSERT(TAILQ_EMPTY(&pmap->pm_obj.memq));
/*
* MULTIPROCESSOR -- no need to flush out of other processors'
Home |
Main Index |
Thread Index |
Old Index