ARM: 8914/1: NOMMU: Fix exc_ret for XIP
authorVladimir Murzin <vladimir.murzin@arm.com>
Thu, 10 Oct 2019 09:12:20 +0000 (10:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2019 12:06:10 +0000 (13:06 +0100)
commitce005e5d6e9fbcd50e3e9662845d17aa3deb855a
tree2503661250622286b509d8349475de9258b071c6
parent394c90d9ce136394cc346694296433ec94110d80
ARM: 8914/1: NOMMU: Fix exc_ret for XIP

[ Upstream commit 4c0742f65b4ee466546fd24b71b56516cacd4613 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/kernel/head-common.S
arch/arm/kernel/head-nommu.S
arch/arm/mm/proc-v7m.S