Date: Thu, 29 Oct 2009 05:18:02 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r198569 - projects/mips/sys/mips/mips Message-ID: <200910290518.n9T5I2rF084737@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Thu Oct 29 05:18:02 2009 New Revision: 198569 URL: http://svn.freebsd.org/changeset/base/198569 Log: Deal with overflow of the COUNT register correctly. The 'cycles_per_hz' has nothing to do with the rollover. Approved by: imp (mentor) Modified: projects/mips/sys/mips/mips/tick.c Modified: projects/mips/sys/mips/mips/tick.c ============================================================================== --- projects/mips/sys/mips/mips/tick.c Wed Oct 28 22:00:49 2009 (r198568) +++ projects/mips/sys/mips/mips/tick.c Thu Oct 29 05:18:02 2009 (r198569) @@ -223,9 +223,9 @@ DELAY(int n) /* Check to see if the timer has wrapped around. */ if (cur < last) - delta += (cur + (cycles_per_hz - last)); + delta += cur + (0xffffffff - last) + 1; else - delta += (cur - last); + delta += cur - last; last = cur;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910290518.n9T5I2rF084737>