PERFORCE change 54391 for review

Juli Mallett jmallett at FreeBSD.org
Tue Jun 8 03:40:00 GMT 2004


http://perforce.freebsd.org/chv.cgi?CH=54391

Change 54391 by jmallett at jmallett_oingo on 2004/06/08 03:39:20

	Simplify the clock logic for the greater good for now.

Affected files ...

.. //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#30 edit

Differences ...

==== //depot/projects/mips/sys/mips/sgimips/machdep_sgimips.c#30 (text+ko) ====

@@ -168,31 +168,21 @@
 void
 platform_intr(struct trapframe *tf)
 {
-	static u_register_t next, last;
 	register_t cause;
 
 	cause = mips_rd_cause();
 
 	if (cause & MIPS_INT_MASK_5) {
 		struct clockframe cf;
-		u_register_t now;
 
 		/*
 		 * Set next clock edge.
 		 */
-		if (next == 0)
-			next = mips_rd_count();
-		last = next;
-		next += curcpu()->ci_cycles_per_hz;
-		now = mips_rd_count();
-		if (last < next) {
-			while (now > next)
-				next += curcpu()->ci_cycles_per_hz;
-		}
-		mips_wr_compare(next);
 		cf.sr = tf->tf_regs[TF_SR];
 		cf.pc = tf->tf_regs[TF_EPC];
 		hardclock(&cf);
+		mips_wr_compare(mips_rd_count() +
+				curcpu()->ci_cycles_per_hz);
 	} else {
 		printf("stray intr cause %lx\n", cause);
 	}


More information about the p4-projects mailing list