Re: [PATCH] target/riscv: Stop timer with infinite timecmp

2024-09-02 Thread Alistair Francis
On Thu, Aug 29, 2024 at 6:40 PM Andrew Jones wrote: > > While the spec doesn't state it, setting timecmp to UINT64_MAX is > another way to stop a timer, as it's considered setting the next > timer event to occur at infinity. And, even if the time CSR does > eventually reach UINT64_MAX, the very ne

Re: [PATCH] target/riscv: Stop timer with infinite timecmp

2024-08-30 Thread Vladimir Isaev
30.08.2024 17:50, Andrew Jones пишет: > On Fri, Aug 30, 2024 at 02:05:05PM GMT, Vladimir Isaev wrote: >> Hi Andrew, >> >> 29.08.2024 11:40, Andrew Jones wrote: >>> While the spec doesn't state it, setting timecmp to UINT64_MAX is >>> another way to stop a timer, as it's considered setting the ne

Re: [PATCH] target/riscv: Stop timer with infinite timecmp

2024-08-30 Thread Andrew Jones
On Fri, Aug 30, 2024 at 02:05:05PM GMT, Vladimir Isaev wrote: > Hi Andrew, > > 29.08.2024 11:40, Andrew Jones wrote: > > While the spec doesn't state it, setting timecmp to UINT64_MAX is > > another way to stop a timer, as it's considered setting the next > > timer event to occur at infinity. >

Re: [PATCH] target/riscv: Stop timer with infinite timecmp

2024-08-30 Thread Vladimir Isaev
Hi Andrew, 29.08.2024 11:40, Andrew Jones wrote: > While the spec doesn't state it, setting timecmp to UINT64_MAX is > another way to stop a timer, as it's considered setting the next > timer event to occur at infinity. I think this should be explicitly stated in the spec, since some software ma

Re: [PATCH] target/riscv: Stop timer with infinite timecmp

2024-08-29 Thread Alistair Francis
On Thu, Aug 29, 2024 at 6:40 PM Andrew Jones wrote: > > While the spec doesn't state it, setting timecmp to UINT64_MAX is > another way to stop a timer, as it's considered setting the next > timer event to occur at infinity. And, even if the time CSR does > eventually reach UINT64_MAX, the very ne

[PATCH] target/riscv: Stop timer with infinite timecmp

2024-08-29 Thread Andrew Jones
While the spec doesn't state it, setting timecmp to UINT64_MAX is another way to stop a timer, as it's considered setting the next timer event to occur at infinity. And, even if the time CSR does eventually reach UINT64_MAX, the very next tick will bring it back to zero, once again less than timecm