OSDN Git Service

ARM: 8755/1: NOMMU: Reorganise __setup_mpu
authorVladimir Murzin <vladimir.murzin@arm.com>
Tue, 3 Apr 2018 09:37:47 +0000 (10:37 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Sat, 19 May 2018 10:53:46 +0000 (11:53 +0100)
commit22893aa22b3cc89f12e1f80585c399f392f0a27a
tree08c9c49d2630911cc32165576da3ee533cf57a1d
parent9cfb541a4ad45168925078f7d1fe3a7363ba27e2
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>
arch/arm/kernel/head-nommu.S