In the future, the clock interrupt code will need a real timecounter
to work correctly. Nudge the tc_init(9) call for tb_timecounter up
before cpu_startclock().
-/* $OpenBSD: clock.c,v 1.4 2022/08/09 04:49:08 cheloha Exp $ */
+/* $OpenBSD: clock.c,v 1.5 2022/09/08 03:09:40 cheloha Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
void
cpu_initclocks(void)
{
+ tb_timecounter.tc_frequency = tb_freq;
+ tc_init(&tb_timecounter);
+
tick_increment = tb_freq / hz;
stathz = 100;
evcount_attach(&stat_count, "stat", NULL);
cpu_startclock();
-
- tb_timecounter.tc_frequency = tb_freq;
- tc_init(&tb_timecounter);
}
void