summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0003-ARM-vfp-Use-vfp_lock-in-vfp_support_entry.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:28:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:28:00 +0000
commit3565071f226432336a54d0193d729fa4508a3394 (patch)
tree4cde13f078f84c0a7785d234fd52edce7c90546a /debian/patches-rt/0003-ARM-vfp-Use-vfp_lock-in-vfp_support_entry.patch
parentAdding upstream version 6.6.15. (diff)
downloadlinux-3565071f226432336a54d0193d729fa4508a3394.tar.xz
linux-3565071f226432336a54d0193d729fa4508a3394.zip
Adding debian version 6.6.15-2.debian/6.6.15-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0003-ARM-vfp-Use-vfp_lock-in-vfp_support_entry.patch')
-rw-r--r--debian/patches-rt/0003-ARM-vfp-Use-vfp_lock-in-vfp_support_entry.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches-rt/0003-ARM-vfp-Use-vfp_lock-in-vfp_support_entry.patch b/debian/patches-rt/0003-ARM-vfp-Use-vfp_lock-in-vfp_support_entry.patch
new file mode 100644
index 000000000..c02278e5a
--- /dev/null
+++ b/debian/patches-rt/0003-ARM-vfp-Use-vfp_lock-in-vfp_support_entry.patch
@@ -0,0 +1,48 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed, 28 Jun 2023 09:36:10 +0200
+Subject: [PATCH 3/4] ARM: vfp: Use vfp_lock() in vfp_support_entry().
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.6/older/patches-6.6.7-rt18.tar.xz
+
+vfp_entry() is invoked from exception handler and is fully preemptible.
+It uses local_bh_disable() to remain uninterrupted while checking the
+VFP state.
+This is not working on PREEMPT_RT because local_bh_disable()
+synchronizes the relevant section but the context remains fully
+preemptible.
+
+Use vfp_lock() for uninterrupted access.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ arch/arm/vfp/vfpmodule.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/arm/vfp/vfpmodule.c
++++ b/arch/arm/vfp/vfpmodule.c
+@@ -708,7 +708,7 @@ static int vfp_support_entry(struct pt_r
+ if (!user_mode(regs))
+ return vfp_kmode_exception(regs, trigger);
+
+- local_bh_disable();
++ vfp_lock();
+ fpexc = fmrx(FPEXC);
+
+ /*
+@@ -787,7 +787,7 @@ static int vfp_support_entry(struct pt_r
+ if (!(fpscr & FPSCR_IXE)) {
+ if (!(fpscr & FPSCR_LENGTH_MASK)) {
+ pr_debug("not VFP\n");
+- local_bh_enable();
++ vfp_unlock();
+ return -ENOEXEC;
+ }
+ fpexc |= FPEXC_DEX;
+@@ -797,7 +797,7 @@ bounce: regs->ARM_pc += 4;
+ VFP_bounce(trigger, fpexc, regs);
+ }
+
+- local_bh_enable();
++ vfp_unlock();
+ return 0;
+ }
+