diff options
author | Avi Kivity <avi@redhat.com> | 2012-07-26 11:01:52 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-07-31 23:21:07 -0400 |
commit | 9d9d2239bdecd525ce3eb6cbfe4abb925c98208c (patch) | |
tree | 721bf8c076098c5aebb291de2af2186adab38378 /arch/x86/kvm/i8254.c | |
parent | 2a6eac9638a92b61de04bac4233d8ca665ae96af (diff) |
KVM: Simplify kvm_pit_timer
'timer_mode_mask' is unused
'tscdeadline' is unused
't_ops' only adds needless indirection
'vcpu' is unused
Remove.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8254.c')
-rw-r--r-- | arch/x86/kvm/i8254.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 1d8e75702d95..a9e187a5b199 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
@@ -272,17 +272,6 @@ static void destroy_pit_timer(struct kvm_pit *pit) | |||
272 | flush_kthread_work(&pit->expired); | 272 | flush_kthread_work(&pit->expired); |
273 | } | 273 | } |
274 | 274 | ||
275 | static bool kpit_is_periodic(struct kvm_pit_timer *ktimer) | ||
276 | { | ||
277 | struct kvm_kpit_state *ps = container_of(ktimer, struct kvm_kpit_state, | ||
278 | pit_timer); | ||
279 | return ps->is_periodic; | ||
280 | } | ||
281 | |||
282 | static struct kvm_pit_timer_ops kpit_ops = { | ||
283 | .is_periodic = kpit_is_periodic, | ||
284 | }; | ||
285 | |||
286 | static void pit_do_work(struct kthread_work *work) | 275 | static void pit_do_work(struct kthread_work *work) |
287 | { | 276 | { |
288 | struct kvm_pit *pit = container_of(work, struct kvm_pit, expired); | 277 | struct kvm_pit *pit = container_of(work, struct kvm_pit, expired); |
@@ -330,7 +319,7 @@ static enum hrtimer_restart pit_timer_fn(struct hrtimer *data) | |||
330 | queue_kthread_work(&pt->worker, &pt->expired); | 319 | queue_kthread_work(&pt->worker, &pt->expired); |
331 | } | 320 | } |
332 | 321 | ||
333 | if (ktimer->t_ops->is_periodic(ktimer)) { | 322 | if (pt->pit_state.is_periodic) { |
334 | hrtimer_add_expires_ns(&ktimer->timer, ktimer->period); | 323 | hrtimer_add_expires_ns(&ktimer->timer, ktimer->period); |
335 | return HRTIMER_RESTART; | 324 | return HRTIMER_RESTART; |
336 | } else | 325 | } else |
@@ -357,7 +346,6 @@ static void create_pit_timer(struct kvm *kvm, u32 val, int is_period) | |||
357 | ps->is_periodic = is_period; | 346 | ps->is_periodic = is_period; |
358 | 347 | ||
359 | pt->timer.function = pit_timer_fn; | 348 | pt->timer.function = pit_timer_fn; |
360 | pt->t_ops = &kpit_ops; | ||
361 | pt->kvm = ps->pit->kvm; | 349 | pt->kvm = ps->pit->kvm; |
362 | 350 | ||
363 | atomic_set(&pt->pending, 0); | 351 | atomic_set(&pt->pending, 0); |