diff options
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r-- | arch/arm/mm/proc-v7.S | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 9049c0764db2..6af366ce0165 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -217,56 +217,50 @@ ENDPROC(cpu_v7_set_pte_ext) | |||
217 | 217 | ||
218 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ | 218 | /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ |
219 | .globl cpu_v7_suspend_size | 219 | .globl cpu_v7_suspend_size |
220 | .equ cpu_v7_suspend_size, 4 * 9 | 220 | .equ cpu_v7_suspend_size, 4 * 7 |
221 | #ifdef CONFIG_PM_SLEEP | 221 | #ifdef CONFIG_PM_SLEEP |
222 | ENTRY(cpu_v7_do_suspend) | 222 | ENTRY(cpu_v7_do_suspend) |
223 | stmfd sp!, {r4 - r11, lr} | 223 | stmfd sp!, {r4 - r10, lr} |
224 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 224 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
225 | mrc p15, 0, r5, c13, c0, 1 @ Context ID | 225 | mrc p15, 0, r5, c13, c0, 3 @ User r/o thread ID |
226 | mrc p15, 0, r6, c13, c0, 3 @ User r/o thread ID | 226 | stmia r0!, {r4 - r5} |
227 | stmia r0!, {r4 - r6} | ||
228 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID | 227 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID |
229 | mrc p15, 0, r7, c2, c0, 0 @ TTB 0 | 228 | mrc p15, 0, r7, c2, c0, 1 @ TTB 1 |
230 | mrc p15, 0, r8, c2, c0, 1 @ TTB 1 | 229 | mrc p15, 0, r8, c1, c0, 0 @ Control register |
231 | mrc p15, 0, r9, c1, c0, 0 @ Control register | 230 | mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register |
232 | mrc p15, 0, r10, c1, c0, 1 @ Auxiliary control register | 231 | mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control |
233 | mrc p15, 0, r11, c1, c0, 2 @ Co-processor access control | 232 | stmia r0, {r6 - r10} |
234 | stmia r0, {r6 - r11} | 233 | ldmfd sp!, {r4 - r10, pc} |
235 | ldmfd sp!, {r4 - r11, pc} | ||
236 | ENDPROC(cpu_v7_do_suspend) | 234 | ENDPROC(cpu_v7_do_suspend) |
237 | 235 | ||
238 | ENTRY(cpu_v7_do_resume) | 236 | ENTRY(cpu_v7_do_resume) |
239 | mov ip, #0 | 237 | mov ip, #0 |
240 | mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs | 238 | mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs |
241 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 239 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache |
242 | ldmia r0!, {r4 - r6} | 240 | mcr p15, 0, ip, c13, c0, 1 @ set reserved context ID |
241 | ldmia r0!, {r4 - r5} | ||
243 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID | 242 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID |
244 | mcr p15, 0, r5, c13, c0, 1 @ Context ID | 243 | mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID |
245 | mcr p15, 0, r6, c13, c0, 3 @ User r/o thread ID | 244 | ldmia r0, {r6 - r10} |
246 | ldmia r0, {r6 - r11} | ||
247 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID | 245 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID |
248 | mcr p15, 0, r7, c2, c0, 0 @ TTB 0 | 246 | ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) |
249 | mcr p15, 0, r8, c2, c0, 1 @ TTB 1 | 247 | ALT_UP(orr r1, r1, #TTB_FLAGS_UP) |
248 | mcr p15, 0, r1, c2, c0, 0 @ TTB 0 | ||
249 | mcr p15, 0, r7, c2, c0, 1 @ TTB 1 | ||
250 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 250 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
251 | mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register | 251 | mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register |
252 | teq r4, r10 @ Is it already set? | 252 | teq r4, r9 @ Is it already set? |
253 | mcrne p15, 0, r10, c1, c0, 1 @ No, so write it | 253 | mcrne p15, 0, r9, c1, c0, 1 @ No, so write it |
254 | mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control | 254 | mcr p15, 0, r10, c1, c0, 2 @ Co-processor access control |
255 | ldr r4, =PRRR @ PRRR | 255 | ldr r4, =PRRR @ PRRR |
256 | ldr r5, =NMRR @ NMRR | 256 | ldr r5, =NMRR @ NMRR |
257 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR | 257 | mcr p15, 0, r4, c10, c2, 0 @ write PRRR |
258 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR | 258 | mcr p15, 0, r5, c10, c2, 1 @ write NMRR |
259 | isb | 259 | isb |
260 | dsb | 260 | dsb |
261 | mov r0, r9 @ control register | 261 | mov r0, r8 @ control register |
262 | mov r2, r7, lsr #14 @ get TTB0 base | ||
263 | mov r2, r2, lsl #14 | ||
264 | ldr r3, cpu_resume_l1_flags | ||
265 | b cpu_resume_mmu | 262 | b cpu_resume_mmu |
266 | ENDPROC(cpu_v7_do_resume) | 263 | ENDPROC(cpu_v7_do_resume) |
267 | cpu_resume_l1_flags: | ||
268 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP) | ||
269 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP) | ||
270 | #endif | 264 | #endif |
271 | 265 | ||
272 | __CPUINIT | 266 | __CPUINIT |