aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-xsc3.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/proc-xsc3.S')
-rw-r--r--arch/arm/mm/proc-xsc3.S30
1 files changed, 6 insertions, 24 deletions
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index 7bd9e7197f60..ad1ce5a89221 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -349,34 +349,16 @@ ENTRY(cpu_xsc3_switch_mm)
349 */ 349 */
350 .align 5 350 .align 5
351ENTRY(cpu_xsc3_set_pte_ext) 351ENTRY(cpu_xsc3_set_pte_ext)
352 str r1, [r0], #-2048 @ linux version 352 xscale_set_pte_ext_prologue
353
354 bic r2, r1, #0xff0 @ keep C, B bits
355 orr r2, r2, #PTE_TYPE_EXT @ extended page
356 tst r1, #L_PTE_SHARED @ shared?
357 orrne r2, r2, #0x200
358
359 eor r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
360
361 tst r3, #L_PTE_USER @ user?
362 orrne r2, r2, #PTE_EXT_AP_URO_SRW @ yes -> user r/o, system r/w
363
364 tst r3, #L_PTE_WRITE | L_PTE_DIRTY @ write and dirty?
365 orreq r2, r2, #PTE_EXT_AP_UNO_SRW @ yes -> user n/a, system r/w
366 @ combined with user -> user r/w
367 353
368 @ If it's cacheable, it needs to be in L2 also. 354 @ If it's cacheable, it needs to be in L2 also.
369 eor ip, r1, #L_PTE_CACHEABLE 355 tst r1, #L_PTE_CACHEABLE
370 tst ip, #L_PTE_CACHEABLE 356 orrne r2, r2, #PTE_EXT_TEX(0x5)
371 orreq r2, r2, #PTE_EXT_TEX(0x5)
372 357
373 tst r3, #L_PTE_PRESENT | L_PTE_YOUNG @ present and young? 358 tst r1, #L_PTE_SHARED @ shared?
374 movne r2, #0 @ no -> fault 359 orrne r2, r2, #0x200
375 360
376 str r2, [r0] @ hardware version 361 xscale_set_pte_ext_epilogue
377 mov ip, #0
378 mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line
379 mcr p15, 0, ip, c7, c10, 4 @ data write barrier
380 mov pc, lr 362 mov pc, lr
381 363
382 .ltorg 364 .ltorg