Commit 3ae32adf authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Revert "mc146818rtc: fix timer interrupt reinjection"



This reverts commit b429de73, except
that the reversal of the outer "if (period)" is left in.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 0d074bf8
Loading
Loading
Loading
Loading
+33 −34
Original line number Diff line number Diff line
@@ -174,7 +174,6 @@ periodic_timer_update(RTCState *s, int64_t current_time, uint32_t old_period)
    int64_t cur_clock, next_irq_clock, lost_clock = 0;

    period = rtc_periodic_clock_ticks(s);

    if (!period) {
        s->irq_coalesced = 0;
        timer_del(s->periodic_timer);
@@ -197,6 +196,7 @@ periodic_timer_update(RTCState *s, int64_t current_time, uint32_t old_period)
        last_periodic_clock = next_periodic_clock - old_period;
        lost_clock = cur_clock - last_periodic_clock;
        assert(lost_clock >= 0);
    }

    /*
     * s->irq_coalesced can change for two reasons:
@@ -233,7 +233,6 @@ periodic_timer_update(RTCState *s, int64_t current_time, uint32_t old_period)
         */
        lost_clock = MIN(lost_clock, period);
    }
    }

    assert(lost_clock >= 0 && lost_clock <= period);