summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/nvhe/hyp-smp.c
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2021-01-05 18:05:41 +0000
committerMarc Zyngier <maz@kernel.org>2021-01-23 14:01:00 +0000
commit247bc166e6b3b1e4068f120f55582a3aa210cc2d (patch)
tree8ad07b0f09b6056005df9a3cd611a480c0270c40 /arch/arm64/kvm/hyp/nvhe/hyp-smp.c
parent537db4af26e3f2e0f304f2032bc593f7e2a54938 (diff)
downloadlinux-247bc166e6b3b1e4068f120f55582a3aa210cc2d.tar.bz2
KVM: arm64: Remove hyp_symbol_addr
Hyp code used the hyp_symbol_addr helper to force PC-relative addressing because absolute addressing results in kernel VAs due to the way hyp code is linked. This is not true anymore, so remove the helper and update all of its users. Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: David Brazdil <dbrazdil@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210105180541.65031-9-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/hyp-smp.c')
-rw-r--r--arch/arm64/kvm/hyp/nvhe/hyp-smp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-smp.c b/arch/arm64/kvm/hyp/nvhe/hyp-smp.c
index 2997aa156d8e..879559057dee 100644
--- a/arch/arm64/kvm/hyp/nvhe/hyp-smp.c
+++ b/arch/arm64/kvm/hyp/nvhe/hyp-smp.c
@@ -33,8 +33,8 @@ unsigned long __hyp_per_cpu_offset(unsigned int cpu)
if (cpu >= ARRAY_SIZE(kvm_arm_hyp_percpu_base))
hyp_panic();
- cpu_base_array = (unsigned long *)hyp_symbol_addr(kvm_arm_hyp_percpu_base);
+ cpu_base_array = (unsigned long *)&kvm_arm_hyp_percpu_base;
this_cpu_base = kern_hyp_va(cpu_base_array[cpu]);
- elf_base = (unsigned long)hyp_symbol_addr(__per_cpu_start);
+ elf_base = (unsigned long)&__per_cpu_start;
return this_cpu_base - elf_base;
}