diff --git a/sys/arch/hp300/hp300/pmap.c b/sys/arch/hp300/hp300/pmap.c index 98eac962db77..c9d5b217bdb3 100644 --- a/sys/arch/hp300/hp300/pmap.c +++ b/sys/arch/hp300/hp300/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.79 1999/09/12 01:17:04 chs Exp $ */ +/* $NetBSD: pmap.c,v 1.80 1999/09/16 14:52:06 chs Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -1898,7 +1898,7 @@ pmap_clear_modify(pg) * Clear the reference bit on the specified physical page. */ boolean_t -pmap_clear_reference(pa) +pmap_clear_reference(pg) struct vm_page *pg; { paddr_t pa = VM_PAGE_TO_PHYS(pg); @@ -1918,7 +1918,7 @@ pmap_clear_reference(pa) * by any physical maps. */ boolean_t -pmap_is_referenced(pa) +pmap_is_referenced(pg) struct vm_page *pg; { paddr_t pa = VM_PAGE_TO_PHYS(pg); @@ -1940,7 +1940,7 @@ pmap_is_referenced(pa) * by any physical maps. */ boolean_t -pmap_is_modified(pa) +pmap_is_modified(pg) struct vm_page *pg; { paddr_t pa = VM_PAGE_TO_PHYS(pg); diff --git a/sys/arch/next68k/next68k/pmap.c b/sys/arch/next68k/next68k/pmap.c index fa5705e48af8..63a6912573a0 100644 --- a/sys/arch/next68k/next68k/pmap.c +++ b/sys/arch/next68k/next68k/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.18 1999/07/08 18:08:56 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.19 1999/09/16 14:52:07 chs Exp $ */ /* * This file was taken from mvme68k/mvme68k/pmap.c @@ -747,22 +747,15 @@ pmap_map(va, spa, epa, prot) * is bounded by that size. */ pmap_t -pmap_create(size) - vsize_t size; +pmap_create() { pmap_t pmap; #ifdef DEBUG if (pmapdebug & (PDB_FOLLOW|PDB_CREATE)) - printf("pmap_create(%lx)\n", size); + printf("pmap_create\n"); #endif - /* - * Software use map does not need a pmap - */ - if (size) - return (NULL); - /* XXX: is it ok to wait here? */ pmap = (pmap_t) malloc(sizeof *pmap, M_VMPMAP, M_WAITOK); #ifdef notifwewait @@ -1035,10 +1028,11 @@ pmap_remove(pmap, sva, eva) * Lower the permission for all mappings to a given page. */ void -pmap_page_protect(pa, prot) - paddr_t pa; +pmap_page_protect(pg, prot) + struct vm_page *pg; vm_prot_t prot; { + paddr_t pa = VM_PAGE_TO_PHYS(pg); struct pv_entry *pv; int s; @@ -1894,15 +1888,20 @@ pmap_copy_page(src, dst) * Clear the modify bits on the specified physical page. */ -void -pmap_clear_modify(pa) - paddr_t pa; +boolean_t +pmap_clear_modify(pg) + struct vm_page *pg; { + paddr_t pa = VM_PAGE_TO_PHYS(pg); + boolean_t rv; + #ifdef DEBUG if (pmapdebug & PDB_FOLLOW) printf("pmap_clear_modify(%lx)\n", pa); #endif + rv = pmap_testbit(pa, PG_M); pmap_changebit(pa, PG_M, FALSE); + return rv; } /* @@ -1911,14 +1910,20 @@ pmap_clear_modify(pa) * Clear the reference bit on the specified physical page. */ -void pmap_clear_reference(pa) - paddr_t pa; +boolean_t +pmap_clear_reference(pg) + struct vm_page *pg; { + paddr_t pa = VM_PAGE_TO_PHYS(pg); + boolean_t rv; + #ifdef DEBUG if (pmapdebug & PDB_FOLLOW) printf("pmap_clear_reference(%lx)\n", pa); #endif + rv = pmap_testbit(pa, PG_U); pmap_changebit(pa, PG_U, FALSE); + return rv; } /* @@ -1929,9 +1934,11 @@ void pmap_clear_reference(pa) */ boolean_t -pmap_is_referenced(pa) - paddr_t pa; +pmap_is_referenced(pg) + struct vm_page *pg; { + paddr_t pa = VM_PAGE_TO_PHYS(pg); + #ifdef DEBUG if (pmapdebug & PDB_FOLLOW) { boolean_t rv = pmap_testbit(pa, PG_U); @@ -1950,9 +1957,11 @@ pmap_is_referenced(pa) */ boolean_t -pmap_is_modified(pa) - paddr_t pa; +pmap_is_modified(pg) + struct vm_page *pg; { + paddr_t pa = VM_PAGE_TO_PHYS(pg); + #ifdef DEBUG if (pmapdebug & PDB_FOLLOW) { boolean_t rv = pmap_testbit(pa, PG_M);