aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mm/proc-v7.S17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 60920f62fdf5..bd1781979a39 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -92,7 +92,7 @@ ENDPROC(cpu_v7_dcache_clean_area)
92 92
93/* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */ 93/* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */
94.globl cpu_v7_suspend_size 94.globl cpu_v7_suspend_size
95.equ cpu_v7_suspend_size, 4 * 8 95.equ cpu_v7_suspend_size, 4 * 9
96#ifdef CONFIG_ARM_CPU_SUSPEND 96#ifdef CONFIG_ARM_CPU_SUSPEND
97ENTRY(cpu_v7_do_suspend) 97ENTRY(cpu_v7_do_suspend)
98 stmfd sp!, {r4 - r10, lr} 98 stmfd sp!, {r4 - r10, lr}
@@ -101,13 +101,17 @@ ENTRY(cpu_v7_do_suspend)
101 stmia r0!, {r4 - r5} 101 stmia r0!, {r4 - r5}
102#ifdef CONFIG_MMU 102#ifdef CONFIG_MMU
103 mrc p15, 0, r6, c3, c0, 0 @ Domain ID 103 mrc p15, 0, r6, c3, c0, 0 @ Domain ID
104#ifdef CONFIG_ARM_LPAE
105 mrrc p15, 1, r5, r7, c2 @ TTB 1
106#else
104 mrc p15, 0, r7, c2, c0, 1 @ TTB 1 107 mrc p15, 0, r7, c2, c0, 1 @ TTB 1
108#endif
105 mrc p15, 0, r11, c2, c0, 2 @ TTB control register 109 mrc p15, 0, r11, c2, c0, 2 @ TTB control register
106#endif 110#endif
107 mrc p15, 0, r8, c1, c0, 0 @ Control register 111 mrc p15, 0, r8, c1, c0, 0 @ Control register
108 mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register 112 mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register
109 mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control 113 mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control
110 stmia r0, {r6 - r11} 114 stmia r0, {r5 - r11}
111 ldmfd sp!, {r4 - r10, pc} 115 ldmfd sp!, {r4 - r10, pc}
112ENDPROC(cpu_v7_do_suspend) 116ENDPROC(cpu_v7_do_suspend)
113 117
@@ -118,16 +122,19 @@ ENTRY(cpu_v7_do_resume)
118 ldmia r0!, {r4 - r5} 122 ldmia r0!, {r4 - r5}
119 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID 123 mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID
120 mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID 124 mcr p15, 0, r5, c13, c0, 3 @ User r/o thread ID
121 ldmia r0, {r6 - r11} 125 ldmia r0, {r5 - r11}
122#ifdef CONFIG_MMU 126#ifdef CONFIG_MMU
123 mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs 127 mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs
124 mcr p15, 0, r6, c3, c0, 0 @ Domain ID 128 mcr p15, 0, r6, c3, c0, 0 @ Domain ID
125#ifndef CONFIG_ARM_LPAE 129#ifdef CONFIG_ARM_LPAE
130 mcrr p15, 0, r1, ip, c2 @ TTB 0
131 mcrr p15, 1, r5, r7, c2 @ TTB 1
132#else
126 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP) 133 ALT_SMP(orr r1, r1, #TTB_FLAGS_SMP)
127 ALT_UP(orr r1, r1, #TTB_FLAGS_UP) 134 ALT_UP(orr r1, r1, #TTB_FLAGS_UP)
128#endif
129 mcr p15, 0, r1, c2, c0, 0 @ TTB 0 135 mcr p15, 0, r1, c2, c0, 0 @ TTB 0
130 mcr p15, 0, r7, c2, c0, 1 @ TTB 1 136 mcr p15, 0, r7, c2, c0, 1 @ TTB 1
137#endif
131 mcr p15, 0, r11, c2, c0, 2 @ TTB control register 138 mcr p15, 0, r11, c2, c0, 2 @ TTB control register
132 ldr r4, =PRRR @ PRRR 139 ldr r4, =PRRR @ PRRR
133 ldr r5, =NMRR @ NMRR 140 ldr r5, =NMRR @ NMRR