diff options
Diffstat (limited to 'arch/arm/mm/proc-v6.S')
-rw-r--r-- | arch/arm/mm/proc-v6.S | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 352db98ee269..3429ddcf65d1 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -111,12 +111,6 @@ ENTRY(cpu_v6_switch_mm) | |||
111 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 111 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
112 | mov pc, lr | 112 | mov pc, lr |
113 | 113 | ||
114 | #define nG (1 << 11) | ||
115 | #define APX (1 << 9) | ||
116 | #define AP1 (1 << 5) | ||
117 | #define AP0 (1 << 4) | ||
118 | #define XN (1 << 0) | ||
119 | |||
120 | /* | 114 | /* |
121 | * cpu_v6_set_pte(ptep, pte) | 115 | * cpu_v6_set_pte(ptep, pte) |
122 | * | 116 | * |
@@ -139,24 +133,24 @@ ENTRY(cpu_v6_switch_mm) | |||
139 | ENTRY(cpu_v6_set_pte) | 133 | ENTRY(cpu_v6_set_pte) |
140 | str r1, [r0], #-2048 @ linux version | 134 | str r1, [r0], #-2048 @ linux version |
141 | 135 | ||
142 | bic r2, r1, #0x00000ff0 | 136 | bic r2, r1, #0x000007f0 |
143 | bic r2, r2, #0x00000003 | 137 | bic r2, r2, #0x00000003 |
144 | orr r2, r2, #AP0 | 2 | 138 | orr r2, r2, #PTE_EXT_AP0 | 2 |
145 | 139 | ||
146 | tst r1, #L_PTE_WRITE | 140 | tst r1, #L_PTE_WRITE |
147 | tstne r1, #L_PTE_DIRTY | 141 | tstne r1, #L_PTE_DIRTY |
148 | orreq r2, r2, #APX | 142 | orreq r2, r2, #PTE_EXT_APX |
149 | 143 | ||
150 | tst r1, #L_PTE_USER | 144 | tst r1, #L_PTE_USER |
151 | orrne r2, r2, #AP1 | nG | 145 | orrne r2, r2, #PTE_EXT_AP1 |
152 | tstne r2, #APX | 146 | tstne r2, #PTE_EXT_APX |
153 | bicne r2, r2, #APX | AP0 | 147 | bicne r2, r2, #PTE_EXT_APX | PTE_EXT_AP0 |
154 | 148 | ||
155 | tst r1, #L_PTE_YOUNG | 149 | tst r1, #L_PTE_YOUNG |
156 | biceq r2, r2, #APX | AP1 | AP0 | 150 | biceq r2, r2, #PTE_EXT_APX | PTE_EXT_AP_MASK |
157 | 151 | ||
158 | @ tst r1, #L_PTE_EXEC | 152 | @ tst r1, #L_PTE_EXEC |
159 | @ orreq r2, r2, #XN | 153 | @ orreq r2, r2, #PTE_EXT_XN |
160 | 154 | ||
161 | tst r1, #L_PTE_PRESENT | 155 | tst r1, #L_PTE_PRESENT |
162 | moveq r2, #0 | 156 | moveq r2, #0 |