PERFORCE change 97521 for review

Kip Macy kmacy at FreeBSD.org
Sat May 20 18:47:47 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=97521

Change 97521 by kmacy at kmacy_storage:sun4v_rwbuf on 2006/05/20 18:46:29

	clean up unused function
	add sanity check

Affected files ...

.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tick.c#6 edit

Differences ...

==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tick.c#6 (text+ko) ====

@@ -43,6 +43,10 @@
 #include <machine/tick.h>
 #include <machine/ver.h>
 
+#ifdef DEBUG
+#include <sys/proc.h>
+#endif
+
 #define	TICK_GRACE	10000
 
 SYSCTL_NODE(_machdep, OID_AUTO, tick, CTLFLAG_RD, 0, "tick statistics");
@@ -101,6 +105,10 @@
 	long delta;
 	int count;
 
+#ifdef DEBUG	
+	if (curthread->td_critnest > 2 || curthread->td_critnest < 1)
+		panic("nested hardclock %d\n", curthread->td_critnest);
+#endif
 	/*
 	 * The sequence of reading the TICK register, calculating the value
 	 * of the next tick and writing it to the TICK_CMPR register must not
@@ -139,6 +147,7 @@
 	}
 	PCPU_SET(tickref, ref);
 	PCPU_SET(tickadj, adj);
+
 }
 
 void
@@ -160,15 +169,6 @@
 		panic("%s: HZ too high, decrease to at least %ld", __func__,
 		    clock / TICK_GRACE);
 #endif
-	/*
-	 * UltraSparc II[e,i] based systems come up with the tick interrupt
-	 * enabled and a handler that resets the tick counter, causing DELAY()
-	 * to not work properly when used early in boot.
-	 * UltraSPARC III based systems come up with the system tick interrupt
-	 * enabled, causing an interrupt storm on startup since they are not
-	 * handled.
-	 */
-	tick_stop();
 	set_cputicker(tick_cputicks, tick_freq, 0);
 }
 
@@ -194,8 +194,3 @@
 	intr_restore_all(s);
 }
 
-void
-tick_stop(void)
-{
-
-}


More information about the p4-projects mailing list