diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:06:00 +0000 |
commit | b15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch) | |
tree | 1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/patches-rt/0154-x86-fpu-Simplify-fpregs_-un-lock.patch | |
parent | Adding upstream version 5.10.209. (diff) | |
download | linux-debian.tar.xz linux-debian.zip |
Adding debian version 5.10.209-2.debian/5.10.209-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0154-x86-fpu-Simplify-fpregs_-un-lock.patch')
-rw-r--r-- | debian/patches-rt/0154-x86-fpu-Simplify-fpregs_-un-lock.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches-rt/0154-x86-fpu-Simplify-fpregs_-un-lock.patch b/debian/patches-rt/0154-x86-fpu-Simplify-fpregs_-un-lock.patch new file mode 100644 index 000000000..1cde7fb8e --- /dev/null +++ b/debian/patches-rt/0154-x86-fpu-Simplify-fpregs_-un-lock.patch @@ -0,0 +1,47 @@ +From 8ca0011428a338becf8c390a74dba375610d693f Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 27 Oct 2020 11:09:50 +0100 +Subject: [PATCH 154/323] x86/fpu: Simplify fpregs_[un]lock() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz + +There is no point in disabling preemption and then disabling bottom +halfs. + +Just disabling bottom halfs is sufficient as it implicitly disables +preemption on !RT kernels. + +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Link: https://lore.kernel.org/r/20201027101349.455380473@linutronix.de +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + arch/x86/include/asm/fpu/api.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/include/asm/fpu/api.h b/arch/x86/include/asm/fpu/api.h +index 8b9bfaad6e66..5174c0a640ef 100644 +--- a/arch/x86/include/asm/fpu/api.h ++++ b/arch/x86/include/asm/fpu/api.h +@@ -40,17 +40,18 @@ static inline void kernel_fpu_begin(void) + * A context switch will (and softirq might) save CPU's FPU registers to + * fpu->state and set TIF_NEED_FPU_LOAD leaving CPU's FPU registers in + * a random state. ++ * ++ * local_bh_disable() protects against both preemption and soft interrupts ++ * on !RT kernels. + */ + static inline void fpregs_lock(void) + { +- preempt_disable(); + local_bh_disable(); + } + + static inline void fpregs_unlock(void) + { + local_bh_enable(); +- preempt_enable(); + } + + #ifdef CONFIG_X86_DEBUG_FPU +-- +2.43.0 + |