Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f0f8830 authored by Marc Zyngier's avatar Marc Zyngier Committed by Christoffer Dall
Browse files

arm/arm64: KVM: Remove hyp_kern_va helper



hyp_kern_va is now completely unused, so let's remove it entirely.

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent cf7df13d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
#define __hyp_text __section(.hyp.text) notrace

#define kern_hyp_va(v) (v)
#define hyp_kern_va(v) (v)

#define __ACCESS_CP15(CRn, Op1, CRm, Op2)	\
	"mrc", "mcr", __stringify(p15, Op1, %0, CRn, CRm, Op2), u32
+0 −12
Original line number Diff line number Diff line
@@ -36,18 +36,6 @@ static inline unsigned long __kern_hyp_va(unsigned long v)

#define kern_hyp_va(v) (typeof(v))(__kern_hyp_va((unsigned long)(v)))

static inline unsigned long __hyp_kern_va(unsigned long v)
{
	u64 offset = PAGE_OFFSET - HYP_PAGE_OFFSET;
	asm volatile(ALTERNATIVE("add %0, %0, %1",
				 "nop",
				 ARM64_HAS_VIRT_HOST_EXTN)
		     : "+r" (v) : "r" (offset));
	return v;
}

#define hyp_kern_va(v) (typeof(v))(__hyp_kern_va((unsigned long)(v)))

#define read_sysreg_elx(r,nvh,vh)					\
	({								\
		u64 reg;						\