1 From 56e5aace5a675af0557b87a137b98e40454d8e22 Mon Sep 17 00:00:00 2001
2 From: Jan Kiszka <jan.kiszka@siemens.com>
3 Date: Sun, 3 Jul 2016 10:02:40 +0200
4 Subject: [PATCH 04/32] arm: Export __boot_cpu_mode for use in Jailhouse driver
7 Onlining a CPU while Jailhouse was running sets BOOT_CPU_MODE_MISMATCH
8 because the kernel detect that the CPU will now only come up in SVC
9 mode. Therefore, we need to fix up the flag after disabling Jailhouse
12 Moreover, exporting the symbol allows to use is_hyp_mode_available() in
13 the driver, thus prevents us from crashing during Jailhouse activation
14 when there is no hyp stub installed.
16 Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
18 arch/arm/kernel/armksyms.c | 5 +++++
19 1 file changed, 5 insertions(+)
21 diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
22 index 98bdea51089d..f2fa635bccf7 100644
23 --- a/arch/arm/kernel/armksyms.c
24 +++ b/arch/arm/kernel/armksyms.c
27 #include <asm/checksum.h>
28 #include <asm/ftrace.h>
29 +#include <asm/virt.h>
32 * libgcc functions - functions that are used internally by the
33 @@ -176,3 +177,7 @@ EXPORT_SYMBOL(__pv_offset);
34 EXPORT_SYMBOL(__arm_smccc_smc);
35 EXPORT_SYMBOL(__arm_smccc_hvc);
38 +#ifdef CONFIG_ARM_VIRT_EXT
39 +EXPORT_SYMBOL_GPL(__boot_cpu_mode);