Module Name:    src
Committed By:   maxv
Date:           Mon Nov 12 18:10:37 UTC 2018

Modified Files:
        src/sys/arch/x86/x86: cpu.c

Log Message:
Add a comment explaining an important rule. Just to better highlight that
this rule is actually not respected.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/arch/x86/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.161 src/sys/arch/x86/x86/cpu.c:1.162
--- src/sys/arch/x86/x86/cpu.c:1.161	Mon Sep  3 16:29:29 2018
+++ src/sys/arch/x86/x86/cpu.c	Mon Nov 12 18:10:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.161 2018/09/03 16:29:29 riastradh Exp $	*/
+/*	$NetBSD: cpu.c,v 1.162 2018/11/12 18:10:36 maxv Exp $	*/
 
 /*
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.161 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.162 2018/11/12 18:10:36 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -846,6 +846,13 @@ cpu_hatch(void *v)
 	struct pcb *pcb;
 	int s, i;
 
+	/* ------------------------------------------------------------- */
+
+	/*
+	 * This section of code must be compiled with SSP disabled, to
+	 * prevent a race against cpu0. See sys/conf/ssp.mk.
+	 */
+
 	cpu_init_msrs(ci, true);
 	cpu_probe(ci);
 	cpu_speculation_init(ci);
@@ -863,6 +870,8 @@ cpu_hatch(void *v)
 	atomic_or_32(&ci->ci_flags, CPUF_PRESENT);
 	tsc_sync_ap(ci);
 
+	/* ------------------------------------------------------------- */
+
 	/*
 	 * Wait to be brought online.
 	 *

Reply via email to