aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm/arm_arch_timer.h
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2015-03-11 09:21:31 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2015-03-12 10:15:27 -0400
commit662d9715840aef44dcb573b0f9fab9e8319c868a (patch)
tree8c2800bd7b58972618fa820a57b03cdfca01d1c9 /include/kvm/arm_arch_timer.h
parent69ff5c619cb350f43fbab2a491b4b66de7e96959 (diff)
arm/arm64: KVM: Kill CONFIG_KVM_ARM_{VGIC,TIMER}
We can definitely decide at run-time whether to use the GIC and timers or not, and the extra code and data structures that we allocate space for is really negligable with this config option, so I don't think it's worth the extra complexity of always having to define stub static inlines. The !CONFIG_KVM_ARM_VGIC/TIMER case is pretty much an untested code path anyway, so we're better off just getting rid of it. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/kvm/arm_arch_timer.h')
-rw-r--r--include/kvm/arm_arch_timer.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h
index b3f45a578344..a74e4c2bf188 100644
--- a/include/kvm/arm_arch_timer.h
+++ b/include/kvm/arm_arch_timer.h
@@ -24,17 +24,14 @@
24#include <linux/workqueue.h> 24#include <linux/workqueue.h>
25 25
26struct arch_timer_kvm { 26struct arch_timer_kvm {
27#ifdef CONFIG_KVM_ARM_TIMER
28 /* Is the timer enabled */ 27 /* Is the timer enabled */
29 bool enabled; 28 bool enabled;
30 29
31 /* Virtual offset */ 30 /* Virtual offset */
32 cycle_t cntvoff; 31 cycle_t cntvoff;
33#endif
34}; 32};
35 33
36struct arch_timer_cpu { 34struct arch_timer_cpu {
37#ifdef CONFIG_KVM_ARM_TIMER
38 /* Registers: control register, timer value */ 35 /* Registers: control register, timer value */
39 u32 cntv_ctl; /* Saved/restored */ 36 u32 cntv_ctl; /* Saved/restored */
40 cycle_t cntv_cval; /* Saved/restored */ 37 cycle_t cntv_cval; /* Saved/restored */
@@ -55,10 +52,8 @@ struct arch_timer_cpu {
55 52
56 /* Timer IRQ */ 53 /* Timer IRQ */
57 const struct kvm_irq_level *irq; 54 const struct kvm_irq_level *irq;
58#endif
59}; 55};
60 56
61#ifdef CONFIG_KVM_ARM_TIMER
62int kvm_timer_hyp_init(void); 57int kvm_timer_hyp_init(void);
63void kvm_timer_enable(struct kvm *kvm); 58void kvm_timer_enable(struct kvm *kvm);
64void kvm_timer_init(struct kvm *kvm); 59void kvm_timer_init(struct kvm *kvm);
@@ -72,30 +67,4 @@ void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu);
72u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid); 67u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid);
73int kvm_arm_timer_set_reg(struct kvm_vcpu *, u64 regid, u64 value); 68int kvm_arm_timer_set_reg(struct kvm_vcpu *, u64 regid, u64 value);
74 69
75#else
76static inline int kvm_timer_hyp_init(void)
77{
78 return 0;
79};
80
81static inline void kvm_timer_enable(struct kvm *kvm) {}
82static inline void kvm_timer_init(struct kvm *kvm) {}
83static inline void kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu,
84 const struct kvm_irq_level *irq) {}
85static inline void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu) {}
86static inline void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) {}
87static inline void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) {}
88static inline void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) {}
89
90static inline int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value)
91{
92 return 0;
93}
94
95static inline u64 kvm_arm_timer_get_reg(struct kvm_vcpu *vcpu, u64 regid)
96{
97 return 0;
98}
99#endif
100
101#endif 70#endif