summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2020-06-25 16:14:06 +0300
committerMarc Zyngier <maz@kernel.org>2020-07-05 20:37:17 +0300
commitb38b298aa4397e2dc74a89b4dd3eac9e59b64c96 (patch)
tree62a3291fa9dbfe0eb7aeb5a72add5c8579243110 /arch/arm64/kvm/hyp
parent9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 (diff)
downloadlinux-b38b298aa4397e2dc74a89b4dd3eac9e59b64c96.tar.xz
KVM: arm64: Fix symbol dependency in __hyp_call_panic_nvhe
__hyp_call_panic_nvhe contains inline assembly which did not declare its dependency on the __hyp_panic_string symbol. The static-declared string has previously been kept alive because of a use in __hyp_call_panic_vhe. Fix this in preparation for separating the source files between VHE and nVHE when the two users land in two different compilation units. The static variable otherwise gets dropped when compiling the nVHE source file, causing an undefined symbol linker error later. Signed-off-by: David Brazdil <dbrazdil@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20200625131420.71444-2-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp')
-rw-r--r--arch/arm64/kvm/hyp/switch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
index db1c4487d95d..9270b14157b5 100644
--- a/arch/arm64/kvm/hyp/switch.c
+++ b/arch/arm64/kvm/hyp/switch.c
@@ -897,7 +897,7 @@ static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par,
* making sure it is a kernel address and not a PC-relative
* reference.
*/
- asm volatile("ldr %0, =__hyp_panic_string" : "=r" (str_va));
+ asm volatile("ldr %0, =%1" : "=r" (str_va) : "S" (__hyp_panic_string));
__hyp_do_panic(str_va,
spsr, elr,