]> git.proxmox.com Git - qemu.git/commitdiff
Sparc32: fix free-run timer
authorBlue Swirl <blauwirbel@gmail.com>
Sun, 24 Jan 2010 14:28:21 +0000 (14:28 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 24 Jan 2010 14:28:21 +0000 (14:28 +0000)
According to Sun4M System Architecture Manual chapter 5.3.2, a limit
of 0 will not generate interrupts.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/slavio_timer.c

index cd2cf5772b8016b7f6969fb6e1196e1fb4355027..ef36fe4c991dad4a2ef6c2c6c6fc2303dcd6317c 100644 (file)
@@ -128,7 +128,8 @@ static void slavio_timer_irq(void *opaque)
     slavio_timer_get_out(t);
     DPRINTF("callback: count %x%08x\n", t->counthigh, t->count);
     t->reached = TIMER_REACHED;
-    if (!slavio_timer_is_user(tc)) {
+    /* there is no interrupt if user timer or free-run */
+    if (!slavio_timer_is_user(tc) && t->limit != 0) {
         qemu_irq_raise(t->irq);
     }
 }