From nobody Wed Feb 01 15:17:22 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P6QWk46z0z3cSWN; Wed, 1 Feb 2023 15:17:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P6QWk3YKLz4MWM; Wed, 1 Feb 2023 15:17:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675264642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaVWLbIyn1KTQYWPRSmqMHjDVaFArZxEGBugP0a4Oi4=; b=QOaK52HYMFiz4IDz6vuNNV6U9uoMqk/88fxApLyF4ZcFNQLkw4tuO1uCFtu3vwtFDUWrrB 0nolTPraIyMCYS9Lp0FpK3VvNErZktYPmgJOVmej0PeIDvV7uE9SMrVnO3A+aGeKWvdJdX BigsS/DbE4+UPE6EE0ni+wtI3oU6Gtx8UHczBWsFcwzTPb6myZI6PgO7NJZOzDhmH60om7 DM7lnzCq+eB/rb53x1I0eVCIKm3TlaXBSDwoTQ/7JUjbX7p8HHh+RuLxyTml7HtPuk53BK GwgxuyXDZ/xTIQD+uXo9q/6lFGBVV4/+eBWsYnNteL49DR6r1z+FJno3VFiv/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675264642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xaVWLbIyn1KTQYWPRSmqMHjDVaFArZxEGBugP0a4Oi4=; b=KhvXceGmN2stin5aHxXkw04zLd6x5FNgdGW+nUht0sJ6H0Z4BVzykNtwPtn98bBgOPQcqc 7mYnEIjp96/N8+h3p9+wYwy87508fWVswoGWt1R4KMmlZeCENnKw5yxulhDe7vxhM6ShOt B8SxqgSSvxiUCTn6JycTogiFfV+AQjusiW4w7jwUIwmobhWIrh5DRdzcCD6IhnQlt5Abud vdqHsNQ3nYtbgyiiHM20VnXf/VQIQ6fslcSdaL8cbil6/GNB6mNGa/R9ujoV+YlXihgQwx YfAenDDmO5M+GgLDvEfETV1cc/zwi6dGydLrCSbgw98D+/cAiDdH0VZsqFY5Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675264642; a=rsa-sha256; cv=none; b=IC7LzgTDph1VF3ftCaulWvHgSSzaRNjiKpwxpnkdAPRMTLjL+hAX1mhMksG0iRu4AoBKuR Y3LdcuvzCrX7K18eKoJ4cN95iOhv10OsOpvHUY3+33/VIa430OUM+F0x+t5pwrraXyfHVN 1ePDsyIaCNpbbQ4iB5Y89rYO4OaadYzjLPbJ0RdtpbvSRh0ho//DeMkeeUIVGP8xV+xX1j RJjAZ/QpIP1tZ2n43SLVrnog+2eUUioZbSSNPcldAAbB3H/nNAalqyj6ycOfvi8HmSWmSR LhHHKMOv1o25Y2lF6z0A7Qd0qeOzldS73R7XmBxXnN3+hb4T3Jk+lIkWoNiR5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P6QWk2LwGzK1m; Wed, 1 Feb 2023 15:17:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 311FHMWV059836; Wed, 1 Feb 2023 15:17:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311FHM2G059835; Wed, 1 Feb 2023 15:17:22 GMT (envelope-from git) Date: Wed, 1 Feb 2023 15:17:22 GMT Message-Id: <202302011517.311FHM2G059835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5c32146723ef - main - amd64: Eliminate write only cpu_fxsr. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c32146723ef88b07506c081653898cd2f293a52 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5c32146723ef88b07506c081653898cd2f293a52 commit 5c32146723ef88b07506c081653898cd2f293a52 Author: Dmitry Chagin AuthorDate: 2023-02-01 15:17:06 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-01 15:17:06 +0000 amd64: Eliminate write only cpu_fxsr. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38289 MFC after: 1 week --- sys/amd64/amd64/initcpu.c | 2 +- sys/i386/i386/npx.c | 1 + sys/i386/include/md_var.h | 1 + sys/x86/include/x86_var.h | 1 - sys/x86/x86/identcpu.c | 1 - 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index cddf8502437e..16780a9e069b 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -279,7 +279,7 @@ initializecpu(void) cr4 = rcr4(); if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { cr4 |= CR4_FXSR | CR4_XMM; - cpu_fxsr = hw_instruction_sse = 1; + hw_instruction_sse = 1; } if (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) cr4 |= CR4_FSGSBASE; diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c index 2e3c21583d88..3d4f2f2a60c8 100644 --- a/sys/i386/i386/npx.c +++ b/sys/i386/i386/npx.c @@ -175,6 +175,7 @@ SYSCTL_INT(_hw, OID_AUTO, lazy_fpu_switch, CTLFLAG_RWTUN | CTLFLAG_NOFETCH, &lazy_fpu_switch, 0, "Lazily load FPU context after context switch"); +u_int cpu_fxsr; /* SSE enabled */ int use_xsave; uint64_t xsave_mask; static uma_zone_t fpu_save_area_zone; diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 88b036a9cc24..d4fa7668b5f3 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -36,6 +36,7 @@ #include +extern u_int cpu_fxsr; extern u_int cyrix_did; #if defined(I586_CPU) && !defined(NO_F00F_HACK) extern int has_f00f_bug; diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index 38a332e36078..343fa02a1cf5 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -53,7 +53,6 @@ extern u_int cpu_stdext_feature; extern u_int cpu_stdext_feature2; extern u_int cpu_stdext_feature3; extern uint64_t cpu_ia32_arch_caps; -extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; extern u_int cpu_max_ext_state_size; diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 7b2d32d9c7a3..70bca3559555 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -106,7 +106,6 @@ u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */ u_int cpu_procinfo2; /* Multicore info */ char cpu_vendor[20]; /* CPU Origin code */ u_int cpu_vendor_id; /* CPU vendor ID */ -u_int cpu_fxsr; /* SSE enabled */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; /* %ebx */