diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-16 03:40:36 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-22 06:05:35 -0500 |
commit | 36bb94ba36f332de767cfaa3af6a5136435a3a9c (patch) | |
tree | 45d1bd890b58658f4db58a033e619e511e3368f4 /arch/arm/mm/proc-macros.S | |
parent | 9522d7e4cb5e0858122fc55d33a2c07728f0b10d (diff) |
ARM: pgtable: provide RDONLY page table bit rather than WRITE bit
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/proc-macros.S')
-rw-r--r-- | arch/arm/mm/proc-macros.S | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 4a7a9e142e85..f5ca6aaecdbd 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -81,7 +81,7 @@ | |||
81 | #if L_PTE_SHARED != PTE_EXT_SHARED | 81 | #if L_PTE_SHARED != PTE_EXT_SHARED |
82 | #error PTE shared bit mismatch | 82 | #error PTE shared bit mismatch |
83 | #endif | 83 | #endif |
84 | #if (L_PTE_XN+L_PTE_USER+L_PTE_WRITE+L_PTE_DIRTY+L_PTE_YOUNG+\ | 84 | #if (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\ |
85 | L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED | 85 | L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED |
86 | #error Invalid Linux PTE bit settings | 86 | #error Invalid Linux PTE bit settings |
87 | #endif | 87 | #endif |
@@ -132,9 +132,9 @@ | |||
132 | and r2, r1, #L_PTE_MT_MASK | 132 | and r2, r1, #L_PTE_MT_MASK |
133 | ldr r2, [ip, r2] | 133 | ldr r2, [ip, r2] |
134 | 134 | ||
135 | tst r1, #L_PTE_WRITE | 135 | eor r1, r1, #L_PTE_DIRTY |
136 | tstne r1, #L_PTE_DIRTY | 136 | tst r1, #L_PTE_DIRTY|L_PTE_RDONLY |
137 | orreq r3, r3, #PTE_EXT_APX | 137 | orrne r3, r3, #PTE_EXT_APX |
138 | 138 | ||
139 | tst r1, #L_PTE_USER | 139 | tst r1, #L_PTE_USER |
140 | orrne r3, r3, #PTE_EXT_AP1 | 140 | orrne r3, r3, #PTE_EXT_AP1 |
@@ -172,7 +172,7 @@ | |||
172 | .macro armv3_set_pte_ext wc_disable=1 | 172 | .macro armv3_set_pte_ext wc_disable=1 |
173 | str r1, [r0], #2048 @ linux version | 173 | str r1, [r0], #2048 @ linux version |
174 | 174 | ||
175 | eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY | 175 | eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
176 | 176 | ||
177 | bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits | 177 | bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits |
178 | bic r2, r2, #PTE_TYPE_MASK | 178 | bic r2, r2, #PTE_TYPE_MASK |
@@ -181,7 +181,7 @@ | |||
181 | tst r3, #L_PTE_USER @ user? | 181 | tst r3, #L_PTE_USER @ user? |
182 | orrne r2, r2, #PTE_SMALL_AP_URO_SRW | 182 | orrne r2, r2, #PTE_SMALL_AP_URO_SRW |
183 | 183 | ||
184 | tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ write and dirty? | 184 | tst r3, #L_PTE_RDONLY | L_PTE_DIRTY @ write and dirty? |
185 | orreq r2, r2, #PTE_SMALL_AP_UNO_SRW | 185 | orreq r2, r2, #PTE_SMALL_AP_UNO_SRW |
186 | 186 | ||
187 | tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? | 187 | tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? |
@@ -215,7 +215,7 @@ | |||
215 | .macro xscale_set_pte_ext_prologue | 215 | .macro xscale_set_pte_ext_prologue |
216 | str r1, [r0] @ linux version | 216 | str r1, [r0] @ linux version |
217 | 217 | ||
218 | eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY | 218 | eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
219 | 219 | ||
220 | bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits | 220 | bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits |
221 | orr r2, r2, #PTE_TYPE_EXT @ extended page | 221 | orr r2, r2, #PTE_TYPE_EXT @ extended page |
@@ -223,7 +223,7 @@ | |||
223 | tst r3, #L_PTE_USER @ user? | 223 | tst r3, #L_PTE_USER @ user? |
224 | orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w | 224 | orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w |
225 | 225 | ||
226 | tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ write and dirty? | 226 | tst r3, #L_PTE_RDONLY | L_PTE_DIRTY @ write and dirty? |
227 | orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w | 227 | orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w |
228 | @ combined with user -> user r/w | 228 | @ combined with user -> user r/w |
229 | .endm | 229 | .endm |