Module Name: src Committed By: rin Date: Sun Sep 5 12:05:05 UTC 2021
Modified Files: src/sys/arch/powerpc/ibm4xx: pmap.c Log Message: pmap_testout(): Use pmap_{protect,remove}() for va to (va + PAGE_SIZE), instead of (va + 1). No functional changes for the current implementation. Also, this affects only when the function is manually called from DDB on DEBUG kernel. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/arch/powerpc/ibm4xx/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/ibm4xx/pmap.c diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.100 src/sys/arch/powerpc/ibm4xx/pmap.c:1.101 --- src/sys/arch/powerpc/ibm4xx/pmap.c:1.100 Sun Sep 5 09:57:43 2021 +++ src/sys/arch/powerpc/ibm4xx/pmap.c Sun Sep 5 12:05:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.100 2021/09/05 09:57:43 rin Exp $ */ +/* $NetBSD: pmap.c,v 1.101 2021/09/05 12:05:05 rin Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.100 2021/09/05 09:57:43 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.101 2021/09/05 12:05:05 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1732,7 +1732,7 @@ pmap_testout(void) printf("Modified page: ref %d, mod %d\n", ref, mod); /* Check pmap_protect() */ - pmap_protect(pmap_kernel(), va, va+1, VM_PROT_READ); + pmap_protect(pmap_kernel(), va, va + PAGE_SIZE, VM_PROT_READ); pmap_update(pmap_kernel()); ref = pmap_is_referenced(pg); mod = pmap_is_modified(pg); @@ -1769,7 +1769,7 @@ pmap_testout(void) printf("Modified page: ref %d, mod %d\n", ref, mod); /* Check pmap_protect() */ - pmap_protect(pmap_kernel(), va, va+1, VM_PROT_NONE); + pmap_protect(pmap_kernel(), va, va + PAGE_SIZE, VM_PROT_NONE); pmap_update(pmap_kernel()); ref = pmap_is_referenced(pg); mod = pmap_is_modified(pg); @@ -1879,7 +1879,7 @@ pmap_testout(void) printf("Modified page: ref %d, mod %d\n", ref, mod); /* Unmap page */ - pmap_remove(pmap_kernel(), va, va+1); + pmap_remove(pmap_kernel(), va, va + PAGE_SIZE); pmap_update(pmap_kernel()); ref = pmap_is_referenced(pg); mod = pmap_is_modified(pg);