Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2019 14:28:14 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r348362 - in stable/11/sys: amd64/amd64 i386/i386 x86/x86
Message-ID:  <201905291428.x4TESEN9034503@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed May 29 14:28:13 2019
New Revision: 348362
URL: https://svnweb.freebsd.org/changeset/base/348362

Log:
  MFC r348075:
  Do not call hw_mds_recalculate() from initializecpu().
  
  Approved by:	re (gjb)

Modified:
  stable/11/sys/amd64/amd64/initcpu.c
  stable/11/sys/i386/i386/initcpu.c
  stable/11/sys/x86/x86/cpu_machdep.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/initcpu.c
==============================================================================
--- stable/11/sys/amd64/amd64/initcpu.c	Wed May 29 14:26:35 2019	(r348361)
+++ stable/11/sys/amd64/amd64/initcpu.c	Wed May 29 14:28:13 2019	(r348362)
@@ -247,7 +247,6 @@ initializecpu(void)
 	}
 	hw_ibrs_recalculate();
 	hw_ssb_recalculate(false);
-	hw_mds_recalculate();
 	switch (cpu_vendor_id) {
 	case CPU_VENDOR_AMD:
 		init_amd();

Modified: stable/11/sys/i386/i386/initcpu.c
==============================================================================
--- stable/11/sys/i386/i386/initcpu.c	Wed May 29 14:26:35 2019	(r348361)
+++ stable/11/sys/i386/i386/initcpu.c	Wed May 29 14:28:13 2019	(r348362)
@@ -769,7 +769,6 @@ initializecpu(void)
 		elf32_nxstack = 1;
 	}
 #endif
-	hw_mds_recalculate();
 	if ((amd_feature & AMDID_RDTSCP) != 0 ||
 	    (cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0)
 		wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid));

Modified: stable/11/sys/x86/x86/cpu_machdep.c
==============================================================================
--- stable/11/sys/x86/x86/cpu_machdep.c	Wed May 29 14:26:35 2019	(r348361)
+++ stable/11/sys/x86/x86/cpu_machdep.c	Wed May 29 14:28:13 2019	(r348362)
@@ -1118,6 +1118,14 @@ hw_mds_recalculate(void)
 	}
 }
 
+static void
+hw_mds_recalculate_boot(void *arg __unused)
+{
+
+	hw_mds_recalculate();
+}
+SYSINIT(mds_recalc, SI_SUB_SMP, SI_ORDER_ANY, hw_mds_recalculate_boot, NULL);
+
 static int
 sysctl_mds_disable_handler(SYSCTL_HANDLER_ARGS)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905291428.x4TESEN9034503>