summaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
commitd8d9b8f76f22b7a16a83e261e64f89ee611f49df (patch)
tree3067bc130b80d52808e6390c9fc7fc087ec1e33c /arch/mips/sgi
parent19c9bba94152148523ba0f7ef7cffe3d45656b11 (diff)
Initial revision
Diffstat (limited to 'arch/mips/sgi')
-rw-r--r--arch/mips/sgi/kernel/indy_int.c15
-rw-r--r--arch/mips/sgi/kernel/setup.c1
-rw-r--r--arch/mips/sgi/prom/misc.c14
3 files changed, 27 insertions, 3 deletions
diff --git a/arch/mips/sgi/kernel/indy_int.c b/arch/mips/sgi/kernel/indy_int.c
index 19b744fdb..fe60c03c8 100644
--- a/arch/mips/sgi/kernel/indy_int.c
+++ b/arch/mips/sgi/kernel/indy_int.c
@@ -16,6 +16,8 @@
#include <linux/timex.h>
#include <linux/malloc.h>
#include <linux/random.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
#include <asm/bitops.h>
#include <asm/bootinfo.h>
@@ -51,6 +53,7 @@ extern asmlinkage void indyIRQ(void);
extern void rs_kgdb_hook(int);
#endif
+unsigned int local_irq_count[NR_CPUS];
unsigned long spurious_count = 0;
/* Local IRQ's are layed out logically like this:
@@ -255,6 +258,15 @@ int get_irq_list(char *buf)
return len;
}
+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
@@ -264,8 +276,9 @@ int get_irq_list(char *buf)
*/
asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
{
- lock_kernel();
struct irqaction * action = *(irq + irq_action);
+
+ lock_kernel();
kstat.interrupts[irq]++;
printk("Got irq %d, press a key.", irq);
prom_getchar();
diff --git a/arch/mips/sgi/kernel/setup.c b/arch/mips/sgi/kernel/setup.c
index 58b7695b3..e0482e116 100644
--- a/arch/mips/sgi/kernel/setup.c
+++ b/arch/mips/sgi/kernel/setup.c
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <asm/reboot.h>
#include <asm/vector.h>
#include <asm/sgialib.h>
#include <asm/sgi.h>
diff --git a/arch/mips/sgi/prom/misc.c b/arch/mips/sgi/prom/misc.c
index 47051a1b3..53ee61cfe 100644
--- a/arch/mips/sgi/prom/misc.c
+++ b/arch/mips/sgi/prom/misc.c
@@ -1,9 +1,9 @@
-/* $Id: misc.c,v 1.3 1996/08/07 02:54:12 dm Exp $
+/*
* misc.c: Miscellaneous ARCS PROM routines.
*
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
*/
-
+#include <linux/config.h>
#include <linux/kernel.h>
#include <asm/sgialib.h>
@@ -51,7 +51,9 @@ void prom_halt(void)
{
shutoff_r4600_cache();
initialize_kbd();
+#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
+#endif
cli();
romvec->halt();
}
@@ -60,7 +62,9 @@ void prom_powerdown(void)
{
shutoff_r4600_cache();
initialize_kbd();
+#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
+#endif
cli();
romvec->pdown();
}
@@ -70,7 +74,9 @@ void prom_restart(void)
{
shutoff_r4600_cache();
initialize_kbd();
+#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
+#endif
cli();
romvec->restart();
}
@@ -79,7 +85,9 @@ void prom_reboot(void)
{
shutoff_r4600_cache();
initialize_kbd();
+#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
+#endif
cli();
romvec->reboot();
}
@@ -88,7 +96,9 @@ void prom_imode(void)
{
shutoff_r4600_cache();
initialize_kbd();
+#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
+#endif
cli();
romvec->imode();
}