mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
KVM: i8254: move PIT timer function initialization
We can do it just once. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
34f3941c42
commit
ab4c14763b
1 changed files with 1 additions and 2 deletions
|
@ -348,8 +348,6 @@ static void create_pit_timer(struct kvm_pit *pit, u32 val, int is_period)
|
|||
ps->period = interval;
|
||||
ps->is_periodic = is_period;
|
||||
|
||||
ps->timer.function = pit_timer_fn;
|
||||
|
||||
kvm_pit_reset_reinject(pit);
|
||||
|
||||
/*
|
||||
|
@ -702,6 +700,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
|
|||
|
||||
pit_state = &pit->pit_state;
|
||||
hrtimer_init(&pit_state->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
pit_state->timer.function = pit_timer_fn;
|
||||
|
||||
pit_state->irq_ack_notifier.gsi = 0;
|
||||
pit_state->irq_ack_notifier.irq_acked = kvm_pit_ack_irq;
|
||||
|
|
Loading…
Reference in a new issue