PERFORCE change 94829 for review
Kip Macy
kmacy at FreeBSD.org
Sun Apr 9 00:33:51 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94829
Change 94829 by kmacy at 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
More information about the p4-projects
mailing list