summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch')
-rw-r--r--debian/patches-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/debian/patches-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch b/debian/patches-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch
new file mode 100644
index 000000000..c4b54be3a
--- /dev/null
+++ b/debian/patches-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch
@@ -0,0 +1,53 @@
+From 284c759a4a661cea5ac84fac628731f6b79d6b2e Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Fri, 24 Jul 2009 12:38:56 +0200
+Subject: [PATCH 059/347] preempt: Provide preempt_*_(no)rt variants
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
+
+RT needs a few preempt_disable/enable points which are not necessary
+otherwise. Implement variants to avoid #ifdeffery.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+---
+ include/linux/preempt.h | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/include/linux/preempt.h b/include/linux/preempt.h
+index 3196d0e76719..f7a17fcc3fec 100644
+--- a/include/linux/preempt.h
++++ b/include/linux/preempt.h
+@@ -181,7 +181,11 @@ do { \
+ preempt_count_dec(); \
+ } while (0)
+
+-#define preempt_enable_no_resched() sched_preempt_enable_no_resched()
++#ifdef CONFIG_PREEMPT_RT_BASE
++# define preempt_enable_no_resched() sched_preempt_enable_no_resched()
++#else
++# define preempt_enable_no_resched() preempt_enable()
++#endif
+
+ #define preemptible() (preempt_count() == 0 && !irqs_disabled())
+
+@@ -298,6 +302,18 @@ do { \
+ set_preempt_need_resched(); \
+ } while (0)
+
++#ifdef CONFIG_PREEMPT_RT_FULL
++# define preempt_disable_rt() preempt_disable()
++# define preempt_enable_rt() preempt_enable()
++# define preempt_disable_nort() barrier()
++# define preempt_enable_nort() barrier()
++#else
++# define preempt_disable_rt() barrier()
++# define preempt_enable_rt() barrier()
++# define preempt_disable_nort() preempt_disable()
++# define preempt_enable_nort() preempt_enable()
++#endif
++
+ #ifdef CONFIG_PREEMPT_NOTIFIERS
+
+ struct preempt_notifier;
+--
+2.36.1
+