aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2018-04-03 05:37:47 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2018-05-19 06:53:46 -0400
commit22893aa22b3cc89f12e1f80585c399f392f0a27a (patch)
tree08c9c49d2630911cc32165576da3ee533cf57a1d
parent9cfb541a4ad45168925078f7d1fe3a7363ba27e2 (diff)
ARM: 8755/1: NOMMU: Reorganise __setup_mpu
Currently, we have mixed code placement between .head.text and .text depends on configuration we are building: _text M R(UP) R(SMP) ====================================================== __setup_mpu __HEAD __HEAD text __after_proc_init __HEAD __HEAD text __mmap_switched text text text We are going to support another variant of MPU which is different to PMSAv7 in sense overlapping MPU regions are not allowed, so this patch makes boundaries between these sections precise and consistent: _text M R(UP) R(SMP) ====================================================== __setup_mpu __HEAD __HEAD __HEAD __after_proc_init text text text __mmap_switched text text text Additionally, it paves a path to postpone MPU activation till __after_proc_init where we do set SCTLR anyway and can return directly to __mmap_switched. Tested-by: Szemz? AndrĂ¡s <sza@esh.hu> Tested-by: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/kernel/head-nommu.S7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index d5d5fc8b581c..e294c0aa1e36 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -75,8 +75,8 @@ ENTRY(stext)
75 ldr r12, [r10, #PROCINFO_INITFUNC] 75 ldr r12, [r10, #PROCINFO_INITFUNC]
76 add r12, r12, r10 76 add r12, r12, r10
77 ret r12 77 ret r12
781: bl __after_proc_init 781: ldr lr, =__mmap_switched
79 b __mmap_switched 79 b __after_proc_init
80ENDPROC(stext) 80ENDPROC(stext)
81 81
82#ifdef CONFIG_SMP 82#ifdef CONFIG_SMP
@@ -123,6 +123,7 @@ __secondary_data:
123/* 123/*
124 * Set the Control Register and Read the process ID. 124 * Set the Control Register and Read the process ID.
125 */ 125 */
126 .text
126__after_proc_init: 127__after_proc_init:
127#ifdef CONFIG_CPU_CP15 128#ifdef CONFIG_CPU_CP15
128 /* 129 /*
@@ -202,6 +203,7 @@ ENDPROC(__after_proc_init)
202 * 203 *
203 * r6: Value to be written to DRSR (and IRSR if required) for PMSAv7_RAM_REGION 204 * r6: Value to be written to DRSR (and IRSR if required) for PMSAv7_RAM_REGION
204*/ 205*/
206 __HEAD
205 207
206ENTRY(__setup_mpu) 208ENTRY(__setup_mpu)
207 209
@@ -301,6 +303,7 @@ ENDPROC(__setup_pmsa_v7)
301 * r6: pointer at mpu_rgn_info 303 * r6: pointer at mpu_rgn_info
302 */ 304 */
303 305
306 .text
304ENTRY(__secondary_setup_mpu) 307ENTRY(__secondary_setup_mpu)
305 /* Use MPU region info supplied by __cpu_up */ 308 /* Use MPU region info supplied by __cpu_up */
306 ldr r6, [r7] @ get secondary_data.mpu_rgn_info 309 ldr r6, [r7] @ get secondary_data.mpu_rgn_info