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

Re: [PATCH v3 1/3] xen/riscv: implement udelay()



On Fri, 04 Dec 2026 03:03:13 +0000, Anandu Padinhare 
<Anandu.Padinhare@xxxxxxxxxxxxxx> wrote:
> udelay() is still a stub that hits BUG_ON(), so mdelay() can't be used
> on RISC-V, for example to honour the delay in machine_restart().
> 
> Implement udelay() by busy-waiting on the time CSR, as Linux's RISC-V
> __delay() does. Convert the delay to timer ticks once, multiplying
> before dividing and rounding up so that short delays aren't cut to zero
> ticks, then spin until that many ticks have passed.
> 
> [...]

Reviewed-by: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>

-- 
Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>



 


Rackspace

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