Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 Revert "x86: Add kthread_fpu_enter/exit s...
details: https://anonhg.NetBSD.org/src/rev/c2a45b883655
branches: trunk
changeset: 373811:c2a45b883655
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Mar 03 14:32:27 2023 +0000
description:
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.
diffstat:
sys/arch/i386/i386/genassym.cf | 3 +--
sys/arch/i386/i386/locore.S | 21 +++------------------
2 files changed, 4 insertions(+), 20 deletions(-)
diffs (66 lines):
diff -r 88dfdb366f40 -r c2a45b883655 sys/arch/i386/i386/genassym.cf
--- a/sys/arch/i386/i386/genassym.cf Fri Mar 03 12:53:04 2023 +0000
+++ b/sys/arch/i386/i386/genassym.cf Fri Mar 03 14:32:27 2023 +0000
@@ -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_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)
diff -r 88dfdb366f40 -r c2a45b883655 sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S Fri Mar 03 12:53:04 2023 +0000
+++ b/sys/arch/i386/i386/locore.S Fri Mar 03 14:32:27 2023 +0000
@@ -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 @@
/* 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 @@
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
Home |
Main Index |
Thread Index |
Old Index