arm64: add PSCI CPU_SUSPEND based cpu_suspend support
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 27 Sep 2013 09:25:02 +0000 (10:25 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 16 Mar 2015 13:38:08 +0000 (21:38 +0800)
commit4c1b770ca3d38534cd412fe763ad913dc9585dc2
tree2706aa5a9f0edc5831418855eabf98597ad5ddc7
parent32b8483751fbf495fd4dd2d724460a75e9c2c10d
arm64: add PSCI CPU_SUSPEND based cpu_suspend support

This patch implements the cpu_suspend cpu operations method through
the PSCI CPU SUSPEND API. The PSCI implementation translates the idle state
index passed by the cpu_suspend core call into a valid PSCI state according to
the PSCI states initialized at boot through the cpu_init_idle() CPU
operations hook.

The PSCI CPU suspend operation hook checks if the PSCI state is a
standby state. If it is, it calls the PSCI suspend implementation
straight away, without saving any context. If the state is a power
down state the kernel calls the __cpu_suspend API (that saves the CPU
context) and passed the PSCI suspend finisher as a parameter so that PSCI
can be called by the __cpu_suspend implementation after saving and flushing
the context as last function before power down.

For power down states, entry point is set to cpu_resume physical address,
that represents the default kernel execution address following a CPU reset.

Reviewed-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 18910ab0d916b1a87016d69efd027714a80521dd)
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Conflicts:
arch/arm64/kernel/psci.c
arch/arm64/kernel/psci.c