summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv7/psci.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/armv7/psci.S')
-rw-r--r--arch/arm/cpu/armv7/psci.S11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/cpu/armv7/psci.S b/arch/arm/cpu/armv7/psci.S
index 18d85c4d56..87c0c0b6f5 100644
--- a/arch/arm/cpu/armv7/psci.S
+++ b/arch/arm/cpu/armv7/psci.S
@@ -17,6 +17,7 @@
#include <config.h>
#include <linux/linkage.h>
+#include <asm/macro.h>
#include <asm/psci.h>
.pushsection ._secure.text, "ax"
@@ -202,6 +203,7 @@ ENTRY(psci_get_cpu_stack_top)
add r5, r5, #0x2000 @ Skip two pages
lsr r5, r5, #12 @ Align to start of page
lsl r5, r5, #12
+ sub r5, r5, #4 @ reserve 1 word for target PC
sub r0, r5, r0 @ here's our stack!
bx lr
@@ -212,13 +214,10 @@ ENTRY(psci_cpu_entry)
bl _nonsec_init
- adr r0, _psci_target_pc
- ldr r0, [r0]
+ bl psci_get_cpu_id @ CPU ID => r0
+ bl psci_get_cpu_stack_top @ stack top => r0
+ ldr r0, [r0] @ target PC at stack top
b _do_nonsec_entry
ENDPROC(psci_cpu_entry)
-.globl _psci_target_pc
-_psci_target_pc:
- .word 0
-
.popsection
OpenPOWER on IntegriCloud