From dc2b4858ba26f04fdb413a66ad25635c2bfbe14f Mon Sep 17 00:00:00 2001 From: cheloha Date: Fri, 27 Jan 2023 22:13:48 +0000 Subject: [PATCH] macppc: initialize stathz, profhz as on other platforms 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/macppc/macppc/clock.c b/sys/arch/macppc/macppc/clock.c index eb61a28bd6f..d8c30f13609 100644 --- a/sys/arch/macppc/macppc/clock.c +++ b/sys/arch/macppc/macppc/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.51 2022/11/29 00:58:05 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.52 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; -- 2.20.1