Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/ibm4xx pmap_testout(): Use pmap_{protect,re...



details:   https://anonhg.NetBSD.org/src/rev/1ddf7307f7e1
branches:  trunk
changeset: 1023379:1ddf7307f7e1
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Sep 05 12:05:05 2021 +0000

description:
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.

diffstat:

 sys/arch/powerpc/ibm4xx/pmap.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 2e96f7522cfc -r 1ddf7307f7e1 sys/arch/powerpc/ibm4xx/pmap.c
--- a/sys/arch/powerpc/ibm4xx/pmap.c    Sun Sep 05 11:43:22 2021 +0000
+++ b/sys/arch/powerpc/ibm4xx/pmap.c    Sun Sep 05 12:05:05 2021 +0000
@@ -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 @@
        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 @@
        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 @@
        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);



Home | Main Index | Thread Index | Old Index