]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/arm64/include/asm/kvm_hyp.h
KVM: arm64: Define our own swab32() to avoid a uapi static inline
[linux.git] / arch / arm64 / include / asm / kvm_hyp.h
index 97f21cc666579c350ca625f26e4e84012bd77096..5fde137b51505fdba14514f1febb22052056aefd 100644 (file)
 #define read_sysreg_el2(r)     read_sysreg_elx(r, _EL2, _EL1)
 #define write_sysreg_el2(v,r)  write_sysreg_elx(v, r, _EL2, _EL1)
 
+/*
+ * Without an __arch_swab32(), we fall back to ___constant_swab32(), but the
+ * static inline can allow the compiler to out-of-line this. KVM always wants
+ * the macro version as its always inlined.
+ */
+#define __kvm_swab32(x)        ___constant_swab32(x)
+
 int __vgic_v2_perform_cpuif_access(struct kvm_vcpu *vcpu);
 
 void __vgic_v3_save_state(struct kvm_vcpu *vcpu);