Module Name: src
Committed By: riastradh
Date: Fri Mar 3 14:32:27 UTC 2023
Modified Files:
src/sys/arch/i386/i386: genassym.cf locore.S
Log Message:
Revert "x86: Add kthread_fpu_enter/exit support, take two -- forgot i386 bits."
kthread_fpu_enter/exit changes broke some hardware, unclear why, to
investigate before fixing and reapplying these changes.
To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/arch/i386/i386/genassym.cf
cvs rdiff -u -r1.193 -r1.194 src/sys/arch/i386/i386/locore.S
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/i386/i386/genassym.cf
diff -u src/sys/arch/i386/i386/genassym.cf:1.132 src/sys/arch/i386/i386/genassym.cf:1.133
--- src/sys/arch/i386/i386/genassym.cf:1.132 Sat Feb 25 18:35:54 2023
+++ src/sys/arch/i386/i386/genassym.cf Fri Mar 3 14:32:27 2023
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.132 2023/02/25 18:35:54 riastradh Exp $
+# $NetBSD: genassym.cf,v 1.133 2023/03/03 14:32:27 riastradh Exp $
#
# Copyright (c) 1998, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -175,7 +175,6 @@ define L_MD_FLAGS offsetof(struct lwp,
define L_MD_ASTPENDING offsetof(struct lwp, l_md.md_astpending)
define LW_SYSTEM LW_SYSTEM
-define LW_SYSTEM_FPU LW_SYSTEM_FPU
define MDL_FPU_IN_CPU MDL_FPU_IN_CPU
define P_FLAG offsetof(struct proc, p_flag)
Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.193 src/sys/arch/i386/i386/locore.S:1.194
--- src/sys/arch/i386/i386/locore.S:1.193 Wed Mar 1 08:38:50 2023
+++ src/sys/arch/i386/i386/locore.S Fri Mar 3 14:32:27 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.193 2023/03/01 08:38:50 riastradh Exp $ */
+/* $NetBSD: locore.S,v 1.194 2023/03/03 14:32:27 riastradh Exp $ */
/*
* Copyright-o-rama!
@@ -128,7 +128,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.193 2023/03/01 08:38:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.194 2023/03/03 14:32:27 riastradh Exp $");
#include "opt_copy_symtab.h"
#include "opt_ddb.h"
@@ -1471,7 +1471,7 @@ ENTRY(cpu_switchto)
/* Don't bother with the rest if switching to a system process. */
testl $LW_SYSTEM,L_FLAG(%edi)
- jnz .Lswitch_system
+ jnz switch_return
#ifndef XENPV
/* Restore thread-private %fs/%gs descriptors. */
@@ -1525,21 +1525,6 @@ switch_return:
popl %ebx
ret
-.Lswitch_system:
- /*
- * If it has LWP_SYSTEM_FPU set, meaning it's running in
- * kthread_fpu_enter/exit, we need to restore the FPU state
- * and enable FPU instructions with fpu_handle_deferred.
- *
- * No need to test MDL_FPU_IN_CPU via HANDLE_DEFERRED_FPU --
- * fpu_switch guarantees it is clear, so we can just call
- * fpu_handle_deferred unconditionally.
- */
- testl $LW_SYSTEM_FPU,L_FLAG(%edi)
- jz switch_return
- call _C_LABEL(fpu_handle_deferred)
- jmp switch_return
-
.Lcopy_iobitmap:
/* Copy I/O bitmap. */
incl _C_LABEL(pmap_iobmp_evcnt)+EV_COUNT