Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64/aarch64 Skip unnecessary PTE operations and...



details:   https://anonhg.NetBSD.org/src/rev/ad0098030ad8
branches:  trunk
changeset: 359915:ad0098030ad8
user:      ryo <ryo%NetBSD.org@localhost>
date:      Mon Jan 31 08:43:05 2022 +0000

description:
Skip unnecessary PTE operations and TLB invalidation.

diffstat:

 sys/arch/aarch64/aarch64/pmap.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r fc7103048727 -r ad0098030ad8 sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c   Mon Jan 31 06:54:50 2022 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c   Mon Jan 31 08:43:05 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.125 2022/01/16 10:50:02 rillig Exp $        */
+/*     $NetBSD: pmap.c,v 1.126 2022/01/31 08:43:05 ryo Exp $   */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.125 2022/01/16 10:50:02 rillig Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.126 2022/01/31 08:43:05 ryo Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -2515,6 +2515,8 @@
  tryagain:
                if (!l3pte_valid(pte))
                        continue;
+               if ((pte & LX_BLKPAG_AP) == LX_BLKPAG_AP_RO)
+                       continue;
 
                /* clear write permission */
                pte &= ~LX_BLKPAG_AP;
@@ -2576,6 +2578,8 @@
  tryagain:
                if (!l3pte_valid(pte))
                        continue;
+               if ((pte & LX_BLKPAG_AF) == 0)
+                       continue;
 
                /* clear access permission */
                pte &= ~LX_BLKPAG_AF;



Home | Main Index | Thread Index | Old Index