qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 06/11] hw/openrisc: Initialize timer time at startup


From: Richard Henderson
Subject: Re: [PATCH v3 06/11] hw/openrisc: Initialize timer time at startup
Date: Fri, 29 Jul 2022 16:42:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 7/29/22 16:01, Stafford Horne wrote:
The last_clk time was initialized at zero, this means when we calculate
the first delta we will calculate 0 vs current time which could cause
unnecessary hops.

This patch moves timer initialization to the cpu reset.  There are two
resets registered here:

  1. Per cpu timer mask (ttmr) reset.
  2. Global cpu timer (last_clk and ttcr) reset, attached to the first
     cpu only.

Signed-off-by: Stafford Horne<shorne@gmail.com>
---
Since v2:
  - Moved timer init from init to reset suggested by Richard

  hw/openrisc/cputimer.c | 22 +++++++++++++++++++++-
  1 file changed, 21 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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