arm: psci: save context id for cpu_on PSCI command
authorPatrick Delaunay <patrick.delaunay@st.com>
Mon, 16 Apr 2018 08:13:22 +0000 (10:13 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 7 May 2018 15:45:15 +0000 (11:45 -0400)
commit1a047c23f9e5e7f498cc3ca759725ae7b6c6a6b9
tree724a4227f6b9be80c08f8e1315c4f3da697f5496
parent890e79f2b1c26c5ba1a86d179706348aec7feef7
arm: psci: save context id for cpu_on PSCI command

Save and use the 3rd parameter of PSCI CPU_ON request: context_id.

The context_id parameter is only meaningful to the caller.
U-Boot PSCI preserves a copy of the value passed in this parameter.
Following wakeup from a  powerdown state, U-BOOT PSCI places
this value in R0 when it first enters the OS.

NB: this context id is not (yet?) used by Linux but it is mandatory
    to be PSCI compliant.

update armv7 psci functions:
- psci_save_target_pc(): keep for backward compatibility with
  current platform (only save PC and force context id to 0)
  => should be removed when all platform migrate to the new API

- psci_save(): new API to use by ARMv7 platform with PSCI,
  save pc (= entry_point_address) and context_id

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/cpu/armv7/psci-common.c
arch/arm/cpu/armv7/psci.S
arch/arm/include/asm/psci.h