diff --git a/sys/i386/i386/geode.c b/sys/i386/i386/geode.c --- a/sys/i386/i386/geode.c +++ b/sys/i386/i386/geode.c @@ -291,7 +291,7 @@ tc_init(&geode_timecounter); EVENTHANDLER_REGISTER(watchdog_list, geode_watchdog, NULL, 0); - set_cputicker(geode_cputicks, 27000000, 0); + set_cputicker(geode_cputicks, 27000000, false); } break; case 0x0510100b: diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -2035,7 +2035,7 @@ /* Cpu tick handling -------------------------------------------------*/ -static int cpu_tick_variable; +static bool cpu_tick_variable; static uint64_t cpu_tick_frequency; DPCPU_DEFINE_STATIC(uint64_t, tc_cpu_ticks_base); @@ -2128,14 +2128,14 @@ } void -set_cputicker(cpu_tick_f *func, uint64_t freq, unsigned var) +set_cputicker(cpu_tick_f *func, uint64_t freq, bool isvariable) { if (func == NULL) { cpu_ticks = tc_cpu_ticks; } else { cpu_tick_frequency = freq; - cpu_tick_variable = var; + cpu_tick_variable = isvariable; cpu_ticks = func; } } diff --git a/sys/powerpc/powerpc/clock.c b/sys/powerpc/powerpc/clock.c --- a/sys/powerpc/powerpc/clock.c +++ b/sys/powerpc/powerpc/clock.c @@ -190,7 +190,7 @@ ticks_per_sec = platform_timebase_freq(&cpu); ps_per_tick = 1000000000000 / ticks_per_sec; - set_cputicker(mftb, ticks_per_sec, 0); + set_cputicker(mftb, ticks_per_sec, false); snprintf(buf, sizeof(buf), "cpu%d:decrementer", curcpu); intrcnt_add(buf, &decr_counts[curcpu]); decr_et_stop(NULL); diff --git a/sys/sys/systm.h b/sys/sys/systm.h --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -407,7 +407,7 @@ #define GETENV_SIGNED true /* negative numbers allowed */ typedef uint64_t (cpu_tick_f)(void); -void set_cputicker(cpu_tick_f *func, uint64_t freq, unsigned var); +void set_cputicker(cpu_tick_f *func, uint64_t freq, bool isvariable); extern cpu_tick_f *cpu_ticks; uint64_t cpu_tickrate(void); uint64_t cputick2usec(uint64_t tick); diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -846,7 +846,7 @@ error = CPUFREQ_LEVELS(cf_dev, levels, &count); if (error == 0 && count != 0) { max_freq = (uint64_t)levels[0].total_set.freq * 1000000; - set_cputicker(rdtsc, max_freq, 1); + set_cputicker(rdtsc, max_freq, true); } else printf("tsc_levels_changed: no max freq found\n"); free(levels, M_TEMP);