Author: kib
Date: Wed May 29 13:33:29 2019
New Revision: 348357
URL: https://svnweb.freebsd.org/changeset/base/348357

Log:
  MFC r348075:
  Do not call hw_mds_recalculate() from initializecpu().

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

Modified: stable/12/sys/amd64/amd64/initcpu.c
==============================================================================
--- stable/12/sys/amd64/amd64/initcpu.c Wed May 29 13:17:58 2019        
(r348356)
+++ stable/12/sys/amd64/amd64/initcpu.c Wed May 29 13:33:29 2019        
(r348357)
@@ -257,7 +257,6 @@ initializecpu(void)
        hw_ibrs_recalculate();
        hw_ssb_recalculate(false);
        amd64_syscall_ret_flush_l1d_recalc();
-       hw_mds_recalculate();
        switch (cpu_vendor_id) {
        case CPU_VENDOR_AMD:
                init_amd();

Modified: stable/12/sys/i386/i386/initcpu.c
==============================================================================
--- stable/12/sys/i386/i386/initcpu.c   Wed May 29 13:17:58 2019        
(r348356)
+++ stable/12/sys/i386/i386/initcpu.c   Wed May 29 13:33:29 2019        
(r348357)
@@ -754,7 +754,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/12/sys/x86/x86/cpu_machdep.c
==============================================================================
--- stable/12/sys/x86/x86/cpu_machdep.c Wed May 29 13:17:58 2019        
(r348356)
+++ stable/12/sys/x86/x86/cpu_machdep.c Wed May 29 13:33:29 2019        
(r348357)
@@ -1091,6 +1091,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)
 {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to