diff options
author | 2021-09-30 14:30:59 +0000 | |
---|---|---|
committer | 2021-10-01 13:30:59 +0100 | |
commit | 094a3684b9b67758ccedf0e6068d90f22f2942d9 (patch) | |
tree | 4cea391b8e1827b9f6e29cc275f3c816b9855f11 /arch/arm64/kernel/sdei.c | |
parent | Linux 5.15-rc3 (diff) | |
download | wireguard-linux-094a3684b9b67758ccedf0e6068d90f22f2942d9.tar.xz wireguard-linux-094a3684b9b67758ccedf0e6068d90f22f2942d9.zip |
arm64: kernel: add helper for booted at EL2 and not VHE
Replace places that contain logic like this:
is_hyp_mode_available() && !is_kernel_in_hyp_mode()
With a dedicated boolean function is_hyp_nvhe(). This will be needed
later in kexec in order to sooner switch back to EL2.
Suggested-by: James Morse <james.morse@arm.com>
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210930143113.1502553-2-pasha.tatashin@soleen.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/sdei.c')
-rw-r--r-- | arch/arm64/kernel/sdei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/sdei.c b/arch/arm64/kernel/sdei.c index 47f77d1234cb..d20620a1c51a 100644 --- a/arch/arm64/kernel/sdei.c +++ b/arch/arm64/kernel/sdei.c @@ -202,7 +202,7 @@ unsigned long sdei_arch_get_entry_point(int conduit) * dropped to EL1 because we don't support VHE, then we can't support * SDEI. */ - if (is_hyp_mode_available() && !is_kernel_in_hyp_mode()) { + if (is_hyp_nvhe()) { pr_err("Not supported on this hardware/boot configuration\n"); goto out_err; } |