diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-08-26 15:28:52 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-20 18:33:36 -0400 |
commit | e8ce0eb5e2254b85415e4b58e73f24a5d13846a1 (patch) | |
tree | 26aaee04d5a4bb872eea215f65073825258ecd76 /arch/arm/mm | |
parent | f5fa68d9674156ddaafa12a058ccc93c8866d5f9 (diff) |
ARM: pm: preallocate a page table for suspend/resume
Preallocate a page table and setup an identity mapping for the MMU
enable code. This means we don't have to "borrow" a page table to
do this, avoiding complexities with L2 cache coherency.
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/proc-arm920.S | 4 | ||||
-rw-r--r-- | arch/arm/mm/proc-arm926.S | 4 | ||||
-rw-r--r-- | arch/arm/mm/proc-sa1100.S | 4 | ||||
-rw-r--r-- | arch/arm/mm/proc-v6.S | 6 | ||||
-rw-r--r-- | arch/arm/mm/proc-v7.S | 6 | ||||
-rw-r--r-- | arch/arm/mm/proc-xsc3.S | 6 | ||||
-rw-r--r-- | arch/arm/mm/proc-xscale.S | 4 |
7 files changed, 0 insertions, 34 deletions
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 2e6849b41f66..035d57bf1b7a 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -400,10 +400,6 @@ ENTRY(cpu_arm920_do_resume) | |||
400 | mcr p15, 0, r5, c3, c0, 0 @ Domain ID | 400 | mcr p15, 0, r5, c3, c0, 0 @ Domain ID |
401 | mcr p15, 0, r6, c2, c0, 0 @ TTB address | 401 | mcr p15, 0, r6, c2, c0, 0 @ TTB address |
402 | mov r0, r7 @ control register | 402 | mov r0, r7 @ control register |
403 | mov r2, r6, lsr #14 @ get TTB0 base | ||
404 | mov r2, r2, lsl #14 | ||
405 | ldr r3, =PMD_TYPE_SECT | PMD_SECT_BUFFERABLE | \ | ||
406 | PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE | ||
407 | b cpu_resume_mmu | 403 | b cpu_resume_mmu |
408 | ENDPROC(cpu_arm920_do_resume) | 404 | ENDPROC(cpu_arm920_do_resume) |
409 | #endif | 405 | #endif |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index cd8f79c3a282..48add848b997 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -415,10 +415,6 @@ ENTRY(cpu_arm926_do_resume) | |||
415 | mcr p15, 0, r5, c3, c0, 0 @ Domain ID | 415 | mcr p15, 0, r5, c3, c0, 0 @ Domain ID |
416 | mcr p15, 0, r6, c2, c0, 0 @ TTB address | 416 | mcr p15, 0, r6, c2, c0, 0 @ TTB address |
417 | mov r0, r7 @ control register | 417 | mov r0, r7 @ control register |
418 | mov r2, r6, lsr #14 @ get TTB0 base | ||
419 | mov r2, r2, lsl #14 | ||
420 | ldr r3, =PMD_TYPE_SECT | PMD_SECT_BUFFERABLE | \ | ||
421 | PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE | ||
422 | b cpu_resume_mmu | 418 | b cpu_resume_mmu |
423 | ENDPROC(cpu_arm926_do_resume) | 419 | ENDPROC(cpu_arm926_do_resume) |
424 | #endif | 420 | #endif |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 69e7f2ef7384..52f73fb47ac1 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -192,10 +192,6 @@ ENTRY(cpu_sa1100_do_resume) | |||
192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr | 192 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr |
193 | mcr p15, 0, r6, c13, c0, 0 @ PID | 193 | mcr p15, 0, r6, c13, c0, 0 @ PID |
194 | mov r0, r7 @ control register | 194 | mov r0, r7 @ control register |
195 | mov r2, r5, lsr #14 @ get TTB0 base | ||
196 | mov r2, r2, lsl #14 | ||
197 | ldr r3, =PMD_TYPE_SECT | PMD_SECT_BUFFERABLE | \ | ||
198 | PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE | ||
199 | b cpu_resume_mmu | 195 | b cpu_resume_mmu |
200 | ENDPROC(cpu_sa1100_do_resume) | 196 | ENDPROC(cpu_sa1100_do_resume) |
201 | #endif | 197 | #endif |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index a923aa0fd00d..414e3696bdf7 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -161,14 +161,8 @@ ENTRY(cpu_v6_do_resume) | |||
161 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 161 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
162 | mcr p15, 0, ip, c7, c5, 4 @ ISB | 162 | mcr p15, 0, ip, c7, c5, 4 @ ISB |
163 | mov r0, r11 @ control register | 163 | mov r0, r11 @ control register |
164 | mov r2, r7, lsr #14 @ get TTB0 base | ||
165 | mov r2, r2, lsl #14 | ||
166 | ldr r3, cpu_resume_l1_flags | ||
167 | b cpu_resume_mmu | 164 | b cpu_resume_mmu |
168 | ENDPROC(cpu_v6_do_resume) | 165 | ENDPROC(cpu_v6_do_resume) |
169 | cpu_resume_l1_flags: | ||
170 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP) | ||
171 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP) | ||
172 | #endif | 166 | #endif |
173 | 167 | ||
174 | string cpu_v6_name, "ARMv6-compatible processor" | 168 | string cpu_v6_name, "ARMv6-compatible processor" |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 9049c0764db2..21d6910d2208 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -259,14 +259,8 @@ ENTRY(cpu_v7_do_resume) | |||
259 | isb | 259 | isb |
260 | dsb | 260 | dsb |
261 | mov r0, r9 @ control register | 261 | mov r0, r9 @ 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 |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 755e1bf22681..efd49492fa4d 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -435,13 +435,7 @@ ENTRY(cpu_xsc3_do_resume) | |||
435 | mcr p15, 0, r7, c3, c0, 0 @ domain ID | 435 | mcr p15, 0, r7, c3, c0, 0 @ domain ID |
436 | mcr p15, 0, r8, c2, c0, 0 @ translation table base addr | 436 | mcr p15, 0, r8, c2, c0, 0 @ translation table base addr |
437 | mcr p15, 0, r9, c1, c0, 1 @ auxiliary control reg | 437 | mcr p15, 0, r9, c1, c0, 1 @ auxiliary control reg |
438 | |||
439 | @ temporarily map resume_turn_on_mmu into the page table, | ||
440 | @ otherwise prefetch abort occurs after MMU is turned on | ||
441 | mov r0, r10 @ control register | 438 | mov r0, r10 @ control register |
442 | mov r2, r8, lsr #14 @ get TTB0 base | ||
443 | mov r2, r2, lsl #14 | ||
444 | ldr r3, =0x542e @ section flags | ||
445 | b cpu_resume_mmu | 439 | b cpu_resume_mmu |
446 | ENDPROC(cpu_xsc3_do_resume) | 440 | ENDPROC(cpu_xsc3_do_resume) |
447 | #endif | 441 | #endif |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index fbc06e55b87a..37dbadadf7c4 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -548,10 +548,6 @@ ENTRY(cpu_xscale_do_resume) | |||
548 | mcr p15, 0, r8, c2, c0, 0 @ translation table base addr | 548 | mcr p15, 0, r8, c2, c0, 0 @ translation table base addr |
549 | mcr p15, 0, r9, c1, c1, 0 @ auxiliary control reg | 549 | mcr p15, 0, r9, c1, c1, 0 @ auxiliary control reg |
550 | mov r0, r10 @ control register | 550 | mov r0, r10 @ control register |
551 | mov r2, r8, lsr #14 @ get TTB0 base | ||
552 | mov r2, r2, lsl #14 | ||
553 | ldr r3, =PMD_TYPE_SECT | PMD_SECT_BUFFERABLE | \ | ||
554 | PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE | ||
555 | b cpu_resume_mmu | 551 | b cpu_resume_mmu |
556 | ENDPROC(cpu_xscale_do_resume) | 552 | ENDPROC(cpu_xscale_do_resume) |
557 | #endif | 553 | #endif |