On 28.03.2025 17:58, Oleksii Kurochko wrote: > preinit_xen_time() does two things: > 1. Parse timebase-frequency properpy of /cpus node to initialize cpu_khz > variable. > 2. Initialize boot_clock_cycles with the current time counter value to > have starting point for Xen. > > timebase-frequency is read as a uint32_t because it is unlikely that the > timer will run at more than 4 GHz. If timebase-frequency exceeds 4 GHz, > a panic() is triggered, since dt_property_read_u32() will return 0 if > the size of the timebase-frequency property is greater than the size of > the output variable. > > Signed-off-by: Oleksii Kurochko <oleksii.kuroc...@gmail.com>
Acked-by: Jan Beulich <jbeul...@suse.com> However, ... > --- a/xen/arch/riscv/include/asm/time.h > +++ b/xen/arch/riscv/include/asm/time.h > @@ -3,8 +3,12 @@ > #define ASM__RISCV__TIME_H > > #include <xen/bug.h> > +#include <xen/types.h> > #include <asm/csr.h> > > +/* Clock cycles count at Xen startup */ > +extern uint64_t boot_clock_cycles; ... this should use cycles_t, just that for this cycles_t first needs changing. Hence why this wants to be another separate change imo. I.e. I'll put this one in as is. Jan