Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Add a comment explaining an important rule....



details:   https://anonhg.NetBSD.org/src/rev/aa549704ee3c
branches:  trunk
changeset: 445787:aa549704ee3c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Nov 12 18:10:36 2018 +0000

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

diffstat:

 sys/arch/x86/x86/cpu.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 5950fadc8023 -r aa549704ee3c sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Mon Nov 12 17:46:53 2018 +0000
+++ b/sys/arch/x86/x86/cpu.c    Mon Nov 12 18:10:36 2018 +0000
@@ -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 @@
        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 @@
        atomic_or_32(&ci->ci_flags, CPUF_PRESENT);
        tsc_sync_ap(ci);
 
+       /* ------------------------------------------------------------- */
+
        /*
         * Wait to be brought online.
         *



Home | Main Index | Thread Index | Old Index