path: root/arch/arm/cpu/armv7/psci.S
diff options
authorJan Kiszka <>2015-04-21 07:18:26 +0200
committerTom Warren <>2015-05-13 09:24:13 -0700
commit680f396851b7153f7f4243e1cc8875558b678add (patch)
treea21e82f7e291391764c1ce5d58de208c3d84b1a6 /arch/arm/cpu/armv7/psci.S
parent104d6fb6cd064c4c9278e5b6fdf99ac025597753 (diff)
ARM: Factor out common psci_get_cpu_id
Will be required for obtaining the ID of the current CPU in shared PSCI functions. The default implementation requires a dense ID space and only supports a single cluster. Therefore, the functions can be overloaded in cases where these assumptions do not hold. CC: Marc Zyngier <> Signed-off-by: Jan Kiszka <> Reviewed-by: Tom Rini <> Reviewed-by: Thierry Reding <> Tested-by: Thierry Reding <> Tested-by: Ian Campbell <> Acked-by: Ian Campbell <> Signed-off-by: Tom Warren <>
Diffstat (limited to 'arch/arm/cpu/armv7/psci.S')
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/psci.S b/arch/arm/cpu/armv7/psci.S
index bf11a34e54..12ad09b96c 100644
--- a/arch/arm/cpu/armv7/psci.S
+++ b/arch/arm/cpu/armv7/psci.S
@@ -99,4 +99,12 @@ _smc_psci:
pop {r4-r7, lr}
movs pc, lr @ Return to the kernel
+@ Requires dense and single-cluster CPU ID space
+ mrc p15, 0, r0, c0, c0, 5 /* read MPIDR */
+ and r0, r0, #0xff /* return CPU ID in cluster */
+ bx lr
+.weak psci_get_cpu_id
OpenPOWER on IntegriCloud