summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/include/timetc.h5
-rw-r--r--sys/arch/sparc64/sparc64/clock.c11
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/sparc64/include/timetc.h b/sys/arch/sparc64/include/timetc.h
index ec63af16d18..ac680ab4729 100644
--- a/sys/arch/sparc64/include/timetc.h
+++ b/sys/arch/sparc64/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 2020/07/08 09:20:28 kettenis Exp $ */
/*
* Copyright (c) 2020 Paul Irofti <paul@irofti.net>
*
@@ -18,6 +18,7 @@
#ifndef _MACHINE_TIMETC_H_
#define _MACHINE_TIMETC_H_
-#define TC_LAST 0
+#define TC_TICK 1
+#define TC_SYS_TICK 2
#endif /* _MACHINE_TIMETC_H_ */
diff --git a/sys/arch/sparc64/sparc64/clock.c b/sys/arch/sparc64/sparc64/clock.c
index fa3ff46718c..f8c43cd87c7 100644
--- a/sys/arch/sparc64/sparc64/clock.c
+++ b/sys/arch/sparc64/sparc64/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.62 2020/07/06 13:33:08 pirofti Exp $ */
+/* $OpenBSD: clock.c,v 1.63 2020/07/08 09:20:28 kettenis Exp $ */
/* $NetBSD: clock.c,v 1.41 2001/07/24 19:29:25 eeh Exp $ */
/*
@@ -109,13 +109,14 @@ struct cfdriver clock_cd = {
u_int tick_get_timecount(struct timecounter *);
struct timecounter tick_timecounter = {
- tick_get_timecount, NULL, ~0u, 0, "tick", 0, NULL, 0
+ tick_get_timecount, NULL, ~0u, 0, "tick", 0, NULL, TC_TICK
};
u_int sys_tick_get_timecount(struct timecounter *);
struct timecounter sys_tick_timecounter = {
- sys_tick_get_timecount, NULL, ~0u, 0, "sys_tick", 1000, NULL, 0
+ sys_tick_get_timecount, NULL, ~0u, 0, "sys_tick", 1000, NULL,
+ TC_SYS_TICK
};
/*
@@ -940,7 +941,7 @@ tick_get_timecount(struct timecounter *tc)
{
u_int64_t tick;
- __asm volatile("rd %%tick, %0" : "=r" (tick) :);
+ __asm volatile("rd %%tick, %0" : "=r" (tick));
return (tick & ~0u);
}
@@ -950,7 +951,7 @@ sys_tick_get_timecount(struct timecounter *tc)
{
u_int64_t tick;
- __asm volatile("rd %%sys_tick, %0" : "=r" (tick) :);
+ __asm volatile("rd %%sys_tick, %0" : "=r" (tick));
return (tick & ~0u);
}