summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-08-01 01:35:02 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-08-01 01:35:02 +0000
commit7f78cc6fbe77afbbd4c84f2c8fab9c92f58b1976 (patch)
tree7d0263744b29eeae0985c428ab18e933700e2396 /arch
parent9f069616f19cf17304c6ba384fd4bf470e89aeb8 (diff)
Compile fix: get the ip27-timer.c code that updates process times looking
like its i386 counterpart.
Diffstat (limited to 'arch')
-rw-r--r--arch/mips64/sgi-ip27/ip27-timer.c35
1 files changed, 10 insertions, 25 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-timer.c b/arch/mips64/sgi-ip27/ip27-timer.c
index 8d25b1caa..def756121 100644
--- a/arch/mips64/sgi-ip27/ip27-timer.c
+++ b/arch/mips64/sgi-ip27/ip27-timer.c
@@ -93,6 +93,7 @@ void rt_timer_interrupt(struct pt_regs *regs)
int cpu = smp_processor_id();
int cpuA = ((cputoslice(cpu)) == 0);
int irq = 7; /* XXX Assign number */
+ int user = user_mode(regs);
write_lock(&xtime_lock);
@@ -110,31 +111,15 @@ again:
do_timer(regs);
#ifdef CONFIG_SMP
- if (current->pid) {
- unsigned int *inc, *inc2;
- int user = user_mode(regs);
-
- update_one_process(current, 1, user, !user, cpu);
- if (--current->counter <= 0) {
- current->counter = 0;
- current->need_resched = 1;
- }
-
- if (user) {
- if (current->nice > 0) {
- inc = &kstat.cpu_nice;
- inc2 = &kstat.per_cpu_nice[cpu];
- } else {
- inc = &kstat.cpu_user;
- inc2 = &kstat.per_cpu_user[cpu];
- }
- } else {
- inc = &kstat.cpu_system;
- inc2 = &kstat.per_cpu_system[cpu];
- }
- atomic_inc((atomic_t *)inc);
- atomic_inc((atomic_t *)inc2);
- }
+ /*
+ * update_process_times() expects us to have done irq_enter().
+ * Besides, if we don't timer interrupts ignore the global
+ * interrupt lock, which is the WrongThing (tm) to do.
+ * Picked from i386 code.
+ */
+ irq_enter(cpu, 0);
+ update_process_times(user);
+ irq_exit(cpu, 0);
#endif /* CONFIG_SMP */
/*