summaryrefslogtreecommitdiffstats
path: root/arch/mips64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-11 02:32:09 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-11 02:32:09 +0000
commit7f5ea64ad438953cbeb3055f424dfac01d5bcfc7 (patch)
treef8cabc30da0d0eaa578cb6369c816e02af148510 /arch/mips64
parent99e873a7003ab3980a6296c29066e3ab7956a009 (diff)
Merge with Linux 2.4.0-test3.
Diffstat (limited to 'arch/mips64')
-rw-r--r--arch/mips64/kernel/process.c2
-rw-r--r--arch/mips64/sgi-ip27/ip27-timer.c8
-rw-r--r--arch/mips64/tools/offset.c9
3 files changed, 9 insertions, 10 deletions
diff --git a/arch/mips64/kernel/process.c b/arch/mips64/kernel/process.c
index 22ce0ed6d..ade972d6b 100644
--- a/arch/mips64/kernel/process.c
+++ b/arch/mips64/kernel/process.c
@@ -35,7 +35,7 @@ asmlinkage int cpu_idle(void)
{
/* endless idle loop with no priority at all */
init_idle();
- current->priority = 0;
+ current->nice = 20;
current->counter = -100;
while (1) {
while (!current->need_resched)
diff --git a/arch/mips64/sgi-ip27/ip27-timer.c b/arch/mips64/sgi-ip27/ip27-timer.c
index a6bcdcc95..9a88ca83d 100644
--- a/arch/mips64/sgi-ip27/ip27-timer.c
+++ b/arch/mips64/sgi-ip27/ip27-timer.c
@@ -38,7 +38,7 @@ static unsigned long ct_cur[NR_CPUS]; /* What counter should be at next timer ir
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)
@@ -120,7 +120,7 @@ again:
}
if (user) {
- if (current->priority < DEF_PRIORITY) {
+ if (current->nice > 0) {
inc = &kstat.cpu_nice;
inc2 = &kstat.per_cpu_nice[cpu];
} else {
@@ -175,7 +175,7 @@ void do_gettimeofday(struct timeval *tv)
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 +196,7 @@ void do_settimeofday(struct timeval *tv)
{
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;
diff --git a/arch/mips64/tools/offset.c b/arch/mips64/tools/offset.c
index a8833e216..6fec8d313 100644
--- a/arch/mips64/tools/offset.c
+++ b/arch/mips64/tools/offset.c
@@ -1,10 +1,9 @@
-/* $Id: offset.c,v 1.4 1999/12/04 03:59:01 ralf Exp $
- *
+/*
* offset.c: Calculate pt_regs and task_struct offsets.
*
* Copyright (C) 1996 David S. Miller
- * Copyright (C) 1997, 1998, 1999 Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
+ * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
*/
#include <linux/types.h>
#include <linux/sched.h>
@@ -80,7 +79,7 @@ void output_task_defines(void)
offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
offset("#define TASK_COUNTER ", struct task_struct, counter);
- offset("#define TASK_PRIORITY ", struct task_struct, priority);
+ offset("#define TASK_NICE ", struct task_struct, nice);
offset("#define TASK_MM ", struct task_struct, mm);
offset("#define TASK_PROCESSOR ", struct task_struct, processor);
size("#define TASK_STRUCT_SIZE ", struct task_struct);