summary refs log tree commit diff stats
path: root/linux-user/sparc/cpu_loop.c
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2022-06-15 08:40:16 +0900
committerStafford Horne <shorne@gmail.com>2022-09-04 07:02:57 +0100
commit557e37071d4d4e6de577f5a4dfb012a6a733f319 (patch)
tree48fa8f0a9eb89b08f59dd094a39b8e354544148e /linux-user/sparc/cpu_loop.c
parent40fef82c4e7ea723b52eb3d2a0c4a46189f1ad44 (diff)
downloadfocaccia-qemu-557e37071d4d4e6de577f5a4dfb012a6a733f319.tar.gz
focaccia-qemu-557e37071d4d4e6de577f5a4dfb012a6a733f319.zip
hw/openrisc: Initialize timer time at startup
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.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'linux-user/sparc/cpu_loop.c')
0 files changed, 0 insertions, 0 deletions