Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Apr 2006 00:33:51 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 94829 for review
Message-ID:  <200604090033.k390XpAC041895@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94829

Change 94829 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/04/09 00:33:02

	use renamed interrupt control functions

Affected files ...

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

Differences ...

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

@@ -90,6 +90,7 @@
 		hardclock_cpu(TRAPF_USERMODE(tf));
 	if (profprocs != 0)
 		profclock(TRAPF_USERMODE(tf), TRAPF_PC(tf));
+
 	statclock(TRAPF_USERMODE(tf));
 }
 
@@ -108,10 +109,11 @@
 	 * stop.
 	 */
 	adj = PCPU_GET(tickadj);
-	s = intr_disable();
+	s = intr_disable_all();
 	tick = rd(tick);
 	wrtickcmpr(tick + tick_increment - adj, 0);
-	intr_restore(s);
+	intr_restore_all(s);
+
 	ref = PCPU_GET(tickref);
 	delta = tick - ref;
 	count = 0;
@@ -152,14 +154,12 @@
 	 */
 	printf("tick_freq=%ld hz=%d tick_increment=%ld\n",
 	       tick_freq, hz, tick_increment);
-#ifndef notyet 
-	/* XXX SUN4V_FIXME the simulator sets the clock to 5Mhz */
-	tick_increment = TICK_GRACE;
-#endif
+
+#ifndef SIMULATOR
 	if (tick_increment < TICK_GRACE)
 		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()
@@ -186,12 +186,12 @@
 	 * one tick to make sure that it is not missed.
 	 */
 	PCPU_SET(tickadj, 0);
-	s = intr_disable();
+	s = intr_disable_all();
 	base = rd(tick);
 	base = roundup(base, tick_increment);
 	PCPU_SET(tickref, base);
 	wrtickcmpr(base + tick_increment, 0);
-	intr_restore(s);
+	intr_restore_all(s);
 }
 
 void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604090033.k390XpAC041895>