Fix to 64 bits to hold all relevant values. Also update comment to
reflect that irq_overflow_left stores the ns beyond INT64_MAX until the
next overflow, this to account for the uint64_t/int64_t timer value
difference between RISCV/QEMU.
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <
20260520125406.28693-17-anjo@rev.ng>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
uint64_t mhpmcounter_val;
/* Snapshot value of a counter */
uint64_t mhpmcounter_prev;
- /* Value beyond UINT32_MAX/UINT64_MAX before overflow interrupt trigger */
- target_ulong irq_overflow_left;
+ /* Value beyond INT64_MAX before overflow interrupt trigger */
+ uint64_t irq_overflow_left;
} PMUCTRState;
typedef struct PMUFixedCtrState {