summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/kvm_hyp.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-01-28 14:48:42 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2016-02-29 18:34:19 +0000
commit68130cb5db09cb8a285a59f70ac72d2bfa8685fd (patch)
treec4b52cdd9cd1f58d4efa90fc6ec858134d561c7b /arch/arm/include/asm/kvm_hyp.h
parentb5fa5d3e628bd301b89937ee4f7814297d8e2e31 (diff)
downloadlinux-68130cb5db09cb8a285a59f70ac72d2bfa8685fd.tar.bz2
ARM: KVM: Use common version of timer-sr.c
Using the common HYP timer code is a bit more tricky, since we use system register names. Nothing a set of macros cannot work around... Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include/asm/kvm_hyp.h')
-rw-r--r--arch/arm/include/asm/kvm_hyp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_hyp.h b/arch/arm/include/asm/kvm_hyp.h
index ff6de6a3af2d..f0e860761380 100644
--- a/arch/arm/include/asm/kvm_hyp.h
+++ b/arch/arm/include/asm/kvm_hyp.h
@@ -104,6 +104,15 @@
#define VFP_FPEXC __ACCESS_VFP(FPEXC)
+/* AArch64 compatibility macros, only for the timer so far */
+#define read_sysreg_el0(r) read_sysreg(r##_el0)
+#define write_sysreg_el0(v, r) write_sysreg(v, r##_el0)
+
+#define cntv_ctl_el0 CNTV_CTL
+#define cntv_cval_el0 CNTV_CVAL
+#define cntvoff_el2 CNTVOFF
+#define cnthctl_el2 CNTHCTL
+
void __timer_save_state(struct kvm_vcpu *vcpu);
void __timer_restore_state(struct kvm_vcpu *vcpu);