summaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
commit545f435ebcfd94a1e7c20b46efe81b4d6ac4e698 (patch)
treee9ce4bc598d06374bda906f18365984bf22a526a /arch/mips/sgi/kernel
parent4291a610eef89d0d5c69d9a10ee6560e1aa36c74 (diff)
Merge with Linux 2.1.55. More bugfixes and goodies from my private
CVS archive.
Diffstat (limited to 'arch/mips/sgi/kernel')
-rw-r--r--arch/mips/sgi/kernel/indy_int.c38
-rw-r--r--arch/mips/sgi/kernel/indy_timer.c13
2 files changed, 25 insertions, 26 deletions
diff --git a/arch/mips/sgi/kernel/indy_int.c b/arch/mips/sgi/kernel/indy_int.c
index 2d23372ae..343a71f9e 100644
--- a/arch/mips/sgi/kernel/indy_int.c
+++ b/arch/mips/sgi/kernel/indy_int.c
@@ -4,7 +4,7 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*
- * $Id: indy_int.c,v 1.2 1997/07/01 09:00:58 ralf Exp $
+ * $Id: indy_int.c,v 1.3 1997/08/26 04:34:55 miguel Exp $
*/
#include <linux/config.h>
@@ -260,13 +260,6 @@ int get_irq_list(char *buf)
atomic_t __mips_bh_counter;
-#ifdef __SMP__
-#error Send superfluous SMP boxes to ralf@uni-koblenz.de
-#else
-#define irq_enter(cpu, irq) (++local_irq_count[cpu])
-#define irq_exit(cpu, irq) (--local_irq_count[cpu])
-#endif
-
/*
* do_IRQ handles IRQ's that have been installed without the
* SA_INTERRUPT flag: it uses the full signal-handling return
@@ -434,7 +427,7 @@ void indy_local0_irqdispatch(struct pt_regs *regs)
struct irqaction *action;
unsigned char mask = ioc_icontrol->istat0;
unsigned char mask2 = 0;
- int irq;
+ int irq, cpu = smp_processor_id();;
mask &= ioc_icontrol->imask0;
if(mask & ISTAT0_LIO2) {
@@ -446,13 +439,11 @@ void indy_local0_irqdispatch(struct pt_regs *regs)
irq = lc0msk_to_irqnr[mask];
action = local_irq_action[irq];
}
-#if 0
- printk("local0_dispatch: got irq %d mask %2x mask2 %2x\n",
- irq, mask, mask2);
- prom_getchar();
-#endif
+
+ irq_enter(cpu, irq);
kstat.interrupts[irq + 16]++;
action->handler(irq, action->dev_id, regs);
+ irq_exit(cpu, irq);
}
void indy_local1_irqdispatch(struct pt_regs *regs)
@@ -460,7 +451,7 @@ void indy_local1_irqdispatch(struct pt_regs *regs)
struct irqaction *action;
unsigned char mask = ioc_icontrol->istat1;
unsigned char mask2 = 0;
- int irq;
+ int irq, cpu = smp_processor_id();;
mask &= ioc_icontrol->imask1;
if(mask & ISTAT1_LIO3) {
@@ -473,23 +464,24 @@ void indy_local1_irqdispatch(struct pt_regs *regs)
irq = lc1msk_to_irqnr[mask];
action = local_irq_action[irq];
}
-#if 0
- printk("local1_dispatch: got irq %d mask %2x mask2 %2x\n",
- irq, mask, mask2);
- prom_getchar();
-#endif
+ irq_enter(cpu, irq);
kstat.interrupts[irq + 24]++;
action->handler(irq, action->dev_id, regs);
+ irq_exit(cpu, irq);
}
void indy_buserror_irq(struct pt_regs *regs)
{
- kstat.interrupts[6]++;
+ int cpu = smp_processor_id();
+ int irq = 6;
+
+ irq_enter(cpu, irq);
+ kstat.interrupts[irq]++;
printk("Got a bus error IRQ, shouldn't happen yet\n");
show_regs(regs);
printk("Spinning...\n");
- while(1)
- ;
+ while(1);
+ irq_exit(cpu, irq);
}
/* Misc. crap just to keep the kernel linking... */
diff --git a/arch/mips/sgi/kernel/indy_timer.c b/arch/mips/sgi/kernel/indy_timer.c
index 43c1c76c6..d0ba84929 100644
--- a/arch/mips/sgi/kernel/indy_timer.c
+++ b/arch/mips/sgi/kernel/indy_timer.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*
- * $Id: indy_timer.c,v 1.2 1997/06/28 23:27:29 ralf Exp $
+ * $Id: indy_timer.c,v 1.2 1997/07/01 09:00:59 ralf Exp $
*/
#include <linux/errno.h>
@@ -101,10 +101,12 @@ static long last_rtc_update = 0;
void indy_timer_interrupt(struct pt_regs *regs)
{
+ int irq = 7;
+
/* Ack timer and compute new compare. */
r4k_cur = (read_32bit_cp0_register(CP0_COUNT) + r4k_offset);
ack_r4ktimer(r4k_cur);
- kstat.interrupts[7]++;
+ kstat.interrupts[irq]++;
do_timer(regs);
/* We update the Dallas time of day approx. every 11 minutes,
@@ -272,10 +274,15 @@ void indy_timer_init(void)
void indy_8254timer_irq(void)
{
- kstat.interrupts[4]++;
+ int cpu = smp_processor_id();
+ int irq = 4;
+
+ irq_enter(cpu, irq);
+ kstat.interrupts[irq]++;
printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
prom_getchar();
prom_imode();
+ irq_exit(cpu, irq);
}
void do_gettimeofday(struct timeval *tv)