Re: MTIME update frequency


Jonathan Behrens <behrensj@...>
 

Given that the device-tree mechanism is apparently already in place, it honestly probably wouldn't be a big deal to just formalize that and not require any particular mtime resolution. I still prefer the simplicity of always doing 10ns, but don't feel that strongly about it.

Jonathan


On Tue, Nov 16, 2021 at 3:13 PM Vedvyas Shanbhogue via lists.riscv.org <ved=rivosinc.com@...> wrote:
On Tue, Nov 16, 2021 at 11:31:44AM -0800, Greg Favor wrote:
>On Tue, Nov 16, 2021 at 10:50 AM Jonathan Behrens <behrensj@...> wrote:
>
>To Ved's last post, it is the timebase resolution (and not update
>frequency) that determines the conversion from time to ticks.
>
>So the question is whether there should be a fixed resolution so that
>platform-compliant software can simply do a fixed absolute time to
>mtime/time conversion, and conversely how much or little change to Linux
>would be required to support a discoverable variable conversion?
>
Linux discovers the timebase from device-tree and does not assume a fixed frequency:
https://elixir.bootlin.com/linux/latest/source/arch/riscv/kernel/time.c#L14

regards
ved





Join tech-unixplatformspec@lists.riscv.org to automatically receive all group messages.