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

2025-03-25 Thread Jan Beulich
On 25.03.2025 12:23, Oleksii Kurochko wrote: > > On 3/17/25 4:24 PM, Jan Beulich wrote: >> On 11.03.2025 17:19, Oleksii Kurochko wrote: >> +static __initdata struct dt_device_node *timer; >> + >> +/* Set up the timer on the boot CPU (early init function) */ >> +static void __init preinit_dt_xen_ti

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

2025-03-24 Thread Jan Beulich
On 24.03.2025 16:29, Oleksii Kurochko wrote: > > On 3/20/25 8:36 AM, Jan Beulich wrote: >> On 19.03.2025 18:29, Oleksii Kurochko wrote: >>> 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 +

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

2025-03-24 Thread Oleksii Kurochko
On 3/20/25 8:36 AM, Jan Beulich wrote: On 19.03.2025 18:29, Oleksii Kurochko wrote: 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 +#include +#include +#include + +unsigned long __ro_

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

2025-03-20 Thread Jan Beulich
On 19.03.2025 18:29, Oleksii Kurochko wrote: > > 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 >>> +#include >>> +#include >>> +#include >>> + >>> +unsigned long __ro_a

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

2025-03-19 Thread Oleksii Kurochko
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 +#include +#include +#include + +unsigned long __ro_after_init cpu_khz; /* CPU clock frequency in kHz. */ +unsigned long __read_mostly boo

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

2025-03-17 Thread Andrew Cooper
On 11/03/2025 4:19 pm, Oleksii Kurochko wrote: > diff --git a/xen/arch/riscv/time.c b/xen/arch/riscv/time.c > new file mode 100644 > index 00..210df6ba28 > --- /dev/null > +++ b/xen/arch/riscv/time.c > @@ -0,0 +1,38 @@ > +#include SPDX tag. ~Andrew

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

2025-03-17 Thread Jan Beulich
On 11.03.2025 17:19, Oleksii Kurochko wrote: > --- /dev/null > +++ b/xen/arch/riscv/time.c > @@ -0,0 +1,38 @@ > +#include > +#include > +#include > +#include > + > +unsigned long __ro_after_init cpu_khz; /* CPU clock frequency in kHz. */ > +unsigned long __read_mostly boot_count; Why not also

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

2025-03-11 Thread Oleksii Kurochko
preinit_xen_time() does two things: 1. Parse timebase-frequency properpy of /cpus node to initialize cpu_khz variable. 2. Initialize boot_count with the current time counter value. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/Makefile | 1 + xen/arch/riscv/include/asm/time.h