Module Name: src
Committed By: skrll
Date: Tue Jul 11 20:42:17 UTC 2017
Modified Files:
src/sys/arch/arm/include/arm32: pmap.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/arch/arm/include/arm32/pmap.h
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/arm/include/arm32/pmap.h
diff -u src/sys/arch/arm/include/arm32/pmap.h:1.150 src/sys/arch/arm/include/arm32/pmap.h:1.151
--- src/sys/arch/arm/include/arm32/pmap.h:1.150 Thu Jul 6 15:17:47 2017
+++ src/sys/arch/arm/include/arm32/pmap.h Tue Jul 11 20:42:17 2017
@@ -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 @@ extern void (*pmap_zero_page_func)(paddr
* 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,