Skip to contentSkip to conversation

hw/timer: Revert "hpet: inverse polarity when pin above ISA_NUM_IRQS"

PATCH New Bill Paul 1 participant 1 message Apr 5, 2016

lore
Share & tools
lore

Bill Paul

author
#0 lore raw

PATCH 1/1 hw/timer: Revert "hpet: inverse polarity when pin above ISA_NUM_IRQS"

This reverts commit 0d63b2dd31464cfccc80bbeedc24e3863fe4c895.

This change was originally intended to correct the HPET behavior in conjunction with Linux, however the behavior that it actually creates doesn't match what happens with real hardware, the logic doesn't seem compatible with the ioapic.c implementation either.

CC Paolo Bonzini <[email protected]>
CC Richard Henderson <[email protected]>
CC Eduardo Habkost <[email protected]>
---
 hw/timer/hpet.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
hw/timer/hpet.c +2 -12
index 78140e6..a2c18b3 100644
@@ -201,12 +201,7 @@ static void update_irq(struct HPETTimer *timer, int set)
     if (!set || !timer_enabled(timer) || !hpet_enabled(timer->state)) {
         s->isr &= ~mask;
         if (!timer_fsb_route(timer)) {
-            /* fold the ICH PIRQ# pin's internal inversion logic into hpet */
-            if (route >= ISA_NUM_IRQS) {
-                qemu_irq_raise(s->irqs[route]);
-            } else {
-                qemu_irq_lower(s->irqs[route]);
-            }
+            qemu_irq_lower(s->irqs[route]);
         }
     } else if (timer_fsb_route(timer)) {
         address_space_stl_le(&address_space_memory, timer->fsb >> 32,
@@ -214,12 +209,7 @@ static void update_irq(struct HPETTimer *timer, int set)
                              NULL);
     } else if (timer->config & HPET_TN_TYPE_LEVEL) {
         s->isr |= mask;
-        /* fold the ICH PIRQ# pin's internal inversion logic into hpet */
-        if (route >= ISA_NUM_IRQS) {
-            qemu_irq_lower(s->irqs[route]);
-        } else {
-            qemu_irq_raise(s->irqs[route]);
-        }
+        qemu_irq_raise(s->irqs[route]);
     } else {
         s->isr &= ~mask;
         qemu_irq_pulse(s->irqs[route]);
Signature · 1 line
2.4.6