From: Felix Fu fuzhen5@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAI881 CVE: NA
-----------------------------------------
This reverts commit 00c2a432a874b5f403cf641e3c63ad35e009baba.
Signed-off-by: Felix Fu fuzhen5@huawei.com --- arch/arm/mach-exynos/headsmp.S | 9 ++++++++- arch/arm/mach-exynos/sleep.S | 26 +++++++++++++++++++++----- 2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-exynos/headsmp.S b/arch/arm/mach-exynos/headsmp.S index be7cd0eebe1d..0ac2cb9a7355 100644 --- a/arch/arm/mach-exynos/headsmp.S +++ b/arch/arm/mach-exynos/headsmp.S @@ -19,7 +19,10 @@ ENTRY(exynos4_secondary_startup) ARM_BE8(setend be) mrc p15, 0, r0, c0, c0, 5 and r0, r0, #15 - adr_l r6, exynos_pen_release + adr r4, 1f + ldmia r4, {r5, r6} + sub r4, r4, r5 + add r6, r6, r4 pen: ldr r7, [r6] cmp r7, r0 bne pen @@ -30,3 +33,7 @@ pen: ldr r7, [r6] */ b secondary_startup ENDPROC(exynos4_secondary_startup) + + .align 2 +1: .long . + .long exynos_pen_release diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S index ed27515a4458..ed93f91853b8 100644 --- a/arch/arm/mach-exynos/sleep.S +++ b/arch/arm/mach-exynos/sleep.S @@ -8,7 +8,6 @@
#include <linux/linkage.h> #include <asm/asm-offsets.h> -#include <asm/assembler.h> #include <asm/hardware/cache-l2x0.h> #include "smc.h"
@@ -55,13 +54,19 @@ ENTRY(exynos_cpu_resume_ns) cmp r0, r1 bne skip_cp15
- ldr_l r1, cp15_save_power - ldr_l r2, cp15_save_diag + adr r0, _cp15_save_power + ldr r1, [r0] + ldr r1, [r0, r1] + adr r0, _cp15_save_diag + ldr r2, [r0] + ldr r2, [r0, r2] mov r0, #SMC_CMD_C15RESUME dsb smc #0 #ifdef CONFIG_CACHE_L2X0 - adr_l r0, l2x0_saved_regs + adr r0, 1f + ldr r2, [r0] + add r0, r2, r0
/* Check that the address has been initialised. */ ldr r1, [r0, #L2X0_R_PHY_BASE] @@ -80,7 +85,9 @@ ENTRY(exynos_cpu_resume_ns) smc #0
/* Reload saved regs pointer because smc corrupts registers. */ - adr_l r0, l2x0_saved_regs + adr r0, 1f + ldr r2, [r0] + add r0, r2, r0
ldr r1, [r0, #L2X0_R_PWR_CTRL] ldr r2, [r0, #L2X0_R_AUX_CTRL] @@ -99,6 +106,15 @@ skip_cp15: b cpu_resume ENDPROC(exynos_cpu_resume_ns)
+ .align +_cp15_save_power: + .long cp15_save_power - . +_cp15_save_diag: + .long cp15_save_diag - . +#ifdef CONFIG_CACHE_L2X0 +1: .long l2x0_saved_regs - . +#endif /* CONFIG_CACHE_L2X0 */ + .data .align 2 .globl cp15_save_diag