[patch 7/8] KVM: PIT: removed unused code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: kvm-new/arch/x86/kvm/i8254.c
===================================================================
--- kvm-new.orig/arch/x86/kvm/i8254.c
+++ kvm-new/arch/x86/kvm/i8254.c
@@ -228,10 +228,7 @@ static void kvm_pit_ack_irq(struct kvm_i
 {
 	struct kvm_kpit_state *ps = container_of(kian, struct kvm_kpit_state,
 						 irq_ack_notifier);
-	spin_lock(&ps->inject_lock);
 	kvm_timer_ack(&ps->pit_timer);
-	ps->irq_ack = 1;
-	spin_unlock(&ps->inject_lock);
 }
 
 static void destroy_pit_timer(struct kvm_timer *pt)
@@ -252,7 +249,6 @@ static void create_pit_timer(struct kvm_
 	/* TODO The new value only affected after the retriggered */
 	kvm_timer_cancel(pt);
 
-	ps->irq_ack = 1;
 	kvm_timer_start(pt, interval, is_period);
 }
 
@@ -516,17 +512,14 @@ static void kvm_pit_reset(struct kvm_pit
 	mutex_unlock(&pit->pit_state.lock);
 
 	kvm_timer_reset(&pit->pit_state.pit_timer);
-	pit->pit_state.irq_ack = 1;
 }
 
 static void pit_mask_notifer(struct kvm_irq_mask_notifier *kimn, bool mask)
 {
 	struct kvm_pit *pit = container_of(kimn, struct kvm_pit, mask_notifier);
 
-	if (!mask) {
+	if (!mask)
 		kvm_timer_reset(&pit->pit_state.pit_timer);
-		pit->pit_state.irq_ack = 1;
-	}
 }
 
 static const struct kvm_io_device_ops pit_dev_ops = {
@@ -587,7 +580,6 @@ struct kvm_pit *kvm_create_pit(struct kv
 
 	mutex_init(&pit->pit_state.lock);
 	mutex_lock(&pit->pit_state.lock);
-	spin_lock_init(&pit->pit_state.inject_lock);
 
 	kvm->arch.vpit = pit;
 	pit->kvm = kvm;
Index: kvm-new/arch/x86/kvm/i8254.h
===================================================================
--- kvm-new.orig/arch/x86/kvm/i8254.h
+++ kvm-new/arch/x86/kvm/i8254.h
@@ -25,8 +25,6 @@ struct kvm_kpit_state {
 	u32    speaker_data_on;
 	struct mutex lock;
 	struct kvm_pit *pit;
-	spinlock_t inject_lock;
-	unsigned long irq_ack;
 	struct kvm_irq_ack_notifier irq_ack_notifier;
 };
 

-- 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux