There's now some per-cpu initialization that occurs before the secondary
cpus are told to begin running. Since the seconedary cpus weren't being added to the cpu_info list until then, that initialization wasn't being done and resulted in crashes on the secondary cpus. Add the secondary cpus to the cpu_info_list after they've been started (but waiting to be told to start running). This fixes the problem specifically stated in PR port-alpha/41106. MP alphas will now at least boot and begin running, but will eventually crash in various ways later.
This commit is contained in:
parent
0192905bb1
commit
66b730fd58
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: cpu.c,v 1.85 2009/03/14 15:35:59 dsl Exp $ */
|
/* $NetBSD: cpu.c,v 1.86 2009/09/06 18:06:24 mhitch Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||||
|
|
||||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.85 2009/03/14 15:35:59 dsl Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.86 2009/09/06 18:06:24 mhitch Exp $");
|
||||||
|
|
||||||
#include "opt_ddb.h"
|
#include "opt_ddb.h"
|
||||||
#include "opt_multiprocessor.h"
|
#include "opt_multiprocessor.h"
|
||||||
|
@ -331,6 +331,12 @@ recognized:
|
||||||
* on its merry way.
|
* on its merry way.
|
||||||
*/
|
*/
|
||||||
cpu_boot_secondary(ci);
|
cpu_boot_secondary(ci);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Link the processor into the list.
|
||||||
|
*/
|
||||||
|
ci->ci_next = cpu_info_list->ci_next;
|
||||||
|
cpu_info_list->ci_next = ci;
|
||||||
#else /* ! MULTIPROCESSOR */
|
#else /* ! MULTIPROCESSOR */
|
||||||
printf("%s: processor off-line; multiprocessor support "
|
printf("%s: processor off-line; multiprocessor support "
|
||||||
"not present in kernel\n", sc->sc_dev.dv_xname);
|
"not present in kernel\n", sc->sc_dev.dv_xname);
|
||||||
|
@ -404,10 +410,8 @@ cpu_boot_secondary_processors(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Link the processor into the list, and launch it.
|
* Launch the processor.
|
||||||
*/
|
*/
|
||||||
ci->ci_next = cpu_info_list->ci_next;
|
|
||||||
cpu_info_list->ci_next = ci;
|
|
||||||
atomic_or_ulong(&ci->ci_flags, CPUF_RUNNING);
|
atomic_or_ulong(&ci->ci_flags, CPUF_RUNNING);
|
||||||
atomic_or_ulong(&cpus_running, (1U << i));
|
atomic_or_ulong(&cpus_running, (1U << i));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue