• Vladimir Murzin's avatar
    ARM: 8755/1: NOMMU: Reorganise __setup_mpu · 22893aa2
    Vladimir Murzin authored
    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: default avatarSzemz? András <sza@esh.hu>
    Tested-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
    Signed-off-by: default avatarVladimir Murzin <vladimir.murzin@arm.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    22893aa2
head-nommu.S 9.87 KB