Date: Fri, 22 Feb 2008 17:44:33 GMT From: "Randall R. Stewart" <rrs@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 135977 for review Message-ID: <200802221744.m1MHiXhb034345@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135977 Change 135977 by rrs@rrs-mips2-jnpr on 2008/02/22 17:44:23 tweaks to make the wheel run correctly and move things to uint64_t that should be. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#8 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/tick.c#8 (text+ko) ==== @@ -51,9 +51,9 @@ uint64_t counter_freq; uint64_t cycles_per_tick; -uint32_t cycles_per_usec; -uint32_t cycles_per_sec; -uint32_t cycles_per_hz; +uint64_t cycles_per_usec; +uint64_t cycles_per_sec; +uint64_t cycles_per_hz; u_int32_t counter_upper = 0; u_int32_t counter_lower_last = 0; @@ -143,7 +143,8 @@ cycles_per_tick *= 2; cycles_per_hz = counter_freq / hz; cycles_per_usec = counter_freq / (1 * 1000 * 1000); - cycles_per_sec = counter_freq / (1 * 1000); + cycles_per_sec = counter_freq ; + counter_timecounter.tc_frequency = counter_freq; /* * XXX: Some MIPS32 cores update the Count register only every two @@ -156,7 +157,7 @@ cycles_per_usec /= 2; cycles_per_sec /= 2; } - printf("hz=%d counts_per_hz:%jd counts_per_usec:%d freq:%jd cycles_per_hz:%d cycles_per_sec:%d\n", + printf("hz=%d cyl_per_hz:%jd cyl_per_usec:%jd freq:%jd cyl_per_hz:%jd cyl_per_sec:%jd\n", hz, cycles_per_tick, cycles_per_usec, @@ -249,7 +250,7 @@ } #ifdef TARGET_OCTEON -int wheel_run = 0; +int64_t wheel_run = 0; void octeon_led_run_wheel(void); @@ -268,7 +269,7 @@ * Set next clock edge. */ ltick = mips_rd_count(); - mips_wr_compare(ltick + counter_freq / hz); + mips_wr_compare(ltick + cycles_per_tick); cpu_ticks = &pcpu_ticks[PCPU_GET(cpuid)]; critical_enter(); if (ltick < counter_lower_last) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802221744.m1MHiXhb034345>