diff options
Diffstat (limited to 'arch/arm/mm/proc-v7-3level.S')
-rw-r--r-- | arch/arm/mm/proc-v7-3level.S | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mm/proc-v7-3level.S b/arch/arm/mm/proc-v7-3level.S index 01a719e18bb0..22e3ad63500c 100644 --- a/arch/arm/mm/proc-v7-3level.S +++ b/arch/arm/mm/proc-v7-3level.S | |||
@@ -64,6 +64,14 @@ ENTRY(cpu_v7_switch_mm) | |||
64 | mov pc, lr | 64 | mov pc, lr |
65 | ENDPROC(cpu_v7_switch_mm) | 65 | ENDPROC(cpu_v7_switch_mm) |
66 | 66 | ||
67 | #ifdef __ARMEB__ | ||
68 | #define rl r3 | ||
69 | #define rh r2 | ||
70 | #else | ||
71 | #define rl r2 | ||
72 | #define rh r3 | ||
73 | #endif | ||
74 | |||
67 | /* | 75 | /* |
68 | * cpu_v7_set_pte_ext(ptep, pte) | 76 | * cpu_v7_set_pte_ext(ptep, pte) |
69 | * | 77 | * |
@@ -73,13 +81,13 @@ ENDPROC(cpu_v7_switch_mm) | |||
73 | */ | 81 | */ |
74 | ENTRY(cpu_v7_set_pte_ext) | 82 | ENTRY(cpu_v7_set_pte_ext) |
75 | #ifdef CONFIG_MMU | 83 | #ifdef CONFIG_MMU |
76 | tst r2, #L_PTE_VALID | 84 | tst rl, #L_PTE_VALID |
77 | beq 1f | 85 | beq 1f |
78 | tst r3, #1 << (57 - 32) @ L_PTE_NONE | 86 | tst rh, #1 << (57 - 32) @ L_PTE_NONE |
79 | bicne r2, #L_PTE_VALID | 87 | bicne rl, #L_PTE_VALID |
80 | bne 1f | 88 | bne 1f |
81 | tst r3, #1 << (55 - 32) @ L_PTE_DIRTY | 89 | tst rh, #1 << (55 - 32) @ L_PTE_DIRTY |
82 | orreq r2, #L_PTE_RDONLY | 90 | orreq rl, #L_PTE_RDONLY |
83 | 1: strd r2, r3, [r0] | 91 | 1: strd r2, r3, [r0] |
84 | ALT_SMP(W(nop)) | 92 | ALT_SMP(W(nop)) |
85 | ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte | 93 | ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte |