[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1456955813-1560-15-git-send-email-radimkrcmar@hpx.cz>
Date: Wed, 2 Mar 2016 22:56:51 +0100
From: Radim Krčmář <radimkrcmar@....cz>
To: linux-kernel@...r.kernel.org
Cc: kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
Yuki Shibuya <shibuya.yk@...s.nec.co.jp>
Subject: [PATCH v3 14/16] KVM: x86: move PIT timer function initialization
From: Radim Krčmář <rkrcmar@...hat.com>
We can do it just once.
Reviewed-by: Paolo Bonzini <pbonzini@...hat.com>
Signed-off-by: Radim Krčmář <rkrcmar@...hat.com>
---
arch/x86/kvm/i8254.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 964902b33eed..68af4445d51d 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -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;
--
2.7.2
Powered by blists - more mailing lists