Commits

Anonymous committed 8be75e6

Do not register the internal cpu timer-based timecounter if we support cpu
throttling.

Comments (0)

Files changed (1)

sys/arch/mips64/mips64/mips64_machdep.c

-/*	$OpenBSD: mips64_machdep.c,v 1.10 2013/01/15 23:30:37 pirofti Exp $ */
+/*	$OpenBSD: mips64_machdep.c,v 1.11 2013/01/16 20:23:54 miod Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2012 Miodrag Vallat.
 #include <sys/kernel.h>
 #include <sys/proc.h>
 #include <sys/exec.h>
+#include <sys/sysctl.h>
 #include <sys/timetc.h>
 
 #include <machine/autoconf.h>
 	cp0_calibrate(ci);
 
 #ifndef MULTIPROCESSOR
-	cp0_timecounter.tc_frequency =
-	    (uint64_t)ci->ci_hw.clock / CP0_CYCLE_DIVIDER;
-	tc_init(&cp0_timecounter);
+	if (cpu_setperf == NULL) {
+		cp0_timecounter.tc_frequency =
+		    (uint64_t)ci->ci_hw.clock / CP0_CYCLE_DIVIDER;
+		tc_init(&cp0_timecounter);
+	}
 #endif
 
 #ifdef DIAGNOSTIC