OpenBSD cvs log

created 2023-03-08T14:14:40Z
begin 2023-03-03T00:00:00Z
end 2023-03-04T00:00:00Z
path src/sys
commits 1

date 2023-03-03T20:16:44Z
author cheloha
files src/sys/conf/param.c log diff annotate
src/sys/kern/kern_clock.c log diff annotate
src/sys/sys/kernel.h log diff annotate
message initclocks: don't reinitialize ticks, jiffies at runtime

Various drivers use ticks/jiffies before initclocks(). It isn't
generally safe to reinitialize them at runtime. Hoist the conditional
definition of HZ from param.c into sys/kernel.h so we can see it from
kern_clock.c and statically initialize ticks/jiffies to the desired
offset.

With this change, timeouts scheduled before initclocks() do not all
fire immediately during the first softclock().

With input from kettenis@.

Link: https://marc.info/?l=openbsd-tech&m=167753870803378&w=2