summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0008-x86-fpu-Remove-user_fpu_begin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0008-x86-fpu-Remove-user_fpu_begin.patch')
-rw-r--r--debian/patches-rt/0008-x86-fpu-Remove-user_fpu_begin.patch83
1 files changed, 0 insertions, 83 deletions
diff --git a/debian/patches-rt/0008-x86-fpu-Remove-user_fpu_begin.patch b/debian/patches-rt/0008-x86-fpu-Remove-user_fpu_begin.patch
deleted file mode 100644
index bcab836ce..000000000
--- a/debian/patches-rt/0008-x86-fpu-Remove-user_fpu_begin.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Date: Thu, 18 Oct 2018 18:34:11 +0200
-Subject: [PATCH 08/27] x86/fpu: Remove user_fpu_begin()
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.10-rt7.tar.xz
-
-user_fpu_begin() sets fpu_fpregs_owner_ctx to task's fpu struct. This is
-always the case since there is no lazy FPU anymore.
-
-fpu_fpregs_owner_ctx is used during context switch to decide if it needs
-to load the saved registers or if the currently loaded registers are
-valid. It could be skipped during
- taskA -> kernel thread -> taskA
-
-because the switch to kernel thread would not alter the CPU's FPU state.
-
-Since this field is always updated during context switch and never
-invalidated, setting it manually (in user context) makes no difference.
-A kernel thread with kernel_fpu_begin() block could set
-fpu_fpregs_owner_ctx to NULL but a kernel thread does not use
-user_fpu_begin().
-This is a leftover from the lazy-FPU time.
-
-Remove user_fpu_begin(), it does not change fpu_fpregs_owner_ctx's
-content.
-
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Reviewed-by: Borislav Petkov <bp@suse.de>
----
- arch/x86/include/asm/fpu/internal.h | 17 -----------------
- arch/x86/kernel/fpu/core.c | 4 +---
- arch/x86/kernel/fpu/signal.c | 1 -
- 3 files changed, 1 insertion(+), 21 deletions(-)
-
---- a/arch/x86/include/asm/fpu/internal.h
-+++ b/arch/x86/include/asm/fpu/internal.h
-@@ -564,23 +564,6 @@ static inline void switch_fpu_finish(str
- }
-
- /*
-- * Needs to be preemption-safe.
-- *
-- * NOTE! user_fpu_begin() must be used only immediately before restoring
-- * the save state. It does not do any saving/restoring on its own. In
-- * lazy FPU mode, it is just an optimization to avoid a #NM exception,
-- * the task can lose the FPU right after preempt_enable().
-- */
--static inline void user_fpu_begin(void)
--{
-- struct fpu *fpu = &current->thread.fpu;
--
-- preempt_disable();
-- fpregs_activate(fpu);
-- preempt_enable();
--}
--
--/*
- * MXCSR and XCR definitions:
- */
-
---- a/arch/x86/kernel/fpu/core.c
-+++ b/arch/x86/kernel/fpu/core.c
-@@ -335,10 +335,8 @@ void fpu__clear(struct fpu *fpu)
- * Make sure fpstate is cleared and initialized.
- */
- fpu__initialize(fpu);
-- if (static_cpu_has(X86_FEATURE_FPU)) {
-- user_fpu_begin();
-+ if (static_cpu_has(X86_FEATURE_FPU))
- copy_init_fpstate_to_fpregs();
-- }
- }
-
- /*
---- a/arch/x86/kernel/fpu/signal.c
-+++ b/arch/x86/kernel/fpu/signal.c
-@@ -322,7 +322,6 @@ static int __fpu__restore_sig(void __use
- * For 64-bit frames and 32-bit fsave frames, restore the user
- * state to the registers directly (with exceptions handled).
- */
-- user_fpu_begin();
- if (copy_user_to_fpregs_zeroing(buf_fx, xfeatures, fx_only)) {
- fpu__clear(fpu);
- return -1;