Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/include/arm32 Fix up L{1_S, 2_L, 2_S}_PROT for re...



details:   https://anonhg.NetBSD.org/src/rev/31b9a591a0d6
branches:  trunk
changeset: 825364:31b9a591a0d6
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Jul 11 20:42:17 2017 +0000

description:
Fix up L{1_S,2_L,2_S}_PROT for recent changes to the
L{1_S,2_L,2_S}_PROT_RO* values.

diffstat:

 sys/arch/arm/include/arm32/pmap.h |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r ebeddc22f75b -r 31b9a591a0d6 sys/arch/arm/include/arm32/pmap.h
--- a/sys/arch/arm/include/arm32/pmap.h Tue Jul 11 19:36:38 2017 +0000
+++ b/sys/arch/arm/include/arm32/pmap.h Tue Jul 11 20:42:17 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.150 2017/07/06 15:17:47 skrll Exp $ */
+/*     $NetBSD: pmap.h,v 1.151 2017/07/11 20:42:17 skrll Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -1043,13 +1043,16 @@
  * Note that the compiler will usually fold these at compile time.
  */
 #define        L1_S_PROT(ku, pr)       ((((ku) == PTE_USER) ? L1_S_PROT_U : 0) | \
-                                (((pr) & VM_PROT_WRITE) ? L1_S_PROT_W : L1_S_PROT_RO))
+       (((pr) & VM_PROT_WRITE) ? L1_S_PROT_W :                           \
+           (L1_S_PROT_W == L1_S_PROT_RO ? 0 : L1_S_PROT_RO)))
 
 #define        L2_L_PROT(ku, pr)       ((((ku) == PTE_USER) ? L2_L_PROT_U : 0) | \
-                                (((pr) & VM_PROT_WRITE) ? L2_L_PROT_W : L2_L_PROT_RO))
+       (((pr) & VM_PROT_WRITE) ? L2_L_PROT_W :                           \
+           (L2_L_PROT_W == L2_L_PROT_RO ? 0 : L2_L_PROT_RO)))
 
 #define        L2_S_PROT(ku, pr)       ((((ku) == PTE_USER) ? L2_S_PROT_U : 0) | \
-                                (((pr) & VM_PROT_WRITE) ? L2_S_PROT_W : L2_S_PROT_RO))
+       (((pr) & VM_PROT_WRITE) ? L2_S_PROT_W :                           \
+           (L2_S_PROT_W == L2_S_PROT_RO ? 0 : L2_S_PROT_RO)))
 
 /*
  * Macros to test if a mapping is mappable with an L1 SuperSection,



Home | Main Index | Thread Index | Old Index