Date: Wed, 20 Feb 2008 18:49:55 GMT From: "Randall R. Stewart" <rrs@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 135823 for review Message-ID: <200802201849.m1KIntxa082352@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135823 Change 135823 by rrs@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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802201849.m1KIntxa082352>