Update of /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250
In directory usw-pr-cvs1:/tmp/cvs-serv3535/arch/mips/sibyte/sb1250
Modified Files:
time.c
Log Message:
More OSS syncing..
Index: time.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/sibyte/sb1250/time.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- time.c 19 Feb 2002 17:32:08 -0000 1.4
+++ time.c 21 Apr 2002 20:01:13 -0000 1.5
@@ -33,6 +33,8 @@
#include <asm/irq.h>
#include <asm/ptrace.h>
#include <asm/addrspace.h>
+#include <asm/time.h>
+
#include <asm/sibyte/sb1250.h>
#include <asm/sibyte/sb1250_regs.h>
#include <asm/sibyte/sb1250_int.h>
@@ -40,10 +42,6 @@
#include <asm/sibyte/64bit.h>
-void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-
-
-
#define IMR_IP2_VAL K_INT_MAP_I0
#define IMR_IP3_VAL K_INT_MAP_I1
#define IMR_IP4_VAL K_INT_MAP_I2
@@ -89,10 +87,6 @@
*/
}
-extern int set_rtc_mmss(unsigned long nowtime);
-extern rwlock_t xtime_lock;
-static long last_rtc_update = 0;
-
void sb1250_timer_interrupt(struct pt_regs *regs)
{
int cpu = smp_processor_id();
@@ -102,37 +96,14 @@
KSEG1 + A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
/*
- * Need to do some stuff here with xtime, too, but that looks like
- * it should be architecture independent...does it really belong here?
+ * CPU 0 handles the global timer interrupt job
*/
- if (!cpu) {
- do_timer(regs);
-
- read_lock(&xtime_lock);
- if ((time_status & STA_UNSYNC) == 0
- && xtime.tv_sec > last_rtc_update + 660
- && xtime.tv_usec >= 500000 - (tick >> 1)
- && xtime.tv_usec <= 500000 + (tick >> 1)) {
- if (set_rtc_mmss(xtime.tv_sec) == 0)
- last_rtc_update = xtime.tv_sec;
- else
- /* do it again in 60 s */
- last_rtc_update = xtime.tv_sec - 600;
- }
- read_unlock(&xtime_lock);
+ if (cpu == 0) {
+ ll_timer_interrupt(0, regs);
}
-#ifdef CONFIG_SMP
/*
- * We need to make like a normal interrupt -- otherwise timer
- * interrupts ignore the global interrupt lock, which would be
- * a Bad Thing.
+ * every CPU should do profiling and process accouting
*/
- irq_enter(cpu, 0);
- update_process_times(user_mode(regs));
- irq_exit(cpu, 0);
-
- if (softirq_pending(cpu))
- do_softirq();
-#endif /* CONFIG_SMP */
+ ll_local_timer_interrupt(0, regs);
}
|