diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-03-05 21:55:16 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-03-05 21:55:16 +0000 |
commit | 5899f1c3618e6db2f37f47ef99fa640ebdda5506 (patch) | |
tree | 23aa4af326c0906aa1f95896a649ff0abe3933f1 /sys/arch/mvme88k/dev | |
parent | aabaf8175cf6f13ee3461c2e7d7058c41204e5ae (diff) |
Change SMP secondary processor startup to have them ``hatch'' earlier,
so that they can invoke sched_init_cpu() before the scheduler starts,
which allows the horrible kluge in cpu_configure() to die.
Diffstat (limited to 'sys/arch/mvme88k/dev')
-rw-r--r-- | sys/arch/mvme88k/dev/mainbus.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/arch/mvme88k/dev/mainbus.c b/sys/arch/mvme88k/dev/mainbus.c index 2bcd69abf25..8e4f7f26fc3 100644 --- a/sys/arch/mvme88k/dev/mainbus.c +++ b/sys/arch/mvme88k/dev/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.23 2007/11/27 16:22:13 martynas Exp $ */ +/* $OpenBSD: mainbus.c,v 1.24 2009/03/05 21:55:12 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 2004, Miodrag Vallat. @@ -287,6 +287,7 @@ mainbus_scan(struct device *parent, void *child, void *args) void mainbus_attach(struct device *parent, struct device *self, void *args) { + extern void cpu_hatch_secondary_processors(void *); extern char cpu_model[]; printf(": %s\n", cpu_model); @@ -316,5 +317,19 @@ mainbus_attach(struct device *parent, struct device *self, void *args) if (bs_extent == NULL) panic("unable to allocate bus_space extent"); +#ifdef MULTIPROCESSOR + /* + * Spin up the other processors, but do not give them work to + * do yet. + * On MVME188 boards, the system hangs if secondary processors + * try to issue BUG calls (i.e. when printing their information + * on console), so we postpone this to the end of autoconf. + */ + if (brdtyp == BRD_188) + startuphook_establish(cpu_hatch_secondary_processors, NULL); + else + cpu_hatch_secondary_processors(NULL); +#endif + (void)config_search(mainbus_scan, self, args); } |