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:
parent
e398e4a4ff
commit
809de89608
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue