summaryrefslogtreecommitdiff
path: root/sys/arch/mips64/mips64/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mips64/mips64/cpu.c')
-rw-r--r--sys/arch/mips64/mips64/cpu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c
index 8018883b62c..eb92cd951ba 100644
--- a/sys/arch/mips64/mips64/cpu.c
+++ b/sys/arch/mips64/mips64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.18 2009/11/24 22:46:59 syuu Exp $ */
+/* $OpenBSD: cpu.c,v 1.19 2009/11/25 17:39:51 syuu Exp $ */
/*
* Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se)
@@ -105,6 +105,7 @@ cpuattach(struct device *parent, struct device *dev, void *aux)
#ifdef MULTIPROCESSOR
ci->ci_flags |= CPUF_RUNNING | CPUF_PRESENT | CPUF_PRIMARY;
cpuset_add(&cpus_running, ci);
+ ci->ci_ipiih = NULL;
#endif
}
#ifdef MULTIPROCESSOR
@@ -112,6 +113,10 @@ cpuattach(struct device *parent, struct device *dev, void *aux)
ci = (struct cpu_info *)smp_malloc(sizeof(*ci));
if (ci == NULL)
panic("unable to allocate cpu_info\n");
+ ci->ci_ipiih =
+ (struct intrhand *)smp_malloc(sizeof(*ci->ci_ipiih));
+ if (ci->ci_ipiih == NULL)
+ panic("unable to allocate ipi intrhand\n");
ci->ci_next = cpu_info_list->ci_next;
cpu_info_list->ci_next = ci;
ci->ci_flags |= CPUF_PRESENT;
@@ -329,6 +334,11 @@ cpu_boot_secondary_processors(void)
continue;
cpu_boot_secondary(ci);
}
+
+ /* This must called after xheart0 has initialized, so here is
+ * the best place to do so.
+ */
+ mips64_ipi_init();
}
void