From: cheloha Date: Fri, 27 Jan 2023 22:16:52 +0000 (+0000) Subject: dmtimer(4): initialize stathz, profhz as other drivers, platforms do X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4533a266c0712cc20b7fbbbf5f3e393ab8cd3a54;p=openbsd dmtimer(4): initialize stathz, profhz as other drivers, platforms do 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 in all other armv7 clock interrupt drivers and most other platforms. Link: https://marc.info/?l=openbsd-tech&m=167479021815637&w=2 ok kettenis@ --- diff --git a/sys/arch/armv7/omap/dmtimer.c b/sys/arch/armv7/omap/dmtimer.c index 33e47bbde56..7e0436b0ada 100644 --- a/sys/arch/armv7/omap/dmtimer.c +++ b/sys/arch/armv7/omap/dmtimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dmtimer.c,v 1.16 2023/01/17 02:32:07 cheloha Exp $ */ +/* $OpenBSD: dmtimer.c,v 1.17 2023/01/27 22:16:52 cheloha Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * Copyright (c) 2013 Raphael Graf @@ -230,8 +230,8 @@ dmtimer_cpu_initclocks(void) { struct dmtimer_softc *sc = dmtimer_cd.cd_devs[1]; - stathz = 100; - profhz = 1000; + stathz = hz; + profhz = stathz * 10; clockintr_init(CL_RNDSTAT); sc->sc_ticks_per_second = TIMER_FREQUENCY; /* 32768 */