Date: Tue, 8 Jun 2004 03:39:59 GMT From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54391 for review Message-ID: <200406080339.i583dxbC021427@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54391 Change 54391 by jmallett@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406080339.i583dxbC021427>