PERFORCE change 135823 for review
Randall R. Stewart
rrs at FreeBSD.org
Wed Feb 20 18:49:57 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=135823
Change 135823 by rrs at rrs-mips2-jnpr on 2008/02/20 18:49:09
for octeon, wheel should be run out of clock.
Affected files ...
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#7 edit
Differences ...
==== //depot/projects/mips2-jnpr/src/sys/mips/mips/clock.c#7 (text+ko) ====
@@ -116,6 +116,7 @@
if (!clock_started) {
mips_timer_hz = hz * 2;
+ printf("hz=%d mthz=%d\n", hz, mips_timer_hz);
stathz = mips_timer_hz / 15;
profhz = mips_timer_hz / 3;
printf("cpu_initclocks(): stathz = 0x%x, profhz = 0x%x\n",
@@ -197,6 +198,11 @@
}
+#ifdef TARGET_OCTEON
+static int wheel_run=0;
+void octeon_led_run_wheel(void);
+#endif
+
uint32_t
clockintr(uint32_t mask, struct clockframe *frame)
{
@@ -217,7 +223,14 @@
else
hardclock_cpu(USERMODE(frame->sr));
}
-
+#ifdef TARGET_OCTEON
+ /* Run the FreeBSD display once a second */
+ wheel_run += hz;
+ if(wheel_run >= (mips_timer_hz * hz)) {
+ wheel_run = 0;
+ octeon_led_run_wheel();
+ }
+#endif
/* Fire statclock at stathz. */
cpu_ticks->stat_ticks += stathz;
if (cpu_ticks->stat_ticks >= mips_timer_hz) {
More information about the p4-projects
mailing list