summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc64
diff options
context:
space:
mode:
authorScott Soule Cheloha <cheloha@cvs.openbsd.org>2022-11-05 16:23:03 +0000
committerScott Soule Cheloha <cheloha@cvs.openbsd.org>2022-11-05 16:23:03 +0000
commit2549fc5310a09792bd3b1bade1b6a8421c39636e (patch)
tree3d346dd6e6a1770042de369f2c2c4aace53420d4 /sys/arch/powerpc64
parent5ff95ed31a93562f016fb4f4d9b1583b6dcc1bae (diff)
powerpc64: TimeBase: add userspace timecounting support
Tested by gkoehler@. ok gkoehler@
Diffstat (limited to 'sys/arch/powerpc64')
-rw-r--r--sys/arch/powerpc64/include/timetc.h4
-rw-r--r--sys/arch/powerpc64/powerpc64/clock.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/powerpc64/include/timetc.h b/sys/arch/powerpc64/include/timetc.h
index ec63af16d18..4567a49ada4 100644
--- a/sys/arch/powerpc64/include/timetc.h
+++ b/sys/arch/powerpc64/include/timetc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: timetc.h,v 1.1 2020/07/06 13:33:08 pirofti Exp $ */
+/* $OpenBSD: timetc.h,v 1.2 2022/11/05 16:23:02 cheloha Exp $ */
/*
* Copyright (c) 2020 Paul Irofti <paul@irofti.net>
*
@@ -18,6 +18,6 @@
#ifndef _MACHINE_TIMETC_H_
#define _MACHINE_TIMETC_H_
-#define TC_LAST 0
+#define TC_TB 1
#endif /* _MACHINE_TIMETC_H_ */
diff --git a/sys/arch/powerpc64/powerpc64/clock.c b/sys/arch/powerpc64/powerpc64/clock.c
index aef95e83dd8..20e81c62414 100644
--- a/sys/arch/powerpc64/powerpc64/clock.c
+++ b/sys/arch/powerpc64/powerpc64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.5 2022/08/11 17:15:21 cheloha Exp $ */
+/* $OpenBSD: clock.c,v 1.6 2022/11/05 16:23:02 cheloha Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
@@ -44,6 +44,7 @@ static struct timecounter tb_timecounter = {
.tc_name = "tb",
.tc_quality = 0,
.tc_priv = NULL,
+ .tc_user = TC_TB,
};
void cpu_startclock(void);