diff options
author | Vladimir Murzin <vladimir.murzin@arm.com> | 2019-10-10 11:12:20 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2019-10-10 23:23:20 +0200 |
commit | 4c0742f65b4ee466546fd24b71b56516cacd4613 (patch) | |
tree | 729b8210efc070da68736b24e3cd28be45c71d84 /arch/arm/kernel/head-common.S | |
parent | ARM: 8908/1: add __always_inline to functions called from __get_user_check() (diff) | |
download | linux-4c0742f65b4ee466546fd24b71b56516cacd4613.tar.xz linux-4c0742f65b4ee466546fd24b71b56516cacd4613.zip |
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-common.S')
-rw-r--r-- | arch/arm/kernel/head-common.S | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index a7810be07da1..4a3982812a40 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S @@ -68,7 +68,7 @@ ENDPROC(__vet_atags) * The following fragment of code is executed with the MMU on in MMU mode, * and uses absolute addresses; this is not position independent. * - * r0 = cp#15 control register + * r0 = cp#15 control register (exc_ret for M-class) * r1 = machine ID * r2 = atags/dtb pointer * r9 = processor ID @@ -137,7 +137,8 @@ __mmap_switched_data: #ifdef CONFIG_CPU_CP15 .long cr_alignment @ r3 #else - .long 0 @ r3 +M_CLASS(.long exc_ret) @ r3 +AR_CLASS(.long 0) @ r3 #endif .size __mmap_switched_data, . - __mmap_switched_data |