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<sho...@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.hender...@linaro.org>

r~

Reply via email to