On 11.12.2023 13:23, Julien Grall wrote:
> From: Julien Grall <jgr...@amazon.com>
> 
> Currently timer_irq_works() will wait the full 100ms before checking
> that pit0_ticks has been incremented at least 4 times.
> 
> However, the bulk of the BIOS/platform should not have a buggy timer.
> So waiting for the full 100ms is a bit harsh.
> 
> Rework the logic to only wait until 100ms passed or we saw more than
> 4 ticks. So now, in the good case, this will reduce the wait time
> to ~50ms.

Isn't this more like 40ms (4 ticks 10ms apart)? And really somewhere
between 30 and 40, because the first tick has already partly elapsed?

> Take the opportunity to change the prototype of timer_irq_works() to
> return a bool rather than int (which was already acting as a bool because
> only 0/1 could be returned).
> 
> Signed-off-by: Julien Grall <jgr...@amazon.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>

Jan

Reply via email to