Module Name: src Committed By: riastradh Date: Fri Mar 3 14:40:00 UTC 2023
Modified Files: src/sys/arch/x86/x86: cpu.c Log Message: x86: Call fpuinit_mxcsr_mask only once. No need to call it again and again on the secondary CPUs to compute what should be the same mxcsr mask. (If it's not, we have deeper problems!) To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 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.207 src/sys/arch/x86/x86/cpu.c:1.208 --- src/sys/arch/x86/x86/cpu.c:1.207 Sat Feb 25 00:31:40 2023 +++ src/sys/arch/x86/x86/cpu.c Fri Mar 3 14:40:00 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.207 2023/02/25 00:31:40 riastradh Exp $ */ +/* $NetBSD: cpu.c,v 1.208 2023/03/03 14:40:00 riastradh Exp $ */ /* * Copyright (c) 2000-2020 NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.207 2023/02/25 00:31:40 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.208 2023/03/03 14:40:00 riastradh Exp $"); #include "opt_ddb.h" #include "opt_mpbios.h" /* for MPDEBUG */ @@ -701,7 +701,8 @@ cpu_init(struct cpu_info *ci) ci->ci_feat_val[1] = descs[2]; } - if (x86_fpu_save >= FPU_SAVE_FXSAVE) { + if (CPU_IS_PRIMARY(ci) && + x86_fpu_save >= FPU_SAVE_FXSAVE) { fpuinit_mxcsr_mask(); }