[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 1/4] xen/riscv: introduce preinit_xen_time()




On 3/17/25 4:24 PM, Jan Beulich wrote:
On 11.03.2025 17:19, Oleksii Kurochko wrote:
--- /dev/null
+++ b/xen/arch/riscv/time.c
@@ -0,0 +1,38 @@
+#include <xen/device_tree.h>
+#include <xen/init.h>
+#include <xen/lib.h>
+#include <xen/sections.h>
+
+unsigned long __ro_after_init cpu_khz; /* CPU clock frequency in kHz. */
+unsigned long __read_mostly boot_count;
Why not also __ro_after_init? And what is this variable actually needed
for? Common code doesn't use it, so a better name (describing what it
really holds) might be desirable, even if this then means not being in
sync with Arm code.
To calculate more accurate amount of time since boot.
I think it can be __ro_after_init as it is going to be initialized once.


Furthermore, I can't spot a declaration of this variable. Was it meant
to be static?
It is going to be used for vtimer functionality and in repogram_timer()
so it can't be static.

I will add a declaration to asm/time.h:
```
  /* Counter value at boot time */
  extern uint64_t boot_count;
```

Thanks.

~ Oleksii

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.