diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-08-27 17:39:09 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-20 18:33:38 -0400 |
commit | de8e71ca4f2e17329f6718ae88d5c8336cb249ee (patch) | |
tree | cec0f26c5f4c9efd601edc1ac716aed168f65e1f /arch/arm/mm/proc-v6.S | |
parent | e8ce0eb5e2254b85415e4b58e73f24a5d13846a1 (diff) |
ARM: pm: only use preallocated page table during resume
Only use the preallocated page table during the resume, not while
suspending. This avoids the overhead of having to switch unnecessarily
to the resume page table in the suspend path.
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/proc-v6.S')
-rw-r--r-- | arch/arm/mm/proc-v6.S | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 414e3696bdf7..2e27b467c6a6 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -128,20 +128,19 @@ ENTRY(cpu_v6_set_pte_ext) | |||
128 | 128 | ||
129 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ | 129 | /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */ |
130 | .globl cpu_v6_suspend_size | 130 | .globl cpu_v6_suspend_size |
131 | .equ cpu_v6_suspend_size, 4 * 8 | 131 | .equ cpu_v6_suspend_size, 4 * 7 |
132 | #ifdef CONFIG_PM_SLEEP | 132 | #ifdef CONFIG_PM_SLEEP |
133 | ENTRY(cpu_v6_do_suspend) | 133 | ENTRY(cpu_v6_do_suspend) |
134 | stmfd sp!, {r4 - r11, lr} | 134 | stmfd sp!, {r4 - r10, lr} |
135 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID | 135 | mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID |
136 | mrc p15, 0, r5, c13, c0, 1 @ Context ID | 136 | mrc p15, 0, r5, c13, c0, 1 @ Context ID |
137 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID | 137 | mrc p15, 0, r6, c3, c0, 0 @ Domain ID |
138 | mrc p15, 0, r7, c2, c0, 0 @ Translation table base 0 | 138 | mrc p15, 0, r7, c2, c0, 1 @ Translation table base 1 |
139 | mrc p15, 0, r8, c2, c0, 1 @ Translation table base 1 | 139 | mrc p15, 0, r8, c1, c0, 1 @ auxiliary control register |
140 | mrc p15, 0, r9, c1, c0, 1 @ auxiliary control register | 140 | mrc p15, 0, r9, c1, c0, 2 @ co-processor access control |
141 | mrc p15, 0, r10, c1, c0, 2 @ co-processor access control | 141 | mrc p15, 0, r10, c1, c0, 0 @ control register |
142 | mrc p15, 0, r11, c1, c0, 0 @ control register | 142 | stmia r0, {r4 - r10} |
143 | stmia r0, {r4 - r11} | 143 | ldmfd sp!, {r4- r10, pc} |
144 | ldmfd sp!, {r4- r11, pc} | ||
145 | ENDPROC(cpu_v6_do_suspend) | 144 | ENDPROC(cpu_v6_do_suspend) |
146 | 145 | ||
147 | ENTRY(cpu_v6_do_resume) | 146 | ENTRY(cpu_v6_do_resume) |
@@ -150,17 +149,19 @@ ENTRY(cpu_v6_do_resume) | |||
150 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 149 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache |
151 | mcr p15, 0, ip, c7, c15, 0 @ clean+invalidate cache | 150 | mcr p15, 0, ip, c7, c15, 0 @ clean+invalidate cache |
152 | mcr p15, 0, ip, c7, c10, 4 @ drain write buffer | 151 | mcr p15, 0, ip, c7, c10, 4 @ drain write buffer |
153 | ldmia r0, {r4 - r11} | 152 | ldmia r0, {r4 - r10} |
154 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID | 153 | mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID |
155 | mcr p15, 0, r5, c13, c0, 1 @ Context ID | 154 | mcr p15, 0, r5, c13, c0, 1 @ Context ID |
156 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID | 155 | mcr p15, 0, r6, c3, c0, 0 @ Domain ID |
157 | mcr p15, 0, r7, c2, c0, 0 @ Translation table base 0 | 156 | ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) |
158 | mcr p15, 0, r8, c2, c0, 1 @ Translation table base 1 | 157 | ALT_UP(orr r1, r1, #TTB_FLAGS_UP) |
159 | mcr p15, 0, r9, c1, c0, 1 @ auxiliary control register | 158 | mcr p15, 0, r1, c2, c0, 0 @ Translation table base 0 |
160 | mcr p15, 0, r10, c1, c0, 2 @ co-processor access control | 159 | mcr p15, 0, r7, c2, c0, 1 @ Translation table base 1 |
160 | mcr p15, 0, r8, c1, c0, 1 @ auxiliary control register | ||
161 | mcr p15, 0, r9, c1, c0, 2 @ co-processor access control | ||
161 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register | 162 | mcr p15, 0, ip, c2, c0, 2 @ TTB control register |
162 | mcr p15, 0, ip, c7, c5, 4 @ ISB | 163 | mcr p15, 0, ip, c7, c5, 4 @ ISB |
163 | mov r0, r11 @ control register | 164 | mov r0, r10 @ control register |
164 | b cpu_resume_mmu | 165 | b cpu_resume_mmu |
165 | ENDPROC(cpu_v6_do_resume) | 166 | ENDPROC(cpu_v6_do_resume) |
166 | #endif | 167 | #endif |