aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-macros.S
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-01-06 17:33:19 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-01-06 17:33:19 -0500
commit28cdac6690cb113856293bf79b40de33dbd8f974 (patch)
tree64cd8ca8376ccf9a12faee3588c15a5839f9a28b /arch/arm/mm/proc-macros.S
parent4073723acb9cdcdbe4df9c0e0c376c65d1697e43 (diff)
parent36bb94ba36f332de767cfaa3af6a5136435a3a9c (diff)
Merge branch 'pgt' (early part) into devel
Diffstat (limited to 'arch/arm/mm/proc-macros.S')
-rw-r--r--arch/arm/mm/proc-macros.S30
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S
index f8f777df8d72..e32fa499194c 100644
--- a/arch/arm/mm/proc-macros.S
+++ b/arch/arm/mm/proc-macros.S
@@ -91,7 +91,7 @@
91#if L_PTE_SHARED != PTE_EXT_SHARED 91#if L_PTE_SHARED != PTE_EXT_SHARED
92#error PTE shared bit mismatch 92#error PTE shared bit mismatch
93#endif 93#endif
94#if (L_PTE_EXEC+L_PTE_USER+L_PTE_WRITE+L_PTE_DIRTY+L_PTE_YOUNG+\ 94#if (L_PTE_XN+L_PTE_USER+L_PTE_RDONLY+L_PTE_DIRTY+L_PTE_YOUNG+\
95 L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED 95 L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED
96#error Invalid Linux PTE bit settings 96#error Invalid Linux PTE bit settings
97#endif 97#endif
@@ -135,7 +135,7 @@
135 .endm 135 .endm
136 136
137 .macro armv6_set_pte_ext pfx 137 .macro armv6_set_pte_ext pfx
138 str r1, [r0], #-2048 @ linux version 138 str r1, [r0], #2048 @ linux version
139 139
140 bic r3, r1, #0x000003fc 140 bic r3, r1, #0x000003fc
141 bic r3, r3, #PTE_TYPE_MASK 141 bic r3, r3, #PTE_TYPE_MASK
@@ -146,9 +146,9 @@
146 and r2, r1, #L_PTE_MT_MASK 146 and r2, r1, #L_PTE_MT_MASK
147 ldr r2, [ip, r2] 147 ldr r2, [ip, r2]
148 148
149 tst r1, #L_PTE_WRITE 149 eor r1, r1, #L_PTE_DIRTY
150 tstne r1, #L_PTE_DIRTY 150 tst r1, #L_PTE_DIRTY|L_PTE_RDONLY
151 orreq r3, r3, #PTE_EXT_APX 151 orrne r3, r3, #PTE_EXT_APX
152 152
153 tst r1, #L_PTE_USER 153 tst r1, #L_PTE_USER
154 orrne r3, r3, #PTE_EXT_AP1 154 orrne r3, r3, #PTE_EXT_AP1
@@ -158,8 +158,8 @@
158 bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 158 bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0
159#endif 159#endif
160 160
161 tst r1, #L_PTE_EXEC 161 tst r1, #L_PTE_XN
162 orreq r3, r3, #PTE_EXT_XN 162 orrne r3, r3, #PTE_EXT_XN
163 163
164 orr r3, r3, r2 164 orr r3, r3, r2
165 165
@@ -187,9 +187,9 @@
187 * 1111 0xff r/w r/w 187 * 1111 0xff r/w r/w
188 */ 188 */
189 .macro armv3_set_pte_ext wc_disable=1 189 .macro armv3_set_pte_ext wc_disable=1
190 str r1, [r0], #-2048 @ linux version 190 str r1, [r0], #2048 @ linux version
191 191
192 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY 192 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY
193 193
194 bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits 194 bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits
195 bic r2, r2, #PTE_TYPE_MASK 195 bic r2, r2, #PTE_TYPE_MASK
@@ -198,7 +198,7 @@
198 tst r3, #L_PTE_USER @ user? 198 tst r3, #L_PTE_USER @ user?
199 orrne r2, r2, #PTE_SMALL_AP_URO_SRW 199 orrne r2, r2, #PTE_SMALL_AP_URO_SRW
200 200
201 tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ write and dirty? 201 tst r3, #L_PTE_RDONLY | L_PTE_DIRTY @ write and dirty?
202 orreq r2, r2, #PTE_SMALL_AP_UNO_SRW 202 orreq r2, r2, #PTE_SMALL_AP_UNO_SRW
203 203
204 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? 204 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young?
@@ -210,7 +210,7 @@
210 bicne r2, r2, #PTE_BUFFERABLE 210 bicne r2, r2, #PTE_BUFFERABLE
211#endif 211#endif
212 .endif 212 .endif
213 str r2, [r0] @ hardware version 213 str r2, [r0] @ hardware version
214 .endm 214 .endm
215 215
216 216
@@ -230,9 +230,9 @@
230 * 1111 11 r/w r/w 230 * 1111 11 r/w r/w
231 */ 231 */
232 .macro xscale_set_pte_ext_prologue 232 .macro xscale_set_pte_ext_prologue
233 str r1, [r0], #-2048 @ linux version 233 str r1, [r0] @ linux version
234 234
235 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY 235 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY
236 236
237 bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits 237 bic r2, r1, #PTE_SMALL_AP_MASK @ keep C, B bits
238 orr r2, r2, #PTE_TYPE_EXT @ extended page 238 orr r2, r2, #PTE_TYPE_EXT @ extended page
@@ -240,7 +240,7 @@
240 tst r3, #L_PTE_USER @ user? 240 tst r3, #L_PTE_USER @ user?
241 orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w 241 orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w
242 242
243 tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ write and dirty? 243 tst r3, #L_PTE_RDONLY | L_PTE_DIRTY @ write and dirty?
244 orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w 244 orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w
245 @ combined with user -> user r/w 245 @ combined with user -> user r/w
246 .endm 246 .endm
@@ -249,7 +249,7 @@
249 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? 249 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young?
250 movne r2, #0 @ no -> fault 250 movne r2, #0 @ no -> fault
251 251
252 str r2, [r0] @ hardware version 252 str r2, [r0, #2048]! @ hardware version
253 mov ip, #0 253 mov ip, #0
254 mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line 254 mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
255 mcr p15, 0, ip, c7, c10, 4 @ data write barrier 255 mcr p15, 0, ip, c7, c10, 4 @ data write barrier