Skip to content

Commit 084b5a8

Browse files
author
Marc Zyngier
committed
arm64: KVM: Kill hyp_alternate_select()
hyp_alternate_select() is now completely unused. Goodbye. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Christoffer Dall <[email protected]> Reviewed-by: Andrew Jones <[email protected]>
1 parent aa979fa commit 084b5a8

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

arch/arm64/include/asm/kvm_hyp.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,30 +47,6 @@
4747
#define read_sysreg_el2(r) read_sysreg_elx(r, _EL2, _EL1)
4848
#define write_sysreg_el2(v,r) write_sysreg_elx(v, r, _EL2, _EL1)
4949

50-
/**
51-
* hyp_alternate_select - Generates patchable code sequences that are
52-
* used to switch between two implementations of a function, depending
53-
* on the availability of a feature.
54-
*
55-
* @fname: a symbol name that will be defined as a function returning a
56-
* function pointer whose type will match @orig and @alt
57-
* @orig: A pointer to the default function, as returned by @fname when
58-
* @cond doesn't hold
59-
* @alt: A pointer to the alternate function, as returned by @fname
60-
* when @cond holds
61-
* @cond: a CPU feature (as described in asm/cpufeature.h)
62-
*/
63-
#define hyp_alternate_select(fname, orig, alt, cond) \
64-
typeof(orig) * __hyp_text fname(void) \
65-
{ \
66-
typeof(alt) *val = orig; \
67-
asm volatile(ALTERNATIVE("nop \n", \
68-
"mov %0, %1 \n", \
69-
cond) \
70-
: "+r" (val) : "r" (alt)); \
71-
return val; \
72-
}
73-
7450
int __vgic_v2_perform_cpuif_access(struct kvm_vcpu *vcpu);
7551

7652
void __vgic_v3_save_state(struct kvm_vcpu *vcpu);

0 commit comments

Comments
 (0)