summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/head-nommu.S
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2019-10-10 10:12:20 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2019-10-10 22:23:20 +0100
commit4c0742f65b4ee466546fd24b71b56516cacd4613 (patch)
tree729b8210efc070da68736b24e3cd28be45c71d84 /arch/arm/kernel/head-nommu.S
parent851140ab0d083c78e5723a8b1cbd258f567a7aff (diff)
ARM: 8914/1: NOMMU: Fix exc_ret for XIP
It was reported that 72cd4064fcca "NOMMU: Toggle only bits in EXC_RETURN we are really care of" breaks NOMMU+XIP combination. It happens because saved EXC_RETURN gets overwritten when data section is relocated. The fix is to propagate EXC_RETURN via register and let relocation code to commit that value into memory. Fixes: 72cd4064fcca ("ARM: 8830/1: NOMMU: Toggle only bits in EXC_RETURN we are really care of") Reported-by: afzal mohammed <afzal.mohd.ma@gmail.com> Tested-by: afzal mohammed <afzal.mohd.ma@gmail.com> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/kernel/head-nommu.S')
-rw-r--r--arch/arm/kernel/head-nommu.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index afa350f44dea..0fc814bbc34b 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -201,6 +201,8 @@ M_CLASS(streq r3, [r12, #PMSAv8_MAIR1])
bic r0, r0, #V7M_SCB_CCR_IC
#endif
str r0, [r12, V7M_SCB_CCR]
+ /* Pass exc_ret to __mmap_switched */
+ mov r0, r10
#endif /* CONFIG_CPU_CP15 elif CONFIG_CPU_V7M */
ret lr
ENDPROC(__after_proc_init)