summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme88k/mvme88k/autoconf.c22
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c3
2 files changed, 22 insertions, 3 deletions
diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c
index 83a31073a0e..6d737a3e65c 100644
--- a/sys/arch/mvme88k/mvme88k/autoconf.c
+++ b/sys/arch/mvme88k/mvme88k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.40 2007/10/13 12:55:21 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.41 2007/10/28 19:48:47 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -72,6 +72,26 @@ struct device *bootdv; /* set by device drivers (if found) */
void
cpu_configure()
{
+#ifdef MULTIPROCESSOR
+ /*
+ * XXX This is gross. We can not invoke sched_init_cpu after
+ * XXX init has been forked. But since we start secondary
+ * XXX processors very late in the boot process, it is not
+ * XXX possible to do this from the secondary processors
+ * XXX themselves.
+ * XXX Instead, do this now, even though this may cause
+ * XXX idle procs to be allocated for missing or unreliable
+ * XXX processors.
+ */
+ cpuid_t cpu;
+ for (cpu = 0; cpu < max_cpus; cpu++) {
+ if (cpu == curcpu()->ci_cpuid)
+ continue;
+
+ sched_init_cpu(&m88k_cpus[cpu]);
+ }
+#endif
+
if (config_rootfound("mainbus", "mainbus") == 0)
panic("no mainbus found");
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index b9d6fe5610c..2b97d66c08b 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.196 2007/10/28 19:45:52 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.197 2007/10/28 19:48:47 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -724,7 +724,6 @@ secondary_main()
int s;
cpu_configuration_print(0);
- sched_init_cpu(ci);
ncpus++;
__cpu_simple_unlock(&cpu_boot_mutex);