OSDN Git Service

ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 18 Feb 2019 08:31:41 +0000 (09:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:28 +0000 (14:50 +0100)
commit0ab0fe3153db88a0100a17c7ac62337574d9a09c
tree3cf3b87aca95381b3681fc49f02b94decd74210c
parentaf3b9fd41d93146410dc6d5f5542a32b15b7f039
ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used

[ Upstream commit ca70ea43f80c98582f5ffbbd1e6f4da2742da0c4 ]

MCPM does a soft reset of the CPUs and uses common cpu_resume() routine to
perform low-level platform initialization. This results in a try to install
HYP stubs for the second time for each CPU and results in false HYP/SVC
mode mismatch detection. The HYP stubs are already installed at the
beginning of the kernel initialization on the boot CPU (head.S) or in the
secondary_startup() for other CPUs. To fix this issue MCPM code should use
a cpu_resume() routine without HYP stubs installation.

This change fixes HYP/SVC mode mismatch on Samsung Exynos5422-based Odroid
XU3/XU4/HC1 boards.

Fixes: 3721924c8154 ("ARM: 8081/1: MCPM: provide infrastructure to allow for MCPM loopback")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/common/mcpm_entry.c
arch/arm/include/asm/suspend.h
arch/arm/kernel/sleep.S