summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/irq.c2
-rw-r--r--arch/sparc/kernel/sun4d_irq.c2
-rw-r--r--arch/sparc/kernel/sun4d_smp.c27
-rw-r--r--arch/sparc/kernel/sun4m_smp.c27
4 files changed, 6 insertions, 52 deletions
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 0e05908fe..65e95afdb 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -1,4 +1,4 @@
-/* $Id: irq.c,v 1.104 2000/06/30 10:18:38 davem Exp $
+/* $Id: irq.c,v 1.105 2000/07/26 01:04:02 davem Exp $
* arch/sparc/kernel/irq.c: Interrupt request handling routines. On the
* Sparc the IRQ's are basically 'cast in stone'
* and you are supposed to probe the prom's device
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 59f014efc..4ce99b06b 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -1,4 +1,4 @@
-/* $Id: sun4d_irq.c,v 1.25 2000/05/09 17:40:13 davem Exp $
+/* $Id: sun4d_irq.c,v 1.26 2000/07/26 01:04:03 davem Exp $
* arch/sparc/kernel/sun4d_irq.c:
* SS1000/SC2000 interrupt handling.
*
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index fe9885025..1294ad31a 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -441,10 +441,6 @@ void smp4d_message_pass(int target, int msg, unsigned long data, int wait)
extern unsigned int prof_multiplier[NR_CPUS];
extern unsigned int prof_counter[NR_CPUS];
-extern void update_one_process(struct task_struct *p, unsigned long ticks,
- unsigned long user, unsigned long system,
- int cpu);
-
extern void sparc_do_profile(unsigned long pc, unsigned long o7);
void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
@@ -471,29 +467,10 @@ void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
int user = user_mode(regs);
irq_enter(cpu, 0);
- if(current->pid) {
- update_one_process(current, 1, user, !user, cpu);
-
- if(--current->counter <= 0) {
- current->counter = 0;
- current->need_resched = 1;
- }
+ update_process_times(user);
+ irq_exit(cpu, 0);
- if(user) {
- if(current->nice > 0) {
- kstat.cpu_nice++;
- kstat.per_cpu_nice[cpu]++;
- } else {
- kstat.cpu_user++;
- kstat.per_cpu_user[cpu]++;
- }
- } else {
- kstat.cpu_system++;
- kstat.per_cpu_system[cpu]++;
- }
- }
prof_counter[cpu] = prof_multiplier[cpu];
- irq_exit(cpu, 0);
}
}
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index 3475a8df5..60c37373e 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -439,10 +439,6 @@ void smp4m_cross_call_irq(void)
extern unsigned int prof_multiplier[NR_CPUS];
extern unsigned int prof_counter[NR_CPUS];
-extern void update_one_process(struct task_struct *p, unsigned long ticks,
- unsigned long user, unsigned long system,
- int cpu);
-
extern void sparc_do_profile(unsigned long pc, unsigned long o7);
void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
@@ -458,29 +454,10 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
int user = user_mode(regs);
irq_enter(cpu, 0);
- if(current->pid) {
- update_one_process(current, 1, user, !user, cpu);
-
- if(--current->counter <= 0) {
- current->counter = 0;
- current->need_resched = 1;
- }
+ update_process_times(user);
+ irq_exit(cpu, 0);
- if(user) {
- if(current->nice > 0) {
- kstat.cpu_nice++;
- kstat.per_cpu_nice[cpu]++;
- } else {
- kstat.cpu_user++;
- kstat.per_cpu_user[cpu]++;
- }
- } else {
- kstat.cpu_system++;
- kstat.per_cpu_system[cpu]++;
- }
- }
prof_counter[cpu] = prof_multiplier[cpu];
- irq_exit(cpu, 0);
}
}