arm64: kernel: fix per-cpu offset restore on resume
authorLorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
Fri, 24 Jan 2014 10:56:19 +0000 (10:56 +0000)
committerAlex Shi <alex.shi@linaro.org>
Mon, 10 Mar 2014 05:38:37 +0000 (13:38 +0800)
commitb7ce906de4a27a21c1ac7b89baa513edf1d1600e
treeb7691736cd67fe5cfe9b406b53373f97b390d633
parent0be1f6174d684a162051e22f1fb7e4be1f77be4e
arm64: kernel: fix per-cpu offset restore on resume

The introduction of percpu offset optimisation through tpidr_el1 in:

Commit id :7158627686f02319c50c8d9d78f75d4c8
"arm64: percpu: implement optimised pcpu access using tpidr_el1"

requires cpu_{suspend/resume} to restore the tpidr_el1 register upon resume
so that percpu variables can be addressed correctly when a CPU comes out
of reset from warm-boot.

This patch fixes cpu_{suspend}/{resume} tpidr_el1 restoration on resume, by
calling the set_my_cpu_offset C API, as it is done on primary and secondary
CPUs on cold boot, so that, even if the register used to store the percpu
offset is changed, the save and restore of general purpose registers does not
have to be updated.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/suspend.c