diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-07-13 01:07:57 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-07-13 01:07:57 +0000 |
commit | 6199fe70f17b899f7a78c8e13cc3b487f88cf416 (patch) | |
tree | cf3dc8d5fb35f12dbe0f8b9184ef051824b4c4ef | |
parent | 0bf85b62d46da594bea6cbcf540e01677fde4de4 (diff) | |
download | FreeBSD-src-6199fe70f17b899f7a78c8e13cc3b487f88cf416.zip FreeBSD-src-6199fe70f17b899f7a78c8e13cc3b487f88cf416.tar.gz |
Cleanup old stop_cpus/restart_cpus() cruft.
Leave TEST_TEST1 for now.
-rw-r--r-- | sys/kern/init_smp.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/kern/init_smp.c b/sys/kern/init_smp.c index b2ade15..2f3cbf7 100644 --- a/sys/kern/init_smp.c +++ b/sys/kern/init_smp.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: init_smp.c,v 1.2 1997/07/08 23:21:34 smp Exp smp $ + * $Id: init_smp.c,v 1.4 1997/07/12 22:33:18 smp Exp smp $ */ #include "opt_smp.h" @@ -44,7 +44,7 @@ #include <machine/cpu.h> #include <machine/smp.h> -#include <machine/smptests.h> /** IGNORE_IDLEPROCS */ +#include <machine/smptests.h> /** IGNORE_IDLEPROCS, TEST_TEST1 */ #include <vm/vm.h> #include <vm/vm_param.h> @@ -53,6 +53,10 @@ #include <vm/vm_map.h> #include <sys/user.h> +#if defined(TEST_TEST1) +void ipi_test1(void); +#endif /** TEST_TEST1 */ + int smp_active = 0; /* are the APs allowed to run? */ static int @@ -190,8 +194,17 @@ secondary_main() printf("SMP: AP CPU #%d LAUNCHED!! Starting Scheduling...\n", cpuid); +#if defined(TEST_TEST1) +/* XXX this would be dangerous for > 2 CPUs! */ + if (cpuid == IPI_TARGET_TEST1) { + lapic.tpr = 0xff; + ipi_test1(); + } +#else curproc = NULL; /* ensure no context to save */ cpu_switch(curproc); /* start first process */ +#endif /** TEST_TEST1 */ + panic("switch returned!"); } @@ -312,7 +325,6 @@ void *dummy; panic("too many cpus"); } else { MSG_FINAL_CPU; - /* * It's safe to send IPI's now * that all CPUs are online. |