summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0259-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:06:00 +0000
commitb15a952c52a6825376d3e7f6c1bf5c886c6d8b74 (patch)
tree1500f2f8f276908a36d8126cb632c0d6b1276764 /debian/patches-rt/0259-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch
parentAdding upstream version 5.10.209. (diff)
downloadlinux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.tar.xz
linux-b15a952c52a6825376d3e7f6c1bf5c886c6d8b74.zip
Adding debian version 5.10.209-2.debian/5.10.209-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0259-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch')
-rw-r--r--debian/patches-rt/0259-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/patches-rt/0259-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch b/debian/patches-rt/0259-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch
new file mode 100644
index 000000000..44c4cc8c2
--- /dev/null
+++ b/debian/patches-rt/0259-x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch
@@ -0,0 +1,35 @@
+From 367fe43dc09205ecc5fcdca95276fc481e7ccd9f Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 30 Jun 2020 11:45:14 +0200
+Subject: [PATCH 259/323] x86/entry: Use should_resched() in
+ idtentry_exit_cond_resched()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.204-rt100.tar.xz
+
+The TIF_NEED_RESCHED bit is inlined on x86 into the preemption counter.
+By using should_resched(0) instead of need_resched() the same check can
+be performed which uses the same variable as 'preempt_count()` which was
+issued before.
+
+Use should_resched(0) instead need_resched().
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ kernel/entry/common.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/entry/common.c b/kernel/entry/common.c
+index e6da86039ccf..f32250adb681 100644
+--- a/kernel/entry/common.c
++++ b/kernel/entry/common.c
+@@ -371,7 +371,7 @@ void irqentry_exit_cond_resched(void)
+ rcu_irq_exit_check_preempt();
+ if (IS_ENABLED(CONFIG_DEBUG_ENTRY))
+ WARN_ON_ONCE(!on_thread_stack());
+- if (need_resched())
++ if (should_resched(0))
+ preempt_schedule_irq();
+ }
+ }
+--
+2.43.0
+