summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/riscv64/riscv64/clock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/riscv64/riscv64/clock.c b/sys/arch/riscv64/riscv64/clock.c
index 75643f998f5..b1ddd387a40 100644
--- a/sys/arch/riscv64/riscv64/clock.c
+++ b/sys/arch/riscv64/riscv64/clock.c
@@ -1,4 +1,4 @@
-/* $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>
@@ -63,6 +63,9 @@ tb_get_timecount(struct timecounter *tc)
void
cpu_initclocks(void)
{
+ tb_timecounter.tc_frequency = tb_freq;
+ tc_init(&tb_timecounter);
+
tick_increment = tb_freq / hz;
stathz = 100;
@@ -77,9 +80,6 @@ cpu_initclocks(void)
evcount_attach(&stat_count, "stat", NULL);
cpu_startclock();
-
- tb_timecounter.tc_frequency = tb_freq;
- tc_init(&tb_timecounter);
}
void