]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arm: kernel: sleep: restore HYP mode configuration in cpu_resume
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 25 Feb 2014 17:11:03 +0000 (17:11 +0000)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 10 Mar 2014 15:39:48 +0000 (15:39 +0000)
commit91a3f6af430d81c5f855f3f1ff0f3715e064f342
treef4d54c14ad32286266bc7c7acb3124e2a9c4a350
parentfa389e220254c69ffae0d403eac4146171062d08
arm: kernel: sleep: restore HYP mode configuration in cpu_resume

On CPUs with virtualization extensions the kernel installs HYP mode
configuration on both primary and secondary cpus upon cold boot.

On platforms where CPUs are shutdown in idle paths (ie CPU core gating),
when a CPU resumes from low-power states it currently does not execute
code that reinstalls the HYP configuration, which means that the kernel
cannot run eg KVM properly on such machines.

This patch, mirroring cold-boot behaviour, executes position independent
code that reinstalls HYP configuration and drops to SVC mode safely on
warmboot, so that deep idle states can be enabled in kernel running as
hosts on platforms with power management HW.

Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
arch/arm/include/asm/assembler.h
arch/arm/kernel/sleep.S