diff options
Diffstat (limited to 'include/kvm/arm_arch_timer.h')
-rw-r--r-- | include/kvm/arm_arch_timer.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h index b3f45a578344..e5966758c093 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 | ||
26 | struct arch_timer_kvm { | 26 | struct 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 | ||
36 | struct arch_timer_cpu { | 34 | struct 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 | ||
62 | int kvm_timer_hyp_init(void); | 57 | int kvm_timer_hyp_init(void); |
63 | void kvm_timer_enable(struct kvm *kvm); | 58 | void kvm_timer_enable(struct kvm *kvm); |
64 | void kvm_timer_init(struct kvm *kvm); | 59 | void kvm_timer_init(struct kvm *kvm); |
@@ -72,30 +67,6 @@ void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); | |||
72 | u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid); | 67 | u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid); |
73 | int kvm_arm_timer_set_reg(struct kvm_vcpu *, u64 regid, u64 value); | 68 | int kvm_arm_timer_set_reg(struct kvm_vcpu *, u64 regid, u64 value); |
74 | 69 | ||
75 | #else | 70 | bool kvm_timer_should_fire(struct kvm_vcpu *vcpu); |
76 | static inline int kvm_timer_hyp_init(void) | ||
77 | { | ||
78 | return 0; | ||
79 | }; | ||
80 | |||
81 | static inline void kvm_timer_enable(struct kvm *kvm) {} | ||
82 | static inline void kvm_timer_init(struct kvm *kvm) {} | ||
83 | static inline void kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu, | ||
84 | const struct kvm_irq_level *irq) {} | ||
85 | static inline void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu) {} | ||
86 | static inline void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) {} | ||
87 | static inline void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu) {} | ||
88 | static inline void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) {} | ||
89 | |||
90 | static inline int kvm_arm_timer_set_reg(struct kvm_vcpu *vcpu, u64 regid, u64 value) | ||
91 | { | ||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | static inline u64 kvm_arm_timer_get_reg(struct kvm_vcpu *vcpu, u64 regid) | ||
96 | { | ||
97 | return 0; | ||
98 | } | ||
99 | #endif | ||
100 | 71 | ||
101 | #endif | 72 | #endif |