Initialize curthread before we save the APs MCA state. Saving the
MCA state requires a spin lock, which requires a valid curthread. This change allows SMP kernels to boot into multi-user again. While here, update the copyright notice and use __FBSDID for the revision string.
This commit is contained in:
parent
76b5c0aa50
commit
64c92ba929
@ -1,4 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2001-2005 Marcel Moolenaar
|
||||
* Copyright (c) 2000 Doug Rabson
|
||||
* All rights reserved.
|
||||
*
|
||||
@ -22,10 +23,11 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_kstack_pages.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -104,6 +106,10 @@ ia64_ap_startup(void)
|
||||
|
||||
__asm __volatile("ssm psr.i;; srlz.d;;");
|
||||
|
||||
/* Initialize curthread. */
|
||||
KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread"));
|
||||
PCPU_SET(curthread, PCPU_GET(idlethread));
|
||||
|
||||
/*
|
||||
* Get and save the CPU specific MCA records. Should we get the
|
||||
* MCA state for each processor, or just the CMC state?
|
||||
@ -111,10 +117,6 @@ ia64_ap_startup(void)
|
||||
ia64_mca_save_state(SAL_INFO_MCA);
|
||||
ia64_mca_save_state(SAL_INFO_CMC);
|
||||
|
||||
/* Initialize curthread. */
|
||||
KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread"));
|
||||
PCPU_SET(curthread, PCPU_GET(idlethread));
|
||||
|
||||
ap_awake++;
|
||||
while (!smp_started)
|
||||
/* spin */;
|
||||
|
Loading…
Reference in New Issue
Block a user