qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 14/20] arm: add Faraday FTRTC011 RTC timer su


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH v2 14/20] arm: add Faraday FTRTC011 RTC timer support
Date: Fri, 25 Jan 2013 23:49:39 +0000
User-agent: KMail/1.13.7 (Linux/3.7-trunk-amd64; KDE/4.8.4; x86_64; ; )

> +    qemu_mod_timer(s->qtimer,
> +            qemu_get_clock_ns(vm_clock) + get_ticks_per_sec());

This will not work reliably.  You can not rely on timers triggering promptly.  
Plus you're loosing the time taken to execute the callback every tick.

Additionally you can calculate values on demand, and only trigger a timer tick 
when an interrupt is actually enabled.  You don't need high precision, so use 
timer_ms rather than timer_ns.

Paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]