summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-04-01 01:54:46 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-04-01 01:54:46 +0000
commitd49f62d0497bc81a70b1c2e01ddec71d8ea93c30 (patch)
treef44aa76d2fadd1356ebb9f13850b4b14e702010c /arch
parent5e0a97c26457260b7a95383fae0fc2cf2f98237d (diff)
Rudimentary sendintr() routine to send intrs to other cpus. This needs to
pull in defines from intr.h/intr_public.h. Also, need to store percpu information regarding cpu slice # for cpu, hardware nasid and compact node id.
Diffstat (limited to 'arch')
-rw-r--r--arch/mips64/kernel/smp.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/mips64/kernel/smp.c b/arch/mips64/kernel/smp.c
index d72e97904..d4365c647 100644
--- a/arch/mips64/kernel/smp.c
+++ b/arch/mips64/kernel/smp.c
@@ -1,3 +1,4 @@
+#include <linux/config.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/threads.h>
@@ -10,6 +11,42 @@
#include <asm/system.h>
#include <asm/hardirq.h>
+#ifdef CONFIG_SGI_IP27
+
+#include <asm/sn/arch.h>
+#include <asm/sn/intr.h>
+#include <asm/sn/addrs.h>
+#include <asm/sn/agent.h>
+
+#define DOACTION 0xab
+
+static void sendintr(int destid, unsigned char status)
+{
+ int level;
+
+#if (CPUS_PER_NODE == 2)
+ /*
+ * CPU slice A gets level CPU_ACTION_A
+ * CPU slice B gets level CPU_ACTION_B
+ */
+ if (status == DOACTION)
+ level = CPU_ACTION_A + cputoslice(destid);
+ else /* DOTLBACTION */
+ level = N_INTPEND_BITS + TLB_INTR_A + cputoslice(destid);
+
+ /*
+ * Convert the compact hub number to the NASID to get the correct
+ * part of the address space. Then set the interrupt bit associated
+ * with the CPU we want to send the interrupt to.
+ */
+ REMOTE_HUB_SEND_INTR(COMPACT_TO_NASID_NODEID(cputocnode(destid)), level);
+#else
+ << Bomb! Must redefine this for more than 2 CPUS. >>
+#endif
+}
+
+#endif /* CONFIG_SGI_IP27 */
+
/* The 'big kernel lock' */
spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
int smp_threads_ready = 0; /* Not used */