artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
726716d
)
macppc: initialize stathz, profhz as on other platforms
author
cheloha
<cheloha@openbsd.org>
Fri, 27 Jan 2023 22:13:48 +0000
(22:13 +0000)
committer
cheloha
<cheloha@openbsd.org>
Fri, 27 Jan 2023 22:13:48 +0000
(22:13 +0000)
Don't hardcode stathz to 100 and profhz to 1000. Instead, set stathz
to hz and profhz to (stathz * 10). This is what we do on most other
platforms.
Link:
https://marc.info/?l=openbsd-tech&m=167479021815637&w=2
ok kettenis@
sys/arch/macppc/macppc/clock.c
patch
|
blob
|
history
diff --git
a/sys/arch/macppc/macppc/clock.c
b/sys/arch/macppc/macppc/clock.c
index
eb61a28
..
d8c30f1
100644
(file)
--- a/
sys/arch/macppc/macppc/clock.c
+++ b/
sys/arch/macppc/macppc/clock.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: clock.c,v 1.5
1 2022/11/29 00:58:05
cheloha Exp $ */
+/* $OpenBSD: clock.c,v 1.5
2 2023/01/27 22:13:48
cheloha Exp $ */
/* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */
/*
@@
-196,8
+196,8
@@
cpu_initclocks(void)
intrstate = ppc_intr_disable();
- stathz =
100
;
- profhz =
1000; /* must be a multiple of stathz */
+ stathz =
hz
;
+ profhz =
stathz * 10;
clockintr_init(CL_RNDSTAT);
dec_nsec_cycle_ratio = ticks_per_sec * (1ULL << 32) / 1000000000;