]> git.proxmox.com Git - qemu.git/blobdiff - hw/ppc/ppc_booke.c
PPC: BookE: Make FIT/WDT timers at best millisecond grained
[qemu.git] / hw / ppc / ppc_booke.c
index 56c4196735442cbdd96d4550729003d9cdc3d84b..b421620708eec9829382c280fa15befb25dbbdf2 100644 (file)
@@ -174,6 +174,12 @@ static void booke_update_fixed_timer(CPUPPCState         *env,
 
     if (*next == now) {
         (*next)++;
+    } else {
+        /*
+         * There's no point to fake any granularity that's more fine grained
+         * than milliseconds. Anything beyond that just overloads the system.
+         */
+        *next = MAX(*next, now + SCALE_MS);
     }
 
     /* Fire the next timer */