ARM: pm: fix HYP/SVC mode mismatch when MCPM is used 89/199789/3
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 13 Feb 2019 12:02:25 +0000 (13:02 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 18 Feb 2019 05:04:06 +0000 (14:04 +0900)
commit5898a1c967a00c66d4bf863b6fb5b2ada89a71fb
treeef176170e51e1311cd2e23c3d31a2cd0cd1bfcc5
parentcc96612c12ef0833a332f21c6b6605894a91bead
ARM: pm: fix HYP/SVC mode mismatch when MCPM is used

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>
Change-Id: I6f6225fd2a7e57e323010af616a6fdd4774a7222
arch/arm/common/mcpm_entry.c
arch/arm/include/asm/suspend.h
arch/arm/kernel/sleep.S