diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2016-07-03 10:02:40 +0200 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2021-11-02 16:57:13 +0800 |
commit | 95174c10d1d802685e6f5cf630998ce21b97dde3 (patch) | |
tree | c73f8b6bfb5279657b264b73ddd906bcdecafb6a | |
parent | c223e37192a6dd5cbe08817c9004569dbe6c6608 (diff) |
arm: Export __boot_cpu_mode for use in Jailhouse driver module
Onlining a CPU while Jailhouse was running sets BOOT_CPU_MODE_MISMATCH
because the kernel detect that the CPU will now only come up in SVC
mode. Therefore, we need to fix up the flag after disabling Jailhouse
again.
Moreover, exporting the symbol allows to use is_hyp_mode_available() in
the driver, thus prevents us from crashing during Jailhouse activation
when there is no hyp stub installed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rw-r--r-- | arch/arm/kernel/armksyms.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 82e96ac83684..354ab3e4e41f 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c @@ -16,6 +16,7 @@ #include <asm/checksum.h> #include <asm/ftrace.h> +#include <asm/virt.h> /* * libgcc functions - functions that are used internally by the @@ -175,3 +176,7 @@ EXPORT_SYMBOL(__pv_offset); EXPORT_SYMBOL(__arm_smccc_smc); EXPORT_SYMBOL(__arm_smccc_hvc); #endif + +#ifdef CONFIG_ARM_VIRT_EXT +EXPORT_SYMBOL_GPL(__boot_cpu_mode); +#endif |