diff options
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r-- | arch/arm/mm/proc-v7.S | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index b49f9a4c82c8..172e2eeb6ddb 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -99,46 +99,10 @@ ENTRY(cpu_v7_switch_mm) | |||
99 | * (hardware version is stored at -1024 bytes) | 99 | * (hardware version is stored at -1024 bytes) |
100 | * - pte - PTE value to store | 100 | * - pte - PTE value to store |
101 | * - ext - value for extended PTE bits | 101 | * - ext - value for extended PTE bits |
102 | * | ||
103 | * Permissions: | ||
104 | * YUWD APX AP1 AP0 SVC User | ||
105 | * 0xxx 0 0 0 no acc no acc | ||
106 | * 100x 1 0 1 r/o no acc | ||
107 | * 10x0 1 0 1 r/o no acc | ||
108 | * 1011 0 0 1 r/w no acc | ||
109 | * 110x 0 1 0 r/w r/o | ||
110 | * 11x0 0 1 0 r/w r/o | ||
111 | * 1111 0 1 1 r/w r/w | ||
112 | */ | 102 | */ |
113 | ENTRY(cpu_v7_set_pte_ext) | 103 | ENTRY(cpu_v7_set_pte_ext) |
114 | #ifdef CONFIG_MMU | 104 | #ifdef CONFIG_MMU |
115 | str r1, [r0], #-2048 @ linux version | 105 | armv6_set_pte_ext |
116 | |||
117 | bic r3, r1, #0x000003f0 | ||
118 | bic r3, r3, #0x00000003 | ||
119 | orr r3, r3, r2 | ||
120 | orr r3, r3, #PTE_EXT_AP0 | 2 | ||
121 | |||
122 | tst r1, #L_PTE_WRITE | ||
123 | tstne r1, #L_PTE_DIRTY | ||
124 | orreq r3, r3, #PTE_EXT_APX | ||
125 | |||
126 | tst r1, #L_PTE_USER | ||
127 | orrne r3, r3, #PTE_EXT_AP1 | ||
128 | tstne r3, #PTE_EXT_APX | ||
129 | bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 | ||
130 | |||
131 | tst r1, #L_PTE_YOUNG | ||
132 | biceq r3, r3, #PTE_EXT_APX | PTE_EXT_AP_MASK | ||
133 | |||
134 | tst r1, #L_PTE_EXEC | ||
135 | orreq r3, r3, #PTE_EXT_XN | ||
136 | |||
137 | tst r1, #L_PTE_PRESENT | ||
138 | moveq r3, #0 | ||
139 | |||
140 | str r3, [r0] | ||
141 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte | ||
142 | #endif | 106 | #endif |
143 | mov pc, lr | 107 | mov pc, lr |
144 | 108 | ||