arch/risc-v/src/common/riscv_mtimer.c: Correct mtimecmp setting in riscv_mtimer_cancel

Set the compare register to maximum value, UINT64_MAX, which can be expected to be never reached

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
Jukka Laitinen 2025-03-11 22:42:24 +02:00 committed by Lup Yuen Lee
parent e398e4a4ff
commit 809de89608

View file

@ -362,7 +362,7 @@ static int riscv_mtimer_cancel(struct oneshot_lowerhalf_s *lower,
mtime = riscv_mtimer_get_mtime(priv);
riscv_mtimer_set_mtimecmp(priv, mtime + UINT64_MAX);
riscv_mtimer_set_mtimecmp(priv, UINT64_MAX);
nsec = (alarm - mtime) * NSEC_PER_SEC / priv->freq;
ts->tv_sec = nsec / NSEC_PER_SEC;