[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 1/7] i8254: Do not raise IRQ level on reset
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH v4 1/7] i8254: Do not raise IRQ level on reset |
Date: |
Wed, 1 Feb 2012 20:31:37 +0100 |
Avoid changing the IRQ level to high on reset as it may trigger spurious
events. Instead, open-code the effects of pit_load_count(0) in the reset
handler.
Signed-off-by: Jan Kiszka <address@hidden>
---
hw/i8254.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/hw/i8254.c b/hw/i8254.c
index 522fed8..bfb303e 100644
--- a/hw/i8254.c
+++ b/hw/i8254.c
@@ -481,7 +481,13 @@ static void pit_reset(DeviceState *dev)
s = &pit->channels[i];
s->mode = 3;
s->gate = (i != 2);
- pit_load_count(s, 0);
+ s->count_load_time = qemu_get_clock_ns(vm_clock);
+ s->count = 0x10000;
+ if (i == 0) {
+ s->next_transition_time =
+ pit_get_next_transition_time(s, s->count_load_time);
+ qemu_mod_timer(s->irq_timer, s->next_transition_time);
+ }
}
}
--
1.7.3.4
- [Qemu-devel] [PATCH v4 0/7] pit, hpet, pcspk: fixes & preparation for KVM, Jan Kiszka, 2012/02/01
- [Qemu-devel] [PATCH v4 3/7] i8254: Factor out interface header, Jan Kiszka, 2012/02/01
- [Qemu-devel] [PATCH v4 6/7] pcspk: Convert to qdev, Jan Kiszka, 2012/02/01
- [Qemu-devel] [PATCH v4 2/7] hpet: Save/restore cached RTC IRQ level, Jan Kiszka, 2012/02/01
- [Qemu-devel] [PATCH v4 5/7] i8254: Rework & fix interaction with HPET in legacy mode, Jan Kiszka, 2012/02/01
- [Qemu-devel] [PATCH v4 4/7] i8254: Pass alternative IRQ output object on initialization, Jan Kiszka, 2012/02/01
- [Qemu-devel] [PATCH v4 1/7] i8254: Do not raise IRQ level on reset,
Jan Kiszka <=
- [Qemu-devel] [PATCH v4 7/7] i8254: Factor out pit_get_channel_info, Jan Kiszka, 2012/02/01
- Re: [Qemu-devel] [PATCH v4 0/7] pit, hpet, pcspk: fixes & preparation for KVM, Anthony Liguori, 2012/02/17