Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Call cpu_speculation_init on i386 too. We don't hav...



details:   https://anonhg.NetBSD.org/src/rev/dae121d92f33
branches:  trunk
changeset: 831543:dae121d92f33
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Apr 05 08:43:07 2018 +0000

description:
Call cpu_speculation_init on i386 too. We don't have IBRS for i386, but
we do have the AMD DIS_IND method.

diffstat:

 sys/arch/i386/i386/machdep.c |  7 +++++--
 sys/arch/x86/x86/cpu.c       |  6 ++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 6546e5765dd8 -r dae121d92f33 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Thu Apr 05 05:38:59 2018 +0000
+++ b/sys/arch/i386/i386/machdep.c      Thu Apr 05 08:43:07 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.805 2018/04/03 07:20:52 christos Exp $   */
+/*     $NetBSD: machdep.c,v 1.806 2018/04/05 08:43:07 maxv Exp $       */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.805 2018/04/03 07:20:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.806 2018/04/05 08:43:07 maxv Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_freebsd.h"
@@ -1168,6 +1168,9 @@
 
        cpu_probe(&cpu_info_primary);
        cpu_init_msrs(&cpu_info_primary, true);
+#ifndef XEN
+       cpu_speculation_init(&cpu_info_primary);
+#endif
 
 #ifdef PAE
        use_pae = 1;
diff -r 6546e5765dd8 -r dae121d92f33 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Thu Apr 05 05:38:59 2018 +0000
+++ b/sys/arch/x86/x86/cpu.c    Thu Apr 05 08:43:07 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.154 2018/04/04 12:59:49 maxv Exp $   */
+/*     $NetBSD: cpu.c,v 1.155 2018/04/05 08:43:07 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.154 2018/04/04 12:59:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.155 2018/04/05 08:43:07 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -848,9 +848,7 @@
 
        cpu_init_msrs(ci, true);
        cpu_probe(ci);
-#ifdef __x86_64__
        cpu_speculation_init(ci);
-#endif
 
        ci->ci_data.cpu_cc_freq = cpu_info_primary.ci_data.cpu_cc_freq;
        /* cpu_get_tsc_freq(ci); */



Home | Main Index | Thread Index | Old Index