Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/sun3/sun3/pmap.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/sun3/sun3/pmap.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.111.4.2 retrieving revision 1.112 diff -u -p -r1.111.4.2 -r1.112 --- src/sys/arch/sun3/sun3/pmap.c 1999/08/02 21:45:21 1.111.4.2 +++ src/sys/arch/sun3/sun3/pmap.c 1999/06/17 18:21:36 1.112 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.111.4.2 1999/08/02 21:45:21 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.112 1999/06/17 18:21:36 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -2329,7 +2329,7 @@ pmap_enter_user(pmap, pgva, new_pte, wir #ifdef PMAP_DEBUG /* * Some user pages are wired here, and a later - * call to pmap_unwire() will unwire them. + * call to pmap_change_wiring() will unwire them. * XXX - Need a separate list for wired user pmegs * so they can not be stolen from the active list. * XXX - Note: vm_fault.c assumes pmap_extract will @@ -2788,16 +2788,17 @@ pmap_deactivate(p) } /* - * Routine: pmap_unwire - * Function: Clear the wired attribute for a map/virtual-address + * Routine: pmap_change_wiring + * Function: Change the wiring attribute for a map/virtual-address * pair. * In/out conditions: * The mapping must already exist in the pmap. */ void -pmap_unwire(pmap, va) +pmap_change_wiring(pmap, va, wired) pmap_t pmap; vm_offset_t va; + boolean_t wired; { int s, sme; int wiremask, ptenum; @@ -2807,8 +2808,8 @@ pmap_unwire(pmap, va) return; #ifdef PMAP_DEBUG if (pmap_debug & PMD_WIRING) - printf("pmap_unwire(pmap=%p, va=0x%lx)\n", - pmap, va); + printf("pmap_change_wiring(pmap=%p, va=0x%lx, wire=%d)\n", + pmap, va, wired); #endif /* * We are asked to unwire pages that were wired when @@ -2832,9 +2833,12 @@ pmap_unwire(pmap, va) sme = get_segmap(va); if (sme == SEGINV) - panic("pmap_unwire: invalid va=0x%lx", va); + panic("pmap_change_wiring: invalid va=0x%lx", va); pmegp = pmeg_p(sme); - pmegp->pmeg_wired &= ~wiremask; + if (wired) + pmegp->pmeg_wired |= wiremask; + else + pmegp->pmeg_wired &= ~wiremask; splx(s); } @@ -2863,14 +2867,13 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, * with the given map/virtual_address pair. * Returns zero if VA not valid. */ -boolean_t -pmap_extract(pmap, va, pap) +vm_offset_t +pmap_extract(pmap, va) pmap_t pmap; vm_offset_t va; - paddr_t *pap; { int s, sme, segnum, ptenum, pte; - paddr_t pa; + vm_offset_t pa; pte = 0; s = splpmap(); @@ -2896,7 +2899,7 @@ pmap_extract(pmap, va, pap) db_printf("pmap_extract: invalid va=0x%lx\n", va); Debugger(); #endif - return (FALSE); + pte = 0; } pa = PG_PA(pte); #ifdef DIAGNOSTIC @@ -2904,9 +2907,7 @@ pmap_extract(pmap, va, pap) panic("pmap_extract: not main mem, va=0x%lx\n", va); } #endif - if (pap != NULL) - *pap = pa; - return (TRUE); + return (pa); }