> Date: Thu, 26 Jan 2023 21:29:29 -0600
> From: Scott Cheloha <[email protected]>
> 
> Almost every platform initializes stathz and profhz like this:
> 
>       stathz = hz;
>       profhz = stathz * 10;
> 
> This patch brings a few stragglers in line with everyone else.
> 
> This does not change stathz and profhz on the listed platforms: hz is
> 100 in every case.
> 
> ok?

Consistency is good!  ok kettenis@

> Index: macppc/macppc/clock.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/macppc/macppc/clock.c,v
> retrieving revision 1.51
> diff -u -p -r1.51 clock.c
> --- macppc/macppc/clock.c     29 Nov 2022 00:58:05 -0000      1.51
> +++ macppc/macppc/clock.c     27 Jan 2023 03:20:17 -0000
> @@ -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;
> Index: powerpc64/powerpc64/clock.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/powerpc64/powerpc64/clock.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 clock.c
> --- powerpc64/powerpc64/clock.c       29 Nov 2022 01:04:44 -0000      1.7
> +++ powerpc64/powerpc64/clock.c       27 Jan 2023 03:20:17 -0000
> @@ -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);
> Index: riscv64/riscv64/clock.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/riscv64/riscv64/clock.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 clock.c
> --- riscv64/riscv64/clock.c   3 Dec 2022 15:03:49 -0000       1.7
> +++ riscv64/riscv64/clock.c   27 Jan 2023 03:20:17 -0000
> @@ -92,8 +92,8 @@ cpu_initclocks(void)
>       timer_nsec_cycle_ratio = tb_freq * (1ULL << 32) / 1000000000;
>       timer_nsec_max = UINT64_MAX / timer_nsec_cycle_ratio;
>  
> -     stathz = 100;
> -     profhz = 1000; /* must be a multiple of stathz */
> +     stathz = hz;
> +     profhz = stathz * 10;
>       clockintr_init(CL_RNDSTAT);
>  
>       riscv_intc_intr_establish(IRQ_TIMER_SUPERVISOR, 0,
> Index: armv7/omap/dmtimer.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/armv7/omap/dmtimer.c,v
> retrieving revision 1.16
> diff -u -p -r1.16 dmtimer.c
> --- armv7/omap/dmtimer.c      17 Jan 2023 02:32:07 -0000      1.16
> +++ armv7/omap/dmtimer.c      27 Jan 2023 03:20:18 -0000
> @@ -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 */
> 
> 

Reply via email to