patch-2.4.0-test4 linux/arch/mips64/sgi-ip27/ip27-timer.c
Next file: linux/arch/mips64/tools/offset.c
Previous file: linux/arch/mips64/sgi-ip27/ip27-setup.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Tue Jul 11 11:18:53 2000
- Orig file:
v2.4.0-test3/linux/arch/mips64/sgi-ip27/ip27-timer.c
- Orig date:
Mon Jul 10 16:47:20 2000
diff -u --recursive --new-file v2.4.0-test3/linux/arch/mips64/sgi-ip27/ip27-timer.c linux/arch/mips64/sgi-ip27/ip27-timer.c
@@ -2,6 +2,7 @@
* Copytight (C) 1999, 2000 Ralf Baechle (ralf@gnu.org)
* Copytight (C) 1999, 2000 Silicon Graphics, Inc.
*/
+#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
@@ -38,7 +39,7 @@
static long last_rtc_update = 0; /* Last time the rtc clock got updated */
extern rwlock_t xtime_lock;
-extern volatile unsigned long lost_ticks;
+extern volatile unsigned long wall_jiffies;
static int set_rtc_mmss(unsigned long nowtime)
@@ -175,7 +176,7 @@
read_lock_irqsave(&xtime_lock, flags);
usec = do_gettimeoffset();
{
- unsigned long lost = lost_ticks;
+ unsigned long lost = jiffies - wall_jiffies;
if (lost)
usec += lost * (1000000 / HZ);
}
@@ -196,7 +197,7 @@
{
write_lock_irq(&xtime_lock);
tv->tv_usec -= do_gettimeoffset();
- tv->tv_usec -= lost_ticks * (1000000 / HZ);
+ tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ);
while (tv->tv_usec < 0) {
tv->tv_usec += 1000000;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)