From: cheloha Date: Fri, 27 Jan 2023 22:14:43 +0000 (+0000) Subject: powerpc64: initialize stathz, profhz as on other platforms X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4cd354c5663fb2920aedfa94b325562702286437;p=openbsd powerpc64: 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@ --- diff --git a/sys/arch/powerpc64/powerpc64/clock.c b/sys/arch/powerpc64/powerpc64/clock.c index 87ec0650067..beff9e1982a 100644 --- a/sys/arch/powerpc64/powerpc64/clock.c +++ b/sys/arch/powerpc64/powerpc64/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.7 2022/11/29 01:04:44 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.8 2023/01/27 22:14:43 cheloha Exp $ */ /* * Copyright (c) 2020 Mark Kettenis @@ -98,8 +98,8 @@ cpu_initclocks(void) dec_nsec_cycle_ratio = tb_freq * (1ULL << 32) / 1000000000; dec_nsec_max = UINT64_MAX / dec_nsec_cycle_ratio; - stathz = 100; - profhz = 1000; /* must be a multiple of stathz */ + stathz = hz; + profhz = stathz * 10; clockintr_init(CL_RNDSTAT); evcount_attach(&clock_count, "clock", NULL);