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.49 2022/07/24 00:28:09 cheloha Exp $ */
+/* $OpenBSD: clock.c,v 1.50 2022/09/08 03:06:33 cheloha Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
#endif
}
+ tb_timecounter.tc_frequency = ticks_per_sec;
+ tc_init(&tb_timecounter);
+
rtc_todr.todr_gettime = rtc_gettime;
rtc_todr.todr_settime = rtc_settime;
todr_handle = &rtc_todr;
cpu_startclock();
- tb_timecounter.tc_frequency = ticks_per_sec;
- tc_init(&tb_timecounter);
ppc_intr_enable(intrstate);
}