aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip32/ip32-irq-glue.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/mips/sgi-ip32/ip32-irq-glue.S
downloadkernel_samsung_tuna-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.zip
kernel_samsung_tuna-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.gz
kernel_samsung_tuna-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.bz2
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/mips/sgi-ip32/ip32-irq-glue.S')
-rw-r--r--arch/mips/sgi-ip32/ip32-irq-glue.S86
1 files changed, 86 insertions, 0 deletions
diff --git a/arch/mips/sgi-ip32/ip32-irq-glue.S b/arch/mips/sgi-ip32/ip32-irq-glue.S
new file mode 100644
index 0000000..200924e
--- /dev/null
+++ b/arch/mips/sgi-ip32/ip32-irq-glue.S
@@ -0,0 +1,86 @@
+/*
+ * Low level interrupt handler for the SGI O2 aka IP32 aka Moosehead
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2000 Harald Koerfgen
+ * Copyright (C) 2001 Keith M Wesolowski
+ */
+#include <asm/asm.h>
+#include <asm/regdef.h>
+#include <asm/mipsregs.h>
+#include <asm/stackframe.h>
+#include <asm/addrspace.h>
+
+ .text
+ .set noreorder
+ .set noat
+ .align 5
+ NESTED(ip32_handle_int, PT_SIZE, ra)
+ .set noat
+ SAVE_ALL
+ CLI # TEST: interrupts should be off
+ .set at
+ .set noreorder
+
+ mfc0 s0,CP0_CAUSE
+
+ andi t1, s0, IE_IRQ0
+ bnez t1, handle_irq0
+ andi t1, s0, IE_IRQ1
+ bnez t1, handle_irq1
+ andi t1, s0, IE_IRQ2
+ bnez t1, handle_irq2
+ andi t1, s0, IE_IRQ3
+ bnez t1, handle_irq3
+ andi t1, s0, IE_IRQ4
+ bnez t1, handle_irq4
+ andi t1, s0, IE_IRQ5
+ bnez t1, handle_irq5
+ nop
+
+ /* Either someone has triggered the "software interrupts"
+ * or we lost an interrupt somehow. Ignore it.
+ */
+ j ret_from_irq
+ nop
+
+handle_irq0:
+ jal ip32_irq0
+ move a0, sp
+ j ret_from_irq
+ nop
+
+handle_irq1:
+ jal ip32_irq1
+ move a0, sp
+ j ret_from_irq
+ nop
+
+handle_irq2:
+ jal ip32_irq2
+ move a0, sp
+ j ret_from_irq
+ nop
+
+handle_irq3:
+ jal ip32_irq3
+ move a0, sp
+ j ret_from_irq
+ nop
+
+handle_irq4:
+ jal ip32_irq4
+ move a0, sp
+ j ret_from_irq
+ nop
+
+handle_irq5:
+ jal ip32_irq5
+ move a0, sp
+ j ret_from_irq
+ nop
+
+ END(ip32_handle_int)