diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2021-03-12 23:17:33 +0100 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2021-03-12 23:20:35 +0100 |
commit | 0d086d78355775f2a9449e54382059310ebfc618 (patch) | |
tree | 987103f4ddd594a0214f1460f13c2f7801f35d57 /debian | |
parent | c74917a09dedf4e582b4f0578a43c728b5401898 (diff) | |
download | linux-debian-0d086d78355775f2a9449e54382059310ebfc618.tar.gz |
[rt] Update to 5.10.21-rt34
Diffstat (limited to 'debian')
299 files changed, 1013 insertions, 868 deletions
diff --git a/debian/changelog b/debian/changelog index 8839e8193..f44b0bcf2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -631,6 +631,7 @@ linux (5.10.23-1) UNRELEASED; urgency=medium * [rt] Refresh "printk: remove deferred printing" * [rt] Refresh "mm/memcontrol: Replace local_irq_disable with local locks" * ethernet: alx: fix order of calls on resume (Closes: #983595) + * [rt] Update to 5.10.21-rt34 -- Salvatore Bonaccorso <carnil@debian.org> Fri, 05 Mar 2021 17:46:35 +0100 diff --git a/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index 2a4e50731..3da7615c9 100644 --- a/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Mon, 28 May 2018 15:24:20 +0200 Subject: [PATCH 1/4] Split IRQ-off and zone->lock while freeing pages from PCP list #1 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. diff --git a/debian/patches-rt/0001-chelsio-cxgb-Replace-the-workqueue-with-threaded-int.patch b/debian/patches-rt/0001-chelsio-cxgb-Replace-the-workqueue-with-threaded-int.patch index d2aa7f35b..4a5836c06 100644 --- a/debian/patches-rt/0001-chelsio-cxgb-Replace-the-workqueue-with-threaded-int.patch +++ b/debian/patches-rt/0001-chelsio-cxgb-Replace-the-workqueue-with-threaded-int.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 2 Feb 2021 18:01:03 +0100 Subject: [PATCH 1/2] chelsio: cxgb: Replace the workqueue with threaded interrupt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The external interrupt (F_PL_INTR_EXT) needs to be handled in a process context and this is accomplished by utilizing a workqueue. diff --git a/debian/patches-rt/0001-kthread-Move-prio-affinite-change-into-the-newly-cre.patch b/debian/patches-rt/0001-kthread-Move-prio-affinite-change-into-the-newly-cre.patch index 6f95f9035..6701ed303 100644 --- a/debian/patches-rt/0001-kthread-Move-prio-affinite-change-into-the-newly-cre.patch +++ b/debian/patches-rt/0001-kthread-Move-prio-affinite-change-into-the-newly-cre.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 9 Nov 2020 21:30:41 +0100 Subject: [PATCH 1/2] kthread: Move prio/affinite change into the newly created thread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz With enabled threaded interrupts the nouveau driver reported the following: diff --git a/debian/patches-rt/0001-locking-rtmutex-Remove-cruft.patch b/debian/patches-rt/0001-locking-rtmutex-Remove-cruft.patch index 4c1b3c14d..e11cf5454 100644 --- a/debian/patches-rt/0001-locking-rtmutex-Remove-cruft.patch +++ b/debian/patches-rt/0001-locking-rtmutex-Remove-cruft.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 29 Sep 2020 15:21:17 +0200 Subject: [PATCH 01/22] locking/rtmutex: Remove cruft -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Most of this is around since the very beginning. I'm not sure if this was used while the rtmutex-deadlock-tester was around but today it seems diff --git a/debian/patches-rt/0001-mm-highmem-Un-EXPORT-__kmap_atomic_idx.patch b/debian/patches-rt/0001-mm-highmem-Un-EXPORT-__kmap_atomic_idx.patch index cb06f10e7..122c9572a 100644 --- a/debian/patches-rt/0001-mm-highmem-Un-EXPORT-__kmap_atomic_idx.patch +++ b/debian/patches-rt/0001-mm-highmem-Un-EXPORT-__kmap_atomic_idx.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:13 +0100 Subject: [PATCH 01/37] mm/highmem: Un-EXPORT __kmap_atomic_idx() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Nothing in modules can use that. diff --git a/debian/patches-rt/0001-parisc-Remove-bogus-__IRQ_STAT-macro.patch b/debian/patches-rt/0001-parisc-Remove-bogus-__IRQ_STAT-macro.patch index 24a908fb7..fbeae08ff 100644 --- a/debian/patches-rt/0001-parisc-Remove-bogus-__IRQ_STAT-macro.patch +++ b/debian/patches-rt/0001-parisc-Remove-bogus-__IRQ_STAT-macro.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:08 +0100 Subject: [PATCH 01/12] parisc: Remove bogus __IRQ_STAT macro -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz This is a leftover from a historical array based implementation and unused. diff --git a/debian/patches-rt/0001-printk-inline-log_output-log_store-in-vprintk_store.patch b/debian/patches-rt/0001-printk-inline-log_output-log_store-in-vprintk_store.patch index 4907f78d6..8bbed141d 100644 --- a/debian/patches-rt/0001-printk-inline-log_output-log_store-in-vprintk_store.patch +++ b/debian/patches-rt/0001-printk-inline-log_output-log_store-in-vprintk_store.patch @@ -2,7 +2,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Wed, 9 Dec 2020 01:50:52 +0106 Subject: [PATCH 01/21] printk: inline log_output(),log_store() in vprintk_store() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In preparation for removing logbuf_lock, inline log_output() and log_store() into vprintk_store(). This will simplify dealing @@ -73,7 +73,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int dmesg_restrict = IS_ENABLED(CONFIG_SECURITY_DMESG_RESTRICT); static int syslog_action_restricted(int type) -@@ -1925,44 +1879,28 @@ static inline u32 printk_caller_id(void) +@@ -1931,44 +1885,28 @@ static inline u32 printk_caller_id(void) 0x80000000 + raw_smp_processor_id(); } @@ -133,7 +133,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * The printf needs to come first; we need the syslog -@@ -2001,7 +1939,58 @@ int vprintk_store(int facility, int leve +@@ -2007,7 +1945,58 @@ int vprintk_store(int facility, int leve if (dev_info) lflags |= LOG_NEWLINE; diff --git a/debian/patches-rt/0001-rcu-Make-RCU_BOOST-default-on-CONFIG_PREEMPT_RT.patch b/debian/patches-rt/0001-rcu-Make-RCU_BOOST-default-on-CONFIG_PREEMPT_RT.patch index e9f86d7cc..424e59288 100644 --- a/debian/patches-rt/0001-rcu-Make-RCU_BOOST-default-on-CONFIG_PREEMPT_RT.patch +++ b/debian/patches-rt/0001-rcu-Make-RCU_BOOST-default-on-CONFIG_PREEMPT_RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 15 Dec 2020 15:16:45 +0100 Subject: [PATCH 1/5] rcu: Make RCU_BOOST default on CONFIG_PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On PREEMPT_RT kernels, RCU callbacks are deferred to the `rcuc' kthread. This can stall RCU grace periods due to lengthy preemption not only of RCU diff --git a/debian/patches-rt/0001-sched-cputime-Remove-symbol-exports-from-IRQ-time-ac.patch b/debian/patches-rt/0001-sched-cputime-Remove-symbol-exports-from-IRQ-time-ac.patch index 4a2fbb97e..3af5ba580 100644 --- a/debian/patches-rt/0001-sched-cputime-Remove-symbol-exports-from-IRQ-time-ac.patch +++ b/debian/patches-rt/0001-sched-cputime-Remove-symbol-exports-from-IRQ-time-ac.patch @@ -2,7 +2,7 @@ From: Frederic Weisbecker <frederic@kernel.org> Date: Wed, 2 Dec 2020 12:57:28 +0100 Subject: [PATCH 1/5] sched/cputime: Remove symbol exports from IRQ time accounting -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz account_irq_enter_time() and account_irq_exit_time() are not called from modules. EXPORT_SYMBOL_GPL() can be safely removed from the IRQ @@ -19,7 +19,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c -@@ -226,7 +226,7 @@ void vtime_flush(struct task_struct *tsk +@@ -227,7 +227,7 @@ void vtime_flush(struct task_struct *tsk * Update process times based on virtual cpu times stored by entry.S * to the lowcore fields user_timer, system_timer & steal_clock. */ @@ -28,7 +28,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { u64 timer; -@@ -245,12 +245,12 @@ void vtime_account_irq_enter(struct task +@@ -246,12 +246,12 @@ void vtime_account_irq_enter(struct task virt_timer_forward(timer); } diff --git a/debian/patches-rt/0001-stop_machine-Add-function-and-caller-debug-info.patch b/debian/patches-rt/0001-stop_machine-Add-function-and-caller-debug-info.patch index cb5c27bea..ff1308429 100644 --- a/debian/patches-rt/0001-stop_machine-Add-function-and-caller-debug-info.patch +++ b/debian/patches-rt/0001-stop_machine-Add-function-and-caller-debug-info.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:11:59 +0200 Subject: [PATCH 01/19] stop_machine: Add function and caller debug info -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Crashes in stop-machine are hard to connect to the calling code, add a little something to help with that. diff --git a/debian/patches-rt/0001-softirq-Replace-barrier-with-cpu_relax-in-tasklet_un.patch b/debian/patches-rt/0001-tasklets-Replace-barrier-with-cpu_relax-in-tasklet_u.patch index adee5e9ac..e31803643 100644 --- a/debian/patches-rt/0001-softirq-Replace-barrier-with-cpu_relax-in-tasklet_un.patch +++ b/debian/patches-rt/0001-tasklets-Replace-barrier-with-cpu_relax-in-tasklet_u.patch @@ -1,8 +1,8 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:58 +0100 -Subject: [PATCH 01/19] softirq: Replace barrier() with cpu_relax() in +Date: Tue, 9 Mar 2021 09:42:04 +0100 +Subject: [PATCH 01/20] tasklets: Replace barrier() with cpu_relax() in tasklet_unlock_wait() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz A barrier() in a tight loop which waits for something to happen on a remote CPU is a pointless exercise. Replace it with cpu_relax() which allows HT @@ -10,7 +10,7 @@ siblings to make progress. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Link: https://lore.kernel.org/r/20201204170805.430113367@linutronix.de +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/interrupt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/patches-rt/0001-tracing-Merge-irqflags-preempt-counter.patch b/debian/patches-rt/0001-tracing-Merge-irqflags-preempt-counter.patch index 6ee7cd83f..27e2065be 100644 --- a/debian/patches-rt/0001-tracing-Merge-irqflags-preempt-counter.patch +++ b/debian/patches-rt/0001-tracing-Merge-irqflags-preempt-counter.patch @@ -4,7 +4,7 @@ Subject: [PATCH 1/4] tracing: Merge irqflags + preempt counter. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The state of the interrupts (irqflags) and the preemption counter are both passed down to tracing_generic_entry_update(). Only one bit of diff --git a/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index 04525b450..f4c407653 100644 --- a/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Mon, 28 May 2018 15:24:21 +0200 Subject: [PATCH 2/4] Split IRQ-off and zone->lock while freeing pages from PCP list #2 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. diff --git a/debian/patches-rt/0002-chelsio-cxgb-Disable-the-card-on-error-in-threaded-i.patch b/debian/patches-rt/0002-chelsio-cxgb-Disable-the-card-on-error-in-threaded-i.patch index bd5b06610..837af4e7a 100644 --- a/debian/patches-rt/0002-chelsio-cxgb-Disable-the-card-on-error-in-threaded-i.patch +++ b/debian/patches-rt/0002-chelsio-cxgb-Disable-the-card-on-error-in-threaded-i.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 2 Feb 2021 18:01:04 +0100 Subject: [PATCH 2/2] chelsio: cxgb: Disable the card on error in threaded interrupt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz t1_fatal_err() is invoked from the interrupt handler. The bad part is that it invokes (via t1_sge_stop()) del_timer_sync() and tasklet_kill(). diff --git a/debian/patches-rt/0002-genirq-Move-prio-assignment-into-the-newly-created-t.patch b/debian/patches-rt/0002-genirq-Move-prio-assignment-into-the-newly-created-t.patch index 89e2a1b62..e467add64 100644 --- a/debian/patches-rt/0002-genirq-Move-prio-assignment-into-the-newly-created-t.patch +++ b/debian/patches-rt/0002-genirq-Move-prio-assignment-into-the-newly-created-t.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 9 Nov 2020 23:32:39 +0100 Subject: [PATCH 2/2] genirq: Move prio assignment into the newly created thread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz With enabled threaded interrupts the nouveau driver reported the following: diff --git a/debian/patches-rt/0002-highmem-Remove-unused-functions.patch b/debian/patches-rt/0002-highmem-Remove-unused-functions.patch index 2f98f9ea6..20f6038a3 100644 --- a/debian/patches-rt/0002-highmem-Remove-unused-functions.patch +++ b/debian/patches-rt/0002-highmem-Remove-unused-functions.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:14 +0100 Subject: [PATCH 02/37] highmem: Remove unused functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Nothing uses totalhigh_pages_dec() and totalhigh_pages_set(). diff --git a/debian/patches-rt/0002-locking-rtmutex-Remove-output-from-deadlock-detector.patch b/debian/patches-rt/0002-locking-rtmutex-Remove-output-from-deadlock-detector.patch index a827ba9cd..fbac35421 100644 --- a/debian/patches-rt/0002-locking-rtmutex-Remove-output-from-deadlock-detector.patch +++ b/debian/patches-rt/0002-locking-rtmutex-Remove-output-from-deadlock-detector.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 29 Sep 2020 16:05:11 +0200 Subject: [PATCH 02/22] locking/rtmutex: Remove output from deadlock detector. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In commit f5694788ad8da ("rt_mutex: Add lockdep annotations") diff --git a/debian/patches-rt/0002-printk-limit-second-loop-of-syslog_print_all.patch b/debian/patches-rt/0002-printk-limit-second-loop-of-syslog_print_all.patch index f3cb95649..aa8f50cd9 100644 --- a/debian/patches-rt/0002-printk-limit-second-loop-of-syslog_print_all.patch +++ b/debian/patches-rt/0002-printk-limit-second-loop-of-syslog_print_all.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Wed, 17 Feb 2021 16:15:31 +0100 Subject: [PATCH 02/28] printk: limit second loop of syslog_print_all -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The second loop of syslog_print_all() subtracts lengths that were added in the first loop. With commit b031a684bfd0 ("printk: remove diff --git a/debian/patches-rt/0002-printk-remove-logbuf_lock-writer-protection-of-ringb.patch b/debian/patches-rt/0002-printk-remove-logbuf_lock-writer-protection-of-ringb.patch index 20f43941a..a2efd276f 100644 --- a/debian/patches-rt/0002-printk-remove-logbuf_lock-writer-protection-of-ringb.patch +++ b/debian/patches-rt/0002-printk-remove-logbuf_lock-writer-protection-of-ringb.patch @@ -2,7 +2,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Wed, 9 Dec 2020 01:50:53 +0106 Subject: [PATCH 02/21] printk: remove logbuf_lock writer-protection of ringbuffer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Since the ringbuffer is lockless, there is no need for it to be protected by @logbuf_lock. Remove @logbuf_lock writer-protection of @@ -34,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1126,7 +1126,7 @@ void __init setup_log_buf(int early) +@@ -1127,7 +1127,7 @@ void __init setup_log_buf(int early) new_descs, ilog2(new_descs_count), new_infos); @@ -43,7 +43,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> log_buf_len = new_log_buf_len; log_buf = new_log_buf; -@@ -1143,7 +1143,7 @@ void __init setup_log_buf(int early) +@@ -1144,7 +1144,7 @@ void __init setup_log_buf(int early) */ prb = &printk_rb_dynamic; @@ -52,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (seq != prb_next_seq(&printk_rb_static)) { pr_err("dropped %llu messages\n", -@@ -1879,18 +1879,90 @@ static inline u32 printk_caller_id(void) +@@ -1885,18 +1885,90 @@ static inline u32 printk_caller_id(void) 0x80000000 + raw_smp_processor_id(); } @@ -146,7 +146,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> u16 text_len; u64 ts_nsec; -@@ -1903,35 +1975,21 @@ int vprintk_store(int facility, int leve +@@ -1909,35 +1981,21 @@ int vprintk_store(int facility, int leve ts_nsec = local_clock(); /* @@ -197,7 +197,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (level == LOGLEVEL_DEFAULT) level = default_message_loglevel; -@@ -1940,9 +1998,10 @@ int vprintk_store(int facility, int leve +@@ -1946,9 +2004,10 @@ int vprintk_store(int facility, int leve lflags |= LOG_NEWLINE; if (lflags & LOG_CONT) { @@ -210,7 +210,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> r.info->text_len += text_len; if (lflags & LOG_NEWLINE) { -@@ -1961,18 +2020,18 @@ int vprintk_store(int facility, int leve +@@ -1967,18 +2026,18 @@ int vprintk_store(int facility, int leve * prb_reserve_in_last() and prb_reserve() purposely invalidate the * structure when they fail. */ @@ -233,7 +233,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (trunc_msg_len) memcpy(&r.text_buf[text_len], trunc_msg, trunc_msg_len); r.info->text_len = text_len + trunc_msg_len; -@@ -2013,10 +2072,9 @@ asmlinkage int vprintk_emit(int facility +@@ -2019,10 +2078,9 @@ asmlinkage int vprintk_emit(int facility boot_delay_msec(level); printk_delay(); diff --git a/debian/patches-rt/0002-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch b/debian/patches-rt/0002-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch index 7e6139b12..ae9850018 100644 --- a/debian/patches-rt/0002-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0002-rcu-Unconditionally-use-rcuc-threads-on-PREEMPT_RT.patch @@ -1,7 +1,7 @@ From: Scott Wood <swood@redhat.com> Date: Tue, 15 Dec 2020 15:16:46 +0100 Subject: [PATCH 2/5] rcu: Unconditionally use rcuc threads on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz PREEMPT_RT systems have long used the rcutree.use_softirq kernel boot parameter to avoid use of RCU_SOFTIRQ handlers, which can disrupt diff --git a/debian/patches-rt/0002-s390-vtime-Use-the-generic-IRQ-entry-accounting.patch b/debian/patches-rt/0002-s390-vtime-Use-the-generic-IRQ-entry-accounting.patch index f4bd4613f..cd9c8a8a5 100644 --- a/debian/patches-rt/0002-s390-vtime-Use-the-generic-IRQ-entry-accounting.patch +++ b/debian/patches-rt/0002-s390-vtime-Use-the-generic-IRQ-entry-accounting.patch @@ -1,7 +1,7 @@ From: Frederic Weisbecker <frederic@kernel.org> Date: Wed, 2 Dec 2020 12:57:29 +0100 Subject: [PATCH 2/5] s390/vtime: Use the generic IRQ entry accounting -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz s390 has its own version of IRQ entry accounting because it doesn't account the idle time the same way the other architectures do. Only @@ -71,7 +71,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* _S390_VTIME_H */ --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c -@@ -247,10 +247,6 @@ void vtime_account_kernel(struct task_st +@@ -248,10 +248,6 @@ void vtime_account_kernel(struct task_st } EXPORT_SYMBOL_GPL(vtime_account_kernel); diff --git a/debian/patches-rt/0002-sched-Fix-balance_callback.patch b/debian/patches-rt/0002-sched-Fix-balance_callback.patch index e440eb621..02cc74a49 100644 --- a/debian/patches-rt/0002-sched-Fix-balance_callback.patch +++ b/debian/patches-rt/0002-sched-Fix-balance_callback.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:00 +0200 Subject: [PATCH 02/19] sched: Fix balance_callback() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The intent of balance_callback() has always been to delay executing balancing operations until the end of the current rq->lock section. @@ -29,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3490,6 +3490,69 @@ static inline void finish_task(struct ta +@@ -3487,6 +3487,69 @@ static inline void finish_task(struct ta #endif } @@ -99,7 +99,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static inline void prepare_lock_switch(struct rq *rq, struct task_struct *next, struct rq_flags *rf) { -@@ -3515,6 +3578,7 @@ static inline void finish_lock_switch(st +@@ -3512,6 +3575,7 @@ static inline void finish_lock_switch(st * prev into current: */ spin_acquire(&rq->lock.dep_map, 0, 0, _THIS_IP_); @@ -107,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> raw_spin_unlock_irq(&rq->lock); } -@@ -3656,43 +3720,6 @@ static struct rq *finish_task_switch(str +@@ -3653,43 +3717,6 @@ static struct rq *finish_task_switch(str return rq; } @@ -151,7 +151,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * schedule_tail - first thing a freshly forked thread must call. * @prev: the thread we just switched away from. -@@ -3712,7 +3739,6 @@ asmlinkage __visible void schedule_tail( +@@ -3709,7 +3736,6 @@ asmlinkage __visible void schedule_tail( */ rq = finish_task_switch(prev); @@ -159,7 +159,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> preempt_enable(); if (current->set_child_tid) -@@ -4528,10 +4554,11 @@ static void __sched notrace __schedule(b +@@ -4525,10 +4551,11 @@ static void __sched notrace __schedule(b rq = context_switch(rq, prev, next, &rf); } else { rq->clock_update_flags &= ~(RQCF_ACT_SKIP|RQCF_REQ_SKIP); @@ -174,7 +174,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } void __noreturn do_task_dead(void) -@@ -4943,9 +4970,11 @@ void rt_mutex_setprio(struct task_struct +@@ -4940,9 +4967,11 @@ void rt_mutex_setprio(struct task_struct out_unlock: /* Avoid rq from going away on us: */ preempt_disable(); @@ -188,7 +188,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> preempt_enable(); } #else -@@ -5219,6 +5248,7 @@ static int __sched_setscheduler(struct t +@@ -5216,6 +5245,7 @@ static int __sched_setscheduler(struct t int retval, oldprio, oldpolicy = -1, queued, running; int new_effective_prio, policy = attr->sched_policy; const struct sched_class *prev_class; @@ -196,7 +196,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct rq_flags rf; int reset_on_fork; int queue_flags = DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK; -@@ -5457,6 +5487,7 @@ static int __sched_setscheduler(struct t +@@ -5454,6 +5484,7 @@ static int __sched_setscheduler(struct t /* Avoid rq from going away on us: */ preempt_disable(); @@ -204,7 +204,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> task_rq_unlock(rq, p, &rf); if (pi) { -@@ -5465,7 +5496,7 @@ static int __sched_setscheduler(struct t +@@ -5462,7 +5493,7 @@ static int __sched_setscheduler(struct t } /* Run balance callbacks after we've adjusted the PI chain: */ @@ -215,7 +215,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1215,6 +1215,9 @@ static inline void rq_pin_lock(struct rq +@@ -1216,6 +1216,9 @@ static inline void rq_pin_lock(struct rq rq->clock_update_flags &= (RQCF_REQ_SKIP|RQCF_ACT_SKIP); rf->clock_update_flags = 0; #endif diff --git a/debian/patches-rt/0002-sh-Get-rid-of-nmi_count.patch b/debian/patches-rt/0002-sh-Get-rid-of-nmi_count.patch index ca11fee3a..ef5c6772e 100644 --- a/debian/patches-rt/0002-sh-Get-rid-of-nmi_count.patch +++ b/debian/patches-rt/0002-sh-Get-rid-of-nmi_count.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:09 +0100 Subject: [PATCH 02/12] sh: Get rid of nmi_count() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz nmi_count() is a historical leftover and SH is the only user. Replace it with regular per cpu accessors. diff --git a/debian/patches-rt/0002-tasklets-Use-static-inlines-for-stub-implementations.patch b/debian/patches-rt/0002-tasklets-Use-static-inlines-for-stub-implementations.patch index 0dd611e1f..abe0f2193 100644 --- a/debian/patches-rt/0002-tasklets-Use-static-inlines-for-stub-implementations.patch +++ b/debian/patches-rt/0002-tasklets-Use-static-inlines-for-stub-implementations.patch @@ -1,13 +1,13 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:59 +0100 -Subject: [PATCH 02/19] tasklets: Use static inlines for stub implementations -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:42:05 +0100 +Subject: [PATCH 02/20] tasklets: Use static inlines for stub implementations +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Inlines exist for a reason. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Link: https://lore.kernel.org/r/20201204170805.535920431@linutronix.de +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/interrupt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/patches-rt/0002-tracing-Inline-tracing_gen_ctx_flags.patch b/debian/patches-rt/0002-tracing-Inline-tracing_gen_ctx_flags.patch index 19ab7efaa..6275a9d19 100644 --- a/debian/patches-rt/0002-tracing-Inline-tracing_gen_ctx_flags.patch +++ b/debian/patches-rt/0002-tracing-Inline-tracing_gen_ctx_flags.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 3 Feb 2021 11:05:24 -0500 Subject: [PATCH 2/4] tracing: Inline tracing_gen_ctx_flags() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Inline tracing_gen_ctx_flags(). This allows to have one ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT. diff --git a/debian/patches-rt/0003-fs-Remove-asm-kmap_types.h-includes.patch b/debian/patches-rt/0003-fs-Remove-asm-kmap_types.h-includes.patch index c0abae3bf..6fd3a31b4 100644 --- a/debian/patches-rt/0003-fs-Remove-asm-kmap_types.h-includes.patch +++ b/debian/patches-rt/0003-fs-Remove-asm-kmap_types.h-includes.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:15 +0100 Subject: [PATCH 03/37] fs: Remove asm/kmap_types.h includes -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Historical leftovers from the time where kmap() had fixed slots. diff --git a/debian/patches-rt/0003-irqstat-Get-rid-of-nmi_count-and-__IRQ_STAT.patch b/debian/patches-rt/0003-irqstat-Get-rid-of-nmi_count-and-__IRQ_STAT.patch index cf1fa8fc6..a1f534afa 100644 --- a/debian/patches-rt/0003-irqstat-Get-rid-of-nmi_count-and-__IRQ_STAT.patch +++ b/debian/patches-rt/0003-irqstat-Get-rid-of-nmi_count-and-__IRQ_STAT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:10 +0100 Subject: [PATCH 03/12] irqstat: Get rid of nmi_count() and __IRQ_STAT() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Nothing uses this anymore. diff --git a/debian/patches-rt/0003-locking-rtmutex-Move-rt_mutex_init-outside-of-CONFIG.patch b/debian/patches-rt/0003-locking-rtmutex-Move-rt_mutex_init-outside-of-CONFIG.patch index 8f23fb05b..430af0e76 100644 --- a/debian/patches-rt/0003-locking-rtmutex-Move-rt_mutex_init-outside-of-CONFIG.patch +++ b/debian/patches-rt/0003-locking-rtmutex-Move-rt_mutex_init-outside-of-CONFIG.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 29 Sep 2020 16:32:49 +0200 Subject: [PATCH 03/22] locking/rtmutex: Move rt_mutex_init() outside of CONFIG_DEBUG_RT_MUTEXES -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz rt_mutex_init() only initializes lockdep if CONFIG_DEBUG_RT_MUTEXES is enabled. The static initializer (DEFINE_RT_MUTEX) does not have such a diff --git a/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch b/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch index a35cbe671..afc3eb6ad 100644 --- a/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch +++ b/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 28 May 2018 15:24:22 +0200 Subject: [PATCH 3/4] mm/SLxB: change list_lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The list_lock is used with used with IRQs off on RT. Make it a raw_spinlock_t otherwise the interrupts won't be disabled on -RT. The locking rules remain diff --git a/debian/patches-rt/0003-printk-kmsg_dump-remove-unused-fields.patch b/debian/patches-rt/0003-printk-kmsg_dump-remove-unused-fields.patch index d342e9bb6..da56f5a7b 100644 --- a/debian/patches-rt/0003-printk-kmsg_dump-remove-unused-fields.patch +++ b/debian/patches-rt/0003-printk-kmsg_dump-remove-unused-fields.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 21 Dec 2020 11:19:39 +0106 Subject: [PATCH 03/28] printk: kmsg_dump: remove unused fields -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz struct kmsg_dumper still contains some fields that were used to iterate the old ringbuffer. They are no longer used. Remove them diff --git a/debian/patches-rt/0003-rcu-Enable-rcu_normal_after_boot-unconditionally-for.patch b/debian/patches-rt/0003-rcu-Enable-rcu_normal_after_boot-unconditionally-for.patch index c839061f1..f71c66171 100644 --- a/debian/patches-rt/0003-rcu-Enable-rcu_normal_after_boot-unconditionally-for.patch +++ b/debian/patches-rt/0003-rcu-Enable-rcu_normal_after_boot-unconditionally-for.patch @@ -1,7 +1,7 @@ From: Julia Cartwright <julia@ni.com> Date: Tue, 15 Dec 2020 15:16:47 +0100 Subject: [PATCH 3/5] rcu: Enable rcu_normal_after_boot unconditionally for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Expedited RCU grace periods send IPIs to all non-idle CPUs, and thus can disrupt time-critical code in real-time applications. However, there diff --git a/debian/patches-rt/0003-sched-hotplug-Ensure-only-per-cpu-kthreads-run-durin.patch b/debian/patches-rt/0003-sched-hotplug-Ensure-only-per-cpu-kthreads-run-durin.patch index 3af853812..8d26bbaa9 100644 --- a/debian/patches-rt/0003-sched-hotplug-Ensure-only-per-cpu-kthreads-run-durin.patch +++ b/debian/patches-rt/0003-sched-hotplug-Ensure-only-per-cpu-kthreads-run-durin.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:01 +0200 Subject: [PATCH 03/19] sched/hotplug: Ensure only per-cpu kthreads run during hotplug -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In preparation for migrate_disable(), make sure only per-cpu kthreads are allowed to run on !active CPUs. @@ -28,7 +28,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3514,8 +3514,10 @@ static inline struct callback_head *spli +@@ -3511,8 +3511,10 @@ static inline struct callback_head *spli struct callback_head *head = rq->balance_callback; lockdep_assert_held(&rq->lock); @@ -40,7 +40,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return head; } -@@ -3536,6 +3538,21 @@ static inline void balance_callbacks(str +@@ -3533,6 +3535,21 @@ static inline void balance_callbacks(str } } @@ -62,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #else static inline void __balance_callbacks(struct rq *rq) -@@ -3551,6 +3568,10 @@ static inline void balance_callbacks(str +@@ -3548,6 +3565,10 @@ static inline void balance_callbacks(str { } @@ -73,7 +73,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif static inline void -@@ -3578,7 +3599,7 @@ static inline void finish_lock_switch(st +@@ -3575,7 +3596,7 @@ static inline void finish_lock_switch(st * prev into current: */ spin_acquire(&rq->lock.dep_map, 0, 0, _THIS_IP_); @@ -82,7 +82,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> raw_spin_unlock_irq(&rq->lock); } -@@ -6834,6 +6855,90 @@ static void migrate_tasks(struct rq *dea +@@ -6831,6 +6852,90 @@ static void migrate_tasks(struct rq *dea rq->stop = stop; } @@ -173,7 +173,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* CONFIG_HOTPLUG_CPU */ void set_rq_online(struct rq *rq) -@@ -6919,6 +7024,8 @@ int sched_cpu_activate(unsigned int cpu) +@@ -6916,6 +7021,8 @@ int sched_cpu_activate(unsigned int cpu) struct rq *rq = cpu_rq(cpu); struct rq_flags rf; @@ -182,7 +182,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_SCHED_SMT /* * When going up, increment the number of cores with SMT present. -@@ -6966,6 +7073,8 @@ int sched_cpu_deactivate(unsigned int cp +@@ -6963,6 +7070,8 @@ int sched_cpu_deactivate(unsigned int cp */ synchronize_rcu(); @@ -191,7 +191,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_SCHED_SMT /* * When going down, decrement the number of cores with SMT present. -@@ -6979,6 +7088,7 @@ int sched_cpu_deactivate(unsigned int cp +@@ -6976,6 +7085,7 @@ int sched_cpu_deactivate(unsigned int cp ret = cpuset_cpu_inactive(cpu); if (ret) { @@ -209,7 +209,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned char nohz_idle_balance; unsigned char idle_balance; -@@ -1379,6 +1380,9 @@ init_numa_balancing(unsigned long clone_ +@@ -1380,6 +1381,9 @@ init_numa_balancing(unsigned long clone_ #ifdef CONFIG_SMP @@ -219,7 +219,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static inline void queue_balance_callback(struct rq *rq, struct callback_head *head, -@@ -1386,12 +1390,13 @@ queue_balance_callback(struct rq *rq, +@@ -1387,12 +1391,13 @@ queue_balance_callback(struct rq *rq, { lockdep_assert_held(&rq->lock); diff --git a/debian/patches-rt/0003-sched-vtime-Consolidate-IRQ-time-accounting.patch b/debian/patches-rt/0003-sched-vtime-Consolidate-IRQ-time-accounting.patch index 1563cc4e5..1a4d26526 100644 --- a/debian/patches-rt/0003-sched-vtime-Consolidate-IRQ-time-accounting.patch +++ b/debian/patches-rt/0003-sched-vtime-Consolidate-IRQ-time-accounting.patch @@ -1,7 +1,7 @@ From: Frederic Weisbecker <frederic@kernel.org> Date: Wed, 2 Dec 2020 12:57:30 +0100 Subject: [PATCH 3/5] sched/vtime: Consolidate IRQ time accounting -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The 3 architectures implementing CONFIG_VIRT_CPU_ACCOUNTING_NATIVE all have their own version of irq time accounting that dispatch the @@ -63,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static irqreturn_t --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c -@@ -311,12 +311,11 @@ static unsigned long vtime_delta_scaled( +@@ -312,12 +312,11 @@ static unsigned long vtime_delta_scaled( return stime_scaled; } @@ -77,7 +77,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> WARN_ON_ONCE(!irqs_disabled()); -@@ -331,29 +330,30 @@ static unsigned long vtime_delta(struct +@@ -332,29 +331,30 @@ static unsigned long vtime_delta(struct return stime; } @@ -121,7 +121,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME acct->stime_scaled += stime_scaled; #endif -@@ -366,10 +366,34 @@ void vtime_account_idle(struct task_stru +@@ -367,10 +367,34 @@ void vtime_account_idle(struct task_stru unsigned long stime, stime_scaled, steal_time; struct cpu_accounting_data *acct = get_accounting(tsk); @@ -159,7 +159,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c -@@ -222,31 +222,50 @@ void vtime_flush(struct task_struct *tsk +@@ -223,31 +223,50 @@ void vtime_flush(struct task_struct *tsk S390_lowcore.avg_steal_timer = avg_steal; } diff --git a/debian/patches-rt/0003-tasklets-Provide-tasklet_disable_in_atomic.patch b/debian/patches-rt/0003-tasklets-Provide-tasklet_disable_in_atomic.patch index 89c33d6b2..e7c877daa 100644 --- a/debian/patches-rt/0003-tasklets-Provide-tasklet_disable_in_atomic.patch +++ b/debian/patches-rt/0003-tasklets-Provide-tasklet_disable_in_atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Mon, 25 Jan 2021 11:45:00 +0100 -Subject: [PATCH 03/19] tasklets: Provide tasklet_disable_in_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:42:06 +0100 +Subject: [PATCH 03/20] tasklets: Provide tasklet_disable_in_atomic() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Replacing the spin wait loops in tasklet_unlock_wait() with wait_var_event() is not possible as a handful of tasklet_disable() @@ -13,6 +13,7 @@ convert the few atomic use cases over, which allows to change tasklet_disable() and tasklet_unlock_wait() in a later step. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/interrupt.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) @@ -25,8 +26,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } + +/* -+ * Do not use in new code. There is no real reason to invoke this from -+ * atomic contexts. ++ * Do not use in new code. Waiting for tasklets from atomic contexts is ++ * error prone and should be avoided. + */ +static inline void tasklet_unlock_spin_wait(struct tasklet_struct *t) +{ @@ -46,8 +47,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } +/* -+ * Do not use in new code. There is no real reason to invoke this from -+ * atomic contexts. ++ * Do not use in new code. Disabling tasklets from atomic contexts is ++ * error prone and should be avoided. + */ +static inline void tasklet_disable_in_atomic(struct tasklet_struct *t) +{ diff --git a/debian/patches-rt/0003-tracing-Use-in_serving_softirq-to-deduct-softirq-sta.patch b/debian/patches-rt/0003-tracing-Use-in_serving_softirq-to-deduct-softirq-sta.patch index 5e35e0921..334c9bb82 100644 --- a/debian/patches-rt/0003-tracing-Use-in_serving_softirq-to-deduct-softirq-sta.patch +++ b/debian/patches-rt/0003-tracing-Use-in_serving_softirq-to-deduct-softirq-sta.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 3 Feb 2021 11:05:25 -0500 Subject: [PATCH 3/4] tracing: Use in_serving_softirq() to deduct softirq status. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz PREEMPT_RT does not report "serving softirq" because the tracing core looks at the preemption counter while PREEMPT_RT does not update it diff --git a/debian/patches-rt/0003-z3fold-remove-preempt-disabled-sections-for-RT.patch b/debian/patches-rt/0003-z3fold-remove-preempt-disabled-sections-for-RT.patch index bda3dbdac..4babcc958 100644 --- a/debian/patches-rt/0003-z3fold-remove-preempt-disabled-sections-for-RT.patch +++ b/debian/patches-rt/0003-z3fold-remove-preempt-disabled-sections-for-RT.patch @@ -1,7 +1,7 @@ From: Vitaly Wool <vitaly.wool@konsulko.com> Date: Mon, 14 Dec 2020 19:12:36 -0800 Subject: [PATCH 3/3] z3fold: remove preempt disabled sections for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Replace get_cpu_ptr() with migrate_disable()+this_cpu_ptr() so RT can take spinlocks that become sleeping locks. diff --git a/debian/patches-rt/0004-doc-Update-RCU-s-requirements-page-about-the-PREEMPT.patch b/debian/patches-rt/0004-doc-Update-RCU-s-requirements-page-about-the-PREEMPT.patch index 18d3d91b7..c5e3739e8 100644 --- a/debian/patches-rt/0004-doc-Update-RCU-s-requirements-page-about-the-PREEMPT.patch +++ b/debian/patches-rt/0004-doc-Update-RCU-s-requirements-page-about-the-PREEMPT.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 15 Dec 2020 15:16:48 +0100 Subject: [PATCH 4/5] doc: Update RCU's requirements page about the PREEMPT_RT wiki. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The PREEMPT_RT wiki moved from kernel.org to the Linux Foundation wiki. The kernel.org wiki is read only. diff --git a/debian/patches-rt/0004-irqtime-Move-irqtime-entry-accounting-after-irq-offs.patch b/debian/patches-rt/0004-irqtime-Move-irqtime-entry-accounting-after-irq-offs.patch index de55d0162..3a6dde7cb 100644 --- a/debian/patches-rt/0004-irqtime-Move-irqtime-entry-accounting-after-irq-offs.patch +++ b/debian/patches-rt/0004-irqtime-Move-irqtime-entry-accounting-after-irq-offs.patch @@ -2,7 +2,7 @@ From: Frederic Weisbecker <frederic@kernel.org> Date: Wed, 2 Dec 2020 12:57:31 +0100 Subject: [PATCH 4/5] irqtime: Move irqtime entry accounting after irq offset incrementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz IRQ time entry is currently accounted before HARDIRQ_OFFSET or SOFTIRQ_OFFSET are incremented. This is convenient to decide to which diff --git a/debian/patches-rt/0004-locking-rtmutex-Remove-rt_mutex_timed_lock.patch b/debian/patches-rt/0004-locking-rtmutex-Remove-rt_mutex_timed_lock.patch index cee217852..9c579a855 100644 --- a/debian/patches-rt/0004-locking-rtmutex-Remove-rt_mutex_timed_lock.patch +++ b/debian/patches-rt/0004-locking-rtmutex-Remove-rt_mutex_timed_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 7 Oct 2020 12:11:33 +0200 Subject: [PATCH 04/22] locking/rtmutex: Remove rt_mutex_timed_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz rt_mutex_timed_lock() has no callers since commit c051b21f71d1f ("rtmutex: Confine deadlock logic to futex") diff --git a/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch b/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch index 40a941929..c18079195 100644 --- a/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch +++ b/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 21 Jun 2018 17:29:19 +0200 Subject: [PATCH 4/4] mm/SLUB: delay giving back empty slubs to IRQ enabled regions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz __free_slab() is invoked with disabled interrupts which increases the irq-off time while __free_pages() is doing the work. diff --git a/debian/patches-rt/0004-printk-refactor-kmsg_dump_get_buffer.patch b/debian/patches-rt/0004-printk-refactor-kmsg_dump_get_buffer.patch index e095b18fc..6ece0d5d6 100644 --- a/debian/patches-rt/0004-printk-refactor-kmsg_dump_get_buffer.patch +++ b/debian/patches-rt/0004-printk-refactor-kmsg_dump_get_buffer.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:41:56 +0106 Subject: [PATCH 04/28] printk: refactor kmsg_dump_get_buffer() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz kmsg_dump_get_buffer() requires nearly the same logic as syslog_print_all(), but uses different variable names and diff --git a/debian/patches-rt/0004-sched-core-Wait-for-tasks-being-pushed-away-on-hotpl.patch b/debian/patches-rt/0004-sched-core-Wait-for-tasks-being-pushed-away-on-hotpl.patch index 843b71dc8..742f81ecc 100644 --- a/debian/patches-rt/0004-sched-core-Wait-for-tasks-being-pushed-away-on-hotpl.patch +++ b/debian/patches-rt/0004-sched-core-Wait-for-tasks-being-pushed-away-on-hotpl.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 23 Oct 2020 12:12:02 +0200 Subject: [PATCH 04/19] sched/core: Wait for tasks being pushed away on hotplug -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz RT kernels need to ensure that all tasks which are not per CPU kthreads have left the outgoing CPU to guarantee that no tasks are force migrated @@ -24,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6897,8 +6897,21 @@ static void balance_push(struct rq *rq) +@@ -6894,8 +6894,21 @@ static void balance_push(struct rq *rq) * Both the cpu-hotplug and stop task are in this case and are * required to complete the hotplug process. */ @@ -47,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> get_task_struct(push_task); /* -@@ -6929,6 +6942,20 @@ static void balance_push_set(int cpu, bo +@@ -6926,6 +6939,20 @@ static void balance_push_set(int cpu, bo rq_unlock_irqrestore(rq, &rf); } @@ -68,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #else static inline void balance_push(struct rq *rq) -@@ -6939,6 +6966,10 @@ static inline void balance_push_set(int +@@ -6936,6 +6963,10 @@ static inline void balance_push_set(int { } @@ -79,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* CONFIG_HOTPLUG_CPU */ void set_rq_online(struct rq *rq) -@@ -7093,6 +7124,10 @@ int sched_cpu_deactivate(unsigned int cp +@@ -7090,6 +7121,10 @@ int sched_cpu_deactivate(unsigned int cp return ret; } sched_domains_numa_masks_clear(cpu); @@ -90,7 +90,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; } -@@ -7333,6 +7368,9 @@ void __init sched_init(void) +@@ -7330,6 +7365,9 @@ void __init sched_init(void) rq_csd_init(rq, &rq->nohz_csd, nohz_csd_func); #endif diff --git a/debian/patches-rt/0004-sh-highmem-Remove-all-traces-of-unused-cruft.patch b/debian/patches-rt/0004-sh-highmem-Remove-all-traces-of-unused-cruft.patch index acb1def0d..b8262514d 100644 --- a/debian/patches-rt/0004-sh-highmem-Remove-all-traces-of-unused-cruft.patch +++ b/debian/patches-rt/0004-sh-highmem-Remove-all-traces-of-unused-cruft.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:16 +0100 Subject: [PATCH 04/37] sh/highmem: Remove all traces of unused cruft -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz For whatever reasons SH has highmem bits all over the place but does not enable it via Kconfig. Remove the bitrot. diff --git a/debian/patches-rt/0004-tasklets-Use-spin-wait-in-tasklet_disable-temporaril.patch b/debian/patches-rt/0004-tasklets-Use-spin-wait-in-tasklet_disable-temporaril.patch new file mode 100644 index 000000000..6179dd2d2 --- /dev/null +++ b/debian/patches-rt/0004-tasklets-Use-spin-wait-in-tasklet_disable-temporaril.patch @@ -0,0 +1,27 @@ +From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 9 Mar 2021 09:42:07 +0100 +Subject: [PATCH 04/20] tasklets: Use spin wait in tasklet_disable() + temporarily +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz + +To ease the transition use spin waiting in tasklet_disable() until all +usage sites from atomic context have been cleaned up. + +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + include/linux/interrupt.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/include/linux/interrupt.h ++++ b/include/linux/interrupt.h +@@ -724,7 +724,8 @@ static inline void tasklet_disable_in_at + static inline void tasklet_disable(struct tasklet_struct *t) + { + tasklet_disable_nosync(t); +- tasklet_unlock_wait(t); ++ /* Spin wait until all atomic users are converted */ ++ tasklet_unlock_spin_wait(t); + smp_mb(); + } + diff --git a/debian/patches-rt/0004-tracing-Remove-NULL-check-from-current-in-tracing_ge.patch b/debian/patches-rt/0004-tracing-Remove-NULL-check-from-current-in-tracing_ge.patch index 9e4d4aa1d..97002bcd4 100644 --- a/debian/patches-rt/0004-tracing-Remove-NULL-check-from-current-in-tracing_ge.patch +++ b/debian/patches-rt/0004-tracing-Remove-NULL-check-from-current-in-tracing_ge.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 3 Feb 2021 11:05:26 -0500 Subject: [PATCH 4/4] tracing: Remove NULL check from current in tracing_generic_entry_update(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz I can't imagine when or why `current' would return a NULL pointer. This check was added in commit diff --git a/debian/patches-rt/0004-um-irqstat-Get-rid-of-the-duplicated-declarations.patch b/debian/patches-rt/0004-um-irqstat-Get-rid-of-the-duplicated-declarations.patch index f7553cd62..c96b29008 100644 --- a/debian/patches-rt/0004-um-irqstat-Get-rid-of-the-duplicated-declarations.patch +++ b/debian/patches-rt/0004-um-irqstat-Get-rid-of-the-duplicated-declarations.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:11 +0100 Subject: [PATCH 04/12] um/irqstat: Get rid of the duplicated declarations -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz irq_cpustat_t and ack_bad_irq() are exactly the same as the asm-generic ones. diff --git a/debian/patches-rt/0005-ARM-irqstat-Get-rid-of-duplicated-declaration.patch b/debian/patches-rt/0005-ARM-irqstat-Get-rid-of-duplicated-declaration.patch index f873e83f9..1e36e0067 100644 --- a/debian/patches-rt/0005-ARM-irqstat-Get-rid-of-duplicated-declaration.patch +++ b/debian/patches-rt/0005-ARM-irqstat-Get-rid-of-duplicated-declaration.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:12 +0100 Subject: [PATCH 05/12] ARM: irqstat: Get rid of duplicated declaration -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz irq_cpustat_t is exactly the same as the asm-generic one. Define ack_bad_irq so the generic header does not emit the generic version of it. diff --git a/debian/patches-rt/0005-asm-generic-Provide-kmap_size.h.patch b/debian/patches-rt/0005-asm-generic-Provide-kmap_size.h.patch index e3bc3a2db..15ed38451 100644 --- a/debian/patches-rt/0005-asm-generic-Provide-kmap_size.h.patch +++ b/debian/patches-rt/0005-asm-generic-Provide-kmap_size.h.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:17 +0100 Subject: [PATCH 05/37] asm-generic: Provide kmap_size.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz kmap_types.h is a misnomer because the old atomic MAP based array does not exist anymore and the whole indirection of architectures including diff --git a/debian/patches-rt/0005-doc-Use-CONFIG_PREEMPTION.patch b/debian/patches-rt/0005-doc-Use-CONFIG_PREEMPTION.patch index f25ea96fd..f0cd0dada 100644 --- a/debian/patches-rt/0005-doc-Use-CONFIG_PREEMPTION.patch +++ b/debian/patches-rt/0005-doc-Use-CONFIG_PREEMPTION.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 15 Dec 2020 15:16:49 +0100 Subject: [PATCH 5/5] doc: Use CONFIG_PREEMPTION -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today diff --git a/debian/patches-rt/0005-irq-Call-tick_irq_enter-inside-HARDIRQ_OFFSET.patch b/debian/patches-rt/0005-irq-Call-tick_irq_enter-inside-HARDIRQ_OFFSET.patch index 183853d57..a14f538a9 100644 --- a/debian/patches-rt/0005-irq-Call-tick_irq_enter-inside-HARDIRQ_OFFSET.patch +++ b/debian/patches-rt/0005-irq-Call-tick_irq_enter-inside-HARDIRQ_OFFSET.patch @@ -1,7 +1,7 @@ From: Frederic Weisbecker <frederic@kernel.org> Date: Wed, 2 Dec 2020 12:57:32 +0100 Subject: [PATCH 5/5] irq: Call tick_irq_enter() inside HARDIRQ_OFFSET -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Now that account_hardirq_enter() is called after HARDIRQ_OFFSET has been incremented, there is nothing left that prevents us from also diff --git a/debian/patches-rt/0005-locking-rtmutex-Handle-the-various-new-futex-race-co.patch b/debian/patches-rt/0005-locking-rtmutex-Handle-the-various-new-futex-race-co.patch index cca94abc0..931d0127d 100644 --- a/debian/patches-rt/0005-locking-rtmutex-Handle-the-various-new-futex-race-co.patch +++ b/debian/patches-rt/0005-locking-rtmutex-Handle-the-various-new-futex-race-co.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 10 Jun 2011 11:04:15 +0200 Subject: [PATCH 05/22] locking/rtmutex: Handle the various new futex race conditions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz RT opens a few new interesting race conditions in the rtmutex/futex combo due to futex hash bucket lock being a 'sleeping' spinlock and diff --git a/debian/patches-rt/0005-printk-consolidate-kmsg_dump_get_buffer-syslog_print.patch b/debian/patches-rt/0005-printk-consolidate-kmsg_dump_get_buffer-syslog_print.patch index f37a5f459..05f3aa9aa 100644 --- a/debian/patches-rt/0005-printk-consolidate-kmsg_dump_get_buffer-syslog_print.patch +++ b/debian/patches-rt/0005-printk-consolidate-kmsg_dump_get_buffer-syslog_print.patch @@ -2,7 +2,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Wed, 13 Jan 2021 11:29:53 +0106 Subject: [PATCH 05/28] printk: consolidate kmsg_dump_get_buffer/syslog_print_all code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The logic for finding records to fit into a buffer is the same for kmsg_dump_get_buffer() and syslog_print_all(). Introduce a helper diff --git a/debian/patches-rt/0004-tasklets-Replace-spin-wait-in-tasklet_unlock_wait.patch b/debian/patches-rt/0005-tasklets-Replace-spin-wait-in-tasklet_unlock_wait.patch index 860553841..23617b920 100644 --- a/debian/patches-rt/0004-tasklets-Replace-spin-wait-in-tasklet_unlock_wait.patch +++ b/debian/patches-rt/0005-tasklets-Replace-spin-wait-in-tasklet_unlock_wait.patch @@ -1,18 +1,24 @@ From: Peter Zijlstra <peterz@infradead.org> -Date: Mon, 7 Dec 2020 12:39:58 +0100 -Subject: [PATCH 04/19] tasklets: Replace spin wait in tasklet_unlock_wait() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:42:08 +0100 +Subject: [PATCH 05/20] tasklets: Replace spin wait in tasklet_unlock_wait() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz tasklet_unlock_wait() spin waits for TASKLET_STATE_RUN to be cleared. This is wasting CPU cycles in a tight loop which is especially painful in a guest when the CPU running the tasklet is scheduled out. -tasklet_unlock_wait() is invoked from tasklet_kill() and tasklet_disable() -which are used in teardown paths and not performance critical at -all. Replace the spin wait with wait_var_event(). +tasklet_unlock_wait() is invoked from tasklet_kill() which is used in +teardown paths and not performance critical at all. Replace the spin wait +with wait_var_event(). + +There are no users of tasklet_unlock_wait() which are invoked from atomic +contexts. The usage in tasklet_disable() has been replaced temporarily with +the spin waiting variant until the atomic users are fixed up and will be +converted to the sleep wait variant later. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/interrupt.h | 13 ++----------- kernel/softirq.c | 18 ++++++++++++++++++ @@ -39,7 +45,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +void tasklet_unlock_wait(struct tasklet_struct *t); /* - * Do not use in new code. There is no real reason to invoke this from + * Do not use in new code. Waiting for tasklets from atomic contexts is --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -25,6 +25,7 @@ diff --git a/debian/patches-rt/0005-workqueue-Manually-break-affinity-on-hotplug.patch b/debian/patches-rt/0005-workqueue-Manually-break-affinity-on-hotplug.patch index 67b2e104a..545fe230a 100644 --- a/debian/patches-rt/0005-workqueue-Manually-break-affinity-on-hotplug.patch +++ b/debian/patches-rt/0005-workqueue-Manually-break-affinity-on-hotplug.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:03 +0200 Subject: [PATCH 05/19] workqueue: Manually break affinity on hotplug -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Don't rely on the scheduler to force break affinity for us -- it will stop doing that for per-cpu-kthreads. diff --git a/debian/patches-rt/0006-arm64-irqstat-Get-rid-of-duplicated-declaration.patch b/debian/patches-rt/0006-arm64-irqstat-Get-rid-of-duplicated-declaration.patch index 404ac7249..68d9f9d57 100644 --- a/debian/patches-rt/0006-arm64-irqstat-Get-rid-of-duplicated-declaration.patch +++ b/debian/patches-rt/0006-arm64-irqstat-Get-rid-of-duplicated-declaration.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:13 +0100 Subject: [PATCH 06/12] arm64: irqstat: Get rid of duplicated declaration -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz irq_cpustat_t is exactly the same as the asm-generic one. Define ack_bad_irq so the generic header does not emit the generic version of it. diff --git a/debian/patches-rt/0006-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch b/debian/patches-rt/0006-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch index 3d5be7303..268ce1ad2 100644 --- a/debian/patches-rt/0006-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch +++ b/debian/patches-rt/0006-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch @@ -1,7 +1,7 @@ From: Steven Rostedt <rostedt@goodmis.org> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: [PATCH 06/22] futex: Fix bug on when a requeued RT task times out -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Requeue with timeout causes a bug with PREEMPT_RT. diff --git a/debian/patches-rt/0006-highmem-Provide-generic-variant-of-kmap_atomic.patch b/debian/patches-rt/0006-highmem-Provide-generic-variant-of-kmap_atomic.patch index b9346a8d7..49f7b5149 100644 --- a/debian/patches-rt/0006-highmem-Provide-generic-variant-of-kmap_atomic.patch +++ b/debian/patches-rt/0006-highmem-Provide-generic-variant-of-kmap_atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:18 +0100 Subject: [PATCH 06/37] highmem: Provide generic variant of kmap_atomic* -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The kmap_atomic* interfaces in all architectures are pretty much the same except for post map operations (flush) and pre- and post unmap operations. diff --git a/debian/patches-rt/0006-printk-introduce-CONSOLE_LOG_MAX-for-improved-multi-.patch b/debian/patches-rt/0006-printk-introduce-CONSOLE_LOG_MAX-for-improved-multi-.patch index 72c37af39..488406acc 100644 --- a/debian/patches-rt/0006-printk-introduce-CONSOLE_LOG_MAX-for-improved-multi-.patch +++ b/debian/patches-rt/0006-printk-introduce-CONSOLE_LOG_MAX-for-improved-multi-.patch @@ -2,7 +2,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Thu, 10 Dec 2020 12:48:01 +0106 Subject: [PATCH 06/28] printk: introduce CONSOLE_LOG_MAX for improved multi-line support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Instead of using "LOG_LINE_MAX + PREFIX_MAX" for temporary buffer sizes, introduce CONSOLE_LOG_MAX. This represents the maximum size diff --git a/debian/patches-rt/0006-sched-hotplug-Consolidate-task-migration-on-CPU-unpl.patch b/debian/patches-rt/0006-sched-hotplug-Consolidate-task-migration-on-CPU-unpl.patch index acd3089b6..52a868fdb 100644 --- a/debian/patches-rt/0006-sched-hotplug-Consolidate-task-migration-on-CPU-unpl.patch +++ b/debian/patches-rt/0006-sched-hotplug-Consolidate-task-migration-on-CPU-unpl.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 23 Oct 2020 12:12:04 +0200 Subject: [PATCH 06/19] sched/hotplug: Consolidate task migration on CPU unplug -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz With the new mechanism which kicks tasks off the outgoing CPU at the end of schedule() the situation on an outgoing CPU right before the stopper thread @@ -86,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> .name = "smpboot/threads:online", --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6742,120 +6742,6 @@ void idle_task_exit(void) +@@ -6739,120 +6739,6 @@ void idle_task_exit(void) /* finish_cpu(), as ran on the BP, will clean up the active_mm state */ } @@ -207,7 +207,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static int __balance_push_cpu_stop(void *arg) { struct task_struct *p = arg; -@@ -7124,10 +7010,6 @@ int sched_cpu_deactivate(unsigned int cp +@@ -7121,10 +7007,6 @@ int sched_cpu_deactivate(unsigned int cp return ret; } sched_domains_numa_masks_clear(cpu); @@ -218,7 +218,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; } -@@ -7147,6 +7029,41 @@ int sched_cpu_starting(unsigned int cpu) +@@ -7144,6 +7026,41 @@ int sched_cpu_starting(unsigned int cpu) } #ifdef CONFIG_HOTPLUG_CPU @@ -260,7 +260,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int sched_cpu_dying(unsigned int cpu) { struct rq *rq = cpu_rq(cpu); -@@ -7160,7 +7077,6 @@ int sched_cpu_dying(unsigned int cpu) +@@ -7157,7 +7074,6 @@ int sched_cpu_dying(unsigned int cpu) BUG_ON(!cpumask_test_cpu(cpu, rq->rd->span)); set_rq_offline(rq); } diff --git a/debian/patches-rt/0005-tasklets-Replace-spin-wait-in-tasklet_kill.patch b/debian/patches-rt/0006-tasklets-Replace-spin-wait-in-tasklet_kill.patch index e2586b0ab..884fa4ca1 100644 --- a/debian/patches-rt/0005-tasklets-Replace-spin-wait-in-tasklet_kill.patch +++ b/debian/patches-rt/0006-tasklets-Replace-spin-wait-in-tasklet_kill.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> -Date: Mon, 7 Dec 2020 12:47:43 +0100 -Subject: [PATCH 05/19] tasklets: Replace spin wait in tasklet_kill() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:42:09 +0100 +Subject: [PATCH 06/20] tasklets: Replace spin wait in tasklet_kill() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz tasklet_kill() spin waits for TASKLET_STATE_SCHED to be cleared invoking yield() from inside the loop. yield() is an ill defined mechanism and the @@ -14,6 +14,7 @@ all. Replace the spin wait with wait_var_event(). Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- kernel/softirq.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/debian/patches-rt/0007-asm-generic-irqstat-Add-optional-__nmi_count-member.patch b/debian/patches-rt/0007-asm-generic-irqstat-Add-optional-__nmi_count-member.patch index 6c136488e..0dc78c031 100644 --- a/debian/patches-rt/0007-asm-generic-irqstat-Add-optional-__nmi_count-member.patch +++ b/debian/patches-rt/0007-asm-generic-irqstat-Add-optional-__nmi_count-member.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:14 +0100 Subject: [PATCH 07/12] asm-generic/irqstat: Add optional __nmi_count member -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Add an optional __nmi_count member to irq_cpustat_t so more architectures can use the generic version. diff --git a/debian/patches-rt/0007-highmem-Make-DEBUG_HIGHMEM-functional.patch b/debian/patches-rt/0007-highmem-Make-DEBUG_HIGHMEM-functional.patch index bd7adaabf..5c8624345 100644 --- a/debian/patches-rt/0007-highmem-Make-DEBUG_HIGHMEM-functional.patch +++ b/debian/patches-rt/0007-highmem-Make-DEBUG_HIGHMEM-functional.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:19 +0100 Subject: [PATCH 07/37] highmem: Make DEBUG_HIGHMEM functional -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz For some obscure reason when CONFIG_DEBUG_HIGHMEM is enabled the stack depth is increased from 20 to 41. But the only thing DEBUG_HIGHMEM does is diff --git a/debian/patches-rt/0007-locking-rtmutex-Make-lock_killable-work.patch b/debian/patches-rt/0007-locking-rtmutex-Make-lock_killable-work.patch index 817809ece..f3f137e89 100644 --- a/debian/patches-rt/0007-locking-rtmutex-Make-lock_killable-work.patch +++ b/debian/patches-rt/0007-locking-rtmutex-Make-lock_killable-work.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Sat, 1 Apr 2017 12:50:59 +0200 Subject: [PATCH 07/22] locking/rtmutex: Make lock_killable work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Locking an rt mutex killable does not work because signal handling is restricted to TASK_INTERRUPTIBLE. diff --git a/debian/patches-rt/0007-printk-use-seqcount_latch-for-clear_seq.patch b/debian/patches-rt/0007-printk-use-seqcount_latch-for-clear_seq.patch index 8371b8558..29c8b3fdb 100644 --- a/debian/patches-rt/0007-printk-use-seqcount_latch-for-clear_seq.patch +++ b/debian/patches-rt/0007-printk-use-seqcount_latch-for-clear_seq.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:41:58 +0106 Subject: [PATCH 07/28] printk: use seqcount_latch for clear_seq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz kmsg_dump_rewind_nolock() locklessly reads @clear_seq. However, this is not done atomically. Since @clear_seq is 64-bit, this diff --git a/debian/patches-rt/0007-sched-Fix-hotplug-vs-CPU-bandwidth-control.patch b/debian/patches-rt/0007-sched-Fix-hotplug-vs-CPU-bandwidth-control.patch index ea8c3b8b9..546ad9e0b 100644 --- a/debian/patches-rt/0007-sched-Fix-hotplug-vs-CPU-bandwidth-control.patch +++ b/debian/patches-rt/0007-sched-Fix-hotplug-vs-CPU-bandwidth-control.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:05 +0200 Subject: [PATCH 07/19] sched: Fix hotplug vs CPU bandwidth control -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Since we now migrate tasks away before DYING, we should also move bandwidth unthrottle, otherwise we can gain tasks from unthrottle @@ -25,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6978,6 +6978,8 @@ int sched_cpu_activate(unsigned int cpu) +@@ -6975,6 +6975,8 @@ int sched_cpu_activate(unsigned int cpu) int sched_cpu_deactivate(unsigned int cpu) { @@ -34,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int ret; set_cpu_active(cpu, false); -@@ -6992,6 +6994,14 @@ int sched_cpu_deactivate(unsigned int cp +@@ -6989,6 +6991,14 @@ int sched_cpu_deactivate(unsigned int cp balance_push_set(cpu, true); @@ -49,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_SCHED_SMT /* * When going down, decrement the number of cores with SMT present. -@@ -7073,10 +7083,6 @@ int sched_cpu_dying(unsigned int cpu) +@@ -7070,10 +7080,6 @@ int sched_cpu_dying(unsigned int cpu) sched_tick_stop(cpu); rq_lock_irqsave(rq, &rf); diff --git a/debian/patches-rt/0006-tasklets-Prevent-tasklet_unlock_spin_wait-deadlock-o.patch b/debian/patches-rt/0007-tasklets-Prevent-tasklet_unlock_spin_wait-deadlock-o.patch index d3728a589..1e91103be 100644 --- a/debian/patches-rt/0006-tasklets-Prevent-tasklet_unlock_spin_wait-deadlock-o.patch +++ b/debian/patches-rt/0007-tasklets-Prevent-tasklet_unlock_spin_wait-deadlock-o.patch @@ -1,8 +1,8 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:02:00 +0100 -Subject: [PATCH 06/19] tasklets: Prevent tasklet_unlock_spin_wait() deadlock +Date: Tue, 9 Mar 2021 09:42:10 +0100 +Subject: [PATCH 07/20] tasklets: Prevent tasklet_unlock_spin_wait() deadlock on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz tasklet_unlock_spin_wait() spin waits for the TASKLET_STATE_SCHED bit in the tasklet state to be cleared. This works on !RT nicely because the @@ -20,10 +20,11 @@ cycles. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/linux/interrupt.h | 13 ++----------- + include/linux/interrupt.h | 12 ++---------- kernel/softirq.c | 28 +++++++++++++++++++++++++++- - 2 files changed, 29 insertions(+), 12 deletions(-) + 2 files changed, 29 insertions(+), 11 deletions(-) --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -36,21 +37,21 @@ Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static inline int tasklet_trylock(struct tasklet_struct *t) { return !test_and_set_bit(TASKLET_STATE_RUN, &(t)->state); -@@ -662,16 +662,7 @@ static inline int tasklet_trylock(struct +@@ -662,16 +662,8 @@ static inline int tasklet_trylock(struct void tasklet_unlock(struct tasklet_struct *t); void tasklet_unlock_wait(struct tasklet_struct *t); -- ++void tasklet_unlock_spin_wait(struct tasklet_struct *t); + -/* -- * Do not use in new code. There is no real reason to invoke this from -- * atomic contexts. +- * Do not use in new code. Waiting for tasklets from atomic contexts is +- * error prone and should be avoided. - */ -static inline void tasklet_unlock_spin_wait(struct tasklet_struct *t) -{ - while (test_bit(TASKLET_STATE_RUN, &t->state)) - cpu_relax(); -} -+void tasklet_unlock_spin_wait(struct tasklet_struct *t); #else static inline int tasklet_trylock(struct tasklet_struct *t) { return 1; } static inline void tasklet_unlock(struct tasklet_struct *t) { } @@ -62,8 +63,8 @@ Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT) +/* -+ * Do not use in new code. There is no real reason to invoke this from -+ * atomic contexts. ++ * Do not use in new code. Waiting for tasklets from atomic contexts is ++ * error prone and should be avoided. + */ +void tasklet_unlock_spin_wait(struct tasklet_struct *t) +{ diff --git a/debian/patches-rt/0008-locking-spinlock-Split-the-lock-types-header.patch b/debian/patches-rt/0008-locking-spinlock-Split-the-lock-types-header.patch index ce2c021fe..a9144ee6f 100644 --- a/debian/patches-rt/0008-locking-spinlock-Split-the-lock-types-header.patch +++ b/debian/patches-rt/0008-locking-spinlock-Split-the-lock-types-header.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 29 Jun 2011 19:34:01 +0200 Subject: [PATCH 08/22] locking/spinlock: Split the lock types header -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Split raw_spinlock into its own file and the remaining spinlock_t into its own non-RT header. The non-RT header will be replaced later by sleeping diff --git a/debian/patches-rt/0013-net-jme-Replace-link-change-tasklet-with-a-worker.patch b/debian/patches-rt/0008-net-jme-Replace-link-change-tasklet-with-work.patch index 36476c3af..e4874b727 100644 --- a/debian/patches-rt/0013-net-jme-Replace-link-change-tasklet-with-a-worker.patch +++ b/debian/patches-rt/0008-net-jme-Replace-link-change-tasklet-with-work.patch @@ -1,18 +1,19 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu, 28 Jan 2021 16:12:02 +0100 -Subject: [PATCH 13/19] net: jme: Replace link-change tasklet with a worker -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:42:11 +0100 +Subject: [PATCH 08/20] net: jme: Replace link-change tasklet with work +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz -The link change tasklet disables taskelts for tx/rx processing while +The link change tasklet disables the tasklets for tx/rx processing while upating hw parameters and then enables the tasklets again. -This update can also be pushed into a workqueue where it can be -performed in preemptible context. This allows tasklet_disable() to -become sleeping. +This update can also be pushed into a workqueue where it can be performed +in preemptible context. This allows tasklet_disable() to become sleeping. -Replace the linkch_task tasklet with a workqueue. +Replace the linkch_task tasklet with a work. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/net/ethernet/jme.c | 10 +++++----- drivers/net/ethernet/jme.h | 2 +- diff --git a/debian/patches-rt/0008-printk-use-atomic64_t-for-devkmsg_user.seq.patch b/debian/patches-rt/0008-printk-use-atomic64_t-for-devkmsg_user.seq.patch index eae252b42..5b4c6b1e3 100644 --- a/debian/patches-rt/0008-printk-use-atomic64_t-for-devkmsg_user.seq.patch +++ b/debian/patches-rt/0008-printk-use-atomic64_t-for-devkmsg_user.seq.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Thu, 10 Dec 2020 15:33:40 +0106 Subject: [PATCH 08/28] printk: use atomic64_t for devkmsg_user.seq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz @user->seq is indirectly protected by @logbuf_lock. Once @logbuf_lock is removed, @user->seq will be no longer safe from an atomicity point diff --git a/debian/patches-rt/0008-sched-Massage-set_cpus_allowed.patch b/debian/patches-rt/0008-sched-Massage-set_cpus_allowed.patch index 6250d7554..7f365e105 100644 --- a/debian/patches-rt/0008-sched-Massage-set_cpus_allowed.patch +++ b/debian/patches-rt/0008-sched-Massage-set_cpus_allowed.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:06 +0200 Subject: [PATCH 08/19] sched: Massage set_cpus_allowed() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Thread a u32 flags word through the *set_cpus_allowed*() callchain. This will allow adding behavioural tweaks for future users. @@ -16,7 +16,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1824,13 +1824,14 @@ static int migration_cpu_stop(void *data +@@ -1822,13 +1822,14 @@ static int migration_cpu_stop(void *data * sched_class::set_cpus_allowed must do the below, but is not required to * actually call this function. */ @@ -33,7 +33,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { struct rq *rq = task_rq(p); bool queued, running; -@@ -1851,7 +1852,7 @@ void do_set_cpus_allowed(struct task_str +@@ -1849,7 +1850,7 @@ void do_set_cpus_allowed(struct task_str if (running) put_prev_task(rq, p); @@ -42,7 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (queued) enqueue_task(rq, p, ENQUEUE_RESTORE | ENQUEUE_NOCLOCK); -@@ -1859,6 +1860,11 @@ void do_set_cpus_allowed(struct task_str +@@ -1857,6 +1858,11 @@ void do_set_cpus_allowed(struct task_str set_next_task(rq, p); } @@ -54,7 +54,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Change a given task's CPU affinity. Migrate the thread to a * proper CPU and schedule it away if the CPU it's executing on -@@ -1869,7 +1875,8 @@ void do_set_cpus_allowed(struct task_str +@@ -1867,7 +1873,8 @@ void do_set_cpus_allowed(struct task_str * call is not atomic; no spinlocks may be held. */ static int __set_cpus_allowed_ptr(struct task_struct *p, @@ -64,7 +64,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { const struct cpumask *cpu_valid_mask = cpu_active_mask; unsigned int dest_cpu; -@@ -1891,7 +1898,7 @@ static int __set_cpus_allowed_ptr(struct +@@ -1889,7 +1896,7 @@ static int __set_cpus_allowed_ptr(struct * Must re-check here, to close a race against __kthread_bind(), * sched_setaffinity() is not guaranteed to observe the flag. */ @@ -73,7 +73,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ret = -EINVAL; goto out; } -@@ -1910,7 +1917,7 @@ static int __set_cpus_allowed_ptr(struct +@@ -1908,7 +1915,7 @@ static int __set_cpus_allowed_ptr(struct goto out; } @@ -82,7 +82,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (p->flags & PF_KTHREAD) { /* -@@ -1947,7 +1954,7 @@ static int __set_cpus_allowed_ptr(struct +@@ -1945,7 +1952,7 @@ static int __set_cpus_allowed_ptr(struct int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) { @@ -91,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr); -@@ -2406,7 +2413,8 @@ void sched_set_stop_task(int cpu, struct +@@ -2404,7 +2411,8 @@ void sched_set_stop_task(int cpu, struct #else static inline int __set_cpus_allowed_ptr(struct task_struct *p, @@ -101,7 +101,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { return set_cpus_allowed_ptr(p, new_mask); } -@@ -6012,7 +6020,7 @@ long sched_setaffinity(pid_t pid, const +@@ -6009,7 +6017,7 @@ long sched_setaffinity(pid_t pid, const } #endif again: @@ -110,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (!retval) { cpuset_cpus_allowed(p, cpus_allowed); -@@ -6591,7 +6599,7 @@ void init_idle(struct task_struct *idle, +@@ -6588,7 +6596,7 @@ void init_idle(struct task_struct *idle, * * And since this is boot we can forgo the serialization. */ @@ -142,7 +142,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Assumes rq->lock is held */ --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1808,7 +1808,8 @@ struct sched_class { +@@ -1809,7 +1809,8 @@ struct sched_class { void (*task_woken)(struct rq *this_rq, struct task_struct *task); void (*set_cpus_allowed)(struct task_struct *p, @@ -152,7 +152,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> void (*rq_online)(struct rq *rq); void (*rq_offline)(struct rq *rq); -@@ -1901,7 +1902,9 @@ extern void update_group_capacity(struct +@@ -1902,7 +1903,9 @@ extern void update_group_capacity(struct extern void trigger_load_balance(struct rq *rq); diff --git a/debian/patches-rt/0008-sh-irqstat-Use-the-generic-irq_cpustat_t.patch b/debian/patches-rt/0008-sh-irqstat-Use-the-generic-irq_cpustat_t.patch index 32b71fa87..fbafc6cbf 100644 --- a/debian/patches-rt/0008-sh-irqstat-Use-the-generic-irq_cpustat_t.patch +++ b/debian/patches-rt/0008-sh-irqstat-Use-the-generic-irq_cpustat_t.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:15 +0100 Subject: [PATCH 08/12] sh: irqstat: Use the generic irq_cpustat_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz SH can now use the generic irq_cpustat_t. Define ack_bad_irq so the generic header does not emit the generic version of it. diff --git a/debian/patches-rt/0008-x86-mm-highmem-Use-generic-kmap-atomic-implementatio.patch b/debian/patches-rt/0008-x86-mm-highmem-Use-generic-kmap-atomic-implementatio.patch index cba0bc17b..daf30ab22 100644 --- a/debian/patches-rt/0008-x86-mm-highmem-Use-generic-kmap-atomic-implementatio.patch +++ b/debian/patches-rt/0008-x86-mm-highmem-Use-generic-kmap-atomic-implementatio.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:20 +0100 Subject: [PATCH 08/37] x86/mm/highmem: Use generic kmap atomic implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Convert X86 to the generic kmap atomic implementation and make the iomap_atomic() naming convention consistent while at it. diff --git a/debian/patches-rt/0009-arc-mm-highmem-Use-generic-kmap-atomic-implementatio.patch b/debian/patches-rt/0009-arc-mm-highmem-Use-generic-kmap-atomic-implementatio.patch index fc5b28a16..3b19d281e 100644 --- a/debian/patches-rt/0009-arc-mm-highmem-Use-generic-kmap-atomic-implementatio.patch +++ b/debian/patches-rt/0009-arc-mm-highmem-Use-generic-kmap-atomic-implementatio.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:21 +0100 Subject: [PATCH 09/37] arc/mm/highmem: Use generic kmap atomic implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Adopt the map ordering to match the other architectures and the generic code. Also make the maximum entries limited and not dependend on the number diff --git a/debian/patches-rt/0009-irqstat-Move-declaration-into-asm-generic-hardirq.h.patch b/debian/patches-rt/0009-irqstat-Move-declaration-into-asm-generic-hardirq.h.patch index 970a82129..f687d06cd 100644 --- a/debian/patches-rt/0009-irqstat-Move-declaration-into-asm-generic-hardirq.h.patch +++ b/debian/patches-rt/0009-irqstat-Move-declaration-into-asm-generic-hardirq.h.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:16 +0100 Subject: [PATCH 09/12] irqstat: Move declaration into asm-generic/hardirq.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Move the declaration of the irq_cpustat per cpu variable to asm-generic/hardirq.h and remove the now empty linux/irq_cpustat.h header. diff --git a/debian/patches-rt/0009-locking-rtmutex-Avoid-include-hell.patch b/debian/patches-rt/0009-locking-rtmutex-Avoid-include-hell.patch index 2f70c39bb..68c4fbe7c 100644 --- a/debian/patches-rt/0009-locking-rtmutex-Avoid-include-hell.patch +++ b/debian/patches-rt/0009-locking-rtmutex-Avoid-include-hell.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 29 Jun 2011 20:06:39 +0200 Subject: [PATCH 09/22] locking/rtmutex: Avoid include hell -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Include only the required raw types. This avoids pulling in the complete spinlock header which in turn requires rtmutex.h at some point. diff --git a/debian/patches-rt/0015-net-sundance-Use-tasklet_disable_in_atomic.patch b/debian/patches-rt/0009-net-sundance-Use-tasklet_disable_in_atomic.patch index d9f170501..6601bd8b9 100644 --- a/debian/patches-rt/0015-net-sundance-Use-tasklet_disable_in_atomic.patch +++ b/debian/patches-rt/0009-net-sundance-Use-tasklet_disable_in_atomic.patch @@ -1,14 +1,21 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu, 28 Jan 2021 15:44:01 +0100 -Subject: [PATCH 15/19] net: sundance: Use tasklet_disable_in_atomic(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:42:12 +0100 +Subject: [PATCH 09/20] net: sundance: Use tasklet_disable_in_atomic(). +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz -tasklet_disable() is used in the timer callback. +tasklet_disable() is used in the timer callback. This might be distangled, +but without access to the hardware that's a bit risky. -Replace it with tasklet_disable_in_atomic() so it can be used in atomic -context while tasklet_disable() may sleep. +Replace it with tasklet_disable_in_atomic() so tasklet_disable() can be +changed to a sleep wait once all remaining atomic users are converted. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Cc: Denis Kirjanov <kda@linux-powerpc.org> +Cc: "David S. Miller" <davem@davemloft.net> +Cc: Jakub Kicinski <kuba@kernel.org> +Cc: netdev@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/net/ethernet/dlink/sundance.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches-rt/0009-printk-add-syslog_lock.patch b/debian/patches-rt/0009-printk-add-syslog_lock.patch index dc0377ae0..c9e2d9ac7 100644 --- a/debian/patches-rt/0009-printk-add-syslog_lock.patch +++ b/debian/patches-rt/0009-printk-add-syslog_lock.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Thu, 10 Dec 2020 16:58:02 +0106 Subject: [PATCH 09/28] printk: add syslog_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The global variables @syslog_seq, @syslog_partial, @syslog_time and write access to @clear_seq are protected by @logbuf_lock. diff --git a/debian/patches-rt/0009-sched-Add-migrate_disable.patch b/debian/patches-rt/0009-sched-Add-migrate_disable.patch index c50d149a2..ca75fac05 100644 --- a/debian/patches-rt/0009-sched-Add-migrate_disable.patch +++ b/debian/patches-rt/0009-sched-Add-migrate_disable.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:07 +0200 Subject: [PATCH 09/19] sched: Add migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Add the base migrate_disable() support (under protest). @@ -115,7 +115,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int rcu_read_lock_nesting; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1696,6 +1696,61 @@ void check_preempt_curr(struct rq *rq, s +@@ -1694,6 +1694,61 @@ void check_preempt_curr(struct rq *rq, s #ifdef CONFIG_SMP @@ -177,7 +177,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Per-CPU kthreads are allowed to run on !active && online CPUs, see * __set_cpus_allowed_ptr() and select_fallback_rq(). -@@ -1705,7 +1760,7 @@ static inline bool is_cpu_allowed(struct +@@ -1703,7 +1758,7 @@ static inline bool is_cpu_allowed(struct if (!cpumask_test_cpu(cpu, p->cpus_ptr)) return false; @@ -186,7 +186,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return cpu_online(cpu); return cpu_active(cpu); -@@ -1826,6 +1881,11 @@ static int migration_cpu_stop(void *data +@@ -1824,6 +1879,11 @@ static int migration_cpu_stop(void *data */ void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask, u32 flags) { @@ -198,7 +198,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> cpumask_copy(&p->cpus_mask, new_mask); p->nr_cpus_allowed = cpumask_weight(new_mask); } -@@ -1836,7 +1896,22 @@ static void +@@ -1834,7 +1894,22 @@ static void struct rq *rq = task_rq(p); bool queued, running; @@ -222,7 +222,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> queued = task_on_rq_queued(p); running = task_current(rq, p); -@@ -1887,9 +1962,14 @@ static int __set_cpus_allowed_ptr(struct +@@ -1885,9 +1960,14 @@ static int __set_cpus_allowed_ptr(struct rq = task_rq_lock(p, &rf); update_rq_clock(rq); @@ -239,7 +239,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> */ cpu_valid_mask = cpu_online_mask; } -@@ -1903,7 +1983,7 @@ static int __set_cpus_allowed_ptr(struct +@@ -1901,7 +1981,7 @@ static int __set_cpus_allowed_ptr(struct goto out; } @@ -248,7 +248,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> goto out; /* -@@ -1995,6 +2075,8 @@ void set_task_cpu(struct task_struct *p, +@@ -1993,6 +2073,8 @@ void set_task_cpu(struct task_struct *p, * Clearly, migrating tasks to offline CPUs is a fairly daft thing. */ WARN_ON_ONCE(!cpu_online(new_cpu)); @@ -257,7 +257,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif trace_sched_migrate_task(p, new_cpu); -@@ -2325,6 +2407,12 @@ static int select_fallback_rq(int cpu, s +@@ -2323,6 +2405,12 @@ static int select_fallback_rq(int cpu, s } fallthrough; case possible: @@ -270,7 +270,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> do_set_cpus_allowed(p, cpu_possible_mask); state = fail; break; -@@ -2359,7 +2447,7 @@ int select_task_rq(struct task_struct *p +@@ -2357,7 +2445,7 @@ int select_task_rq(struct task_struct *p { lockdep_assert_held(&p->pi_lock); @@ -279,7 +279,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); else cpu = cpumask_any(p->cpus_ptr); -@@ -2421,6 +2509,17 @@ static inline int __set_cpus_allowed_ptr +@@ -2419,6 +2507,17 @@ static inline int __set_cpus_allowed_ptr #endif /* CONFIG_SMP */ @@ -297,7 +297,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void ttwu_stat(struct task_struct *p, int cpu, int wake_flags) { -@@ -4575,6 +4674,7 @@ static void __sched notrace __schedule(b +@@ -4572,6 +4671,7 @@ static void __sched notrace __schedule(b */ ++*switch_count; @@ -307,7 +307,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> trace_sched_switch(preempt, prev, next); --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1896,14 +1896,16 @@ static inline bool sched_fair_runnable(s +@@ -1897,14 +1897,16 @@ static inline bool sched_fair_runnable(s extern struct task_struct *pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf); extern struct task_struct *pick_next_task_idle(struct rq *rq); diff --git a/debian/patches-rt/0010-ARM-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0010-ARM-highmem-Switch-to-generic-kmap-atomic.patch index 37205e927..7bd151448 100644 --- a/debian/patches-rt/0010-ARM-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0010-ARM-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:22 +0100 Subject: [PATCH 10/37] ARM: highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No reason having the same code in every architecture. diff --git a/debian/patches-rt/0010-ath9k-Use-tasklet_disable_in_atomic.patch b/debian/patches-rt/0010-ath9k-Use-tasklet_disable_in_atomic.patch new file mode 100644 index 000000000..020bf8b5f --- /dev/null +++ b/debian/patches-rt/0010-ath9k-Use-tasklet_disable_in_atomic.patch @@ -0,0 +1,42 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 9 Mar 2021 09:42:13 +0100 +Subject: [PATCH 10/20] ath9k: Use tasklet_disable_in_atomic() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz + +All callers of ath9k_beacon_ensure_primary_slot() are preemptible / +acquire a mutex except for this callchain: + + spin_lock_bh(&sc->sc_pcu_lock); + ath_complete_reset() + -> ath9k_calculate_summary_state() + -> ath9k_beacon_ensure_primary_slot() + +It's unclear how that can be distangled, so use tasklet_disable_in_atomic() +for now. This allows tasklet_disable() to become sleepable once the +remaining atomic users are cleaned up. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Cc: ath9k-devel@qca.qualcomm.com +Cc: Kalle Valo <kvalo@codeaurora.org> +Cc: "David S. Miller" <davem@davemloft.net> +Cc: Jakub Kicinski <kuba@kernel.org> +Cc: linux-wireless@vger.kernel.org +Cc: netdev@vger.kernel.org +Acked-by: Kalle Valo <kvalo@codeaurora.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + drivers/net/wireless/ath/ath9k/beacon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath9k/beacon.c ++++ b/drivers/net/wireless/ath/ath9k/beacon.c +@@ -251,7 +251,7 @@ void ath9k_beacon_ensure_primary_slot(st + int first_slot = ATH_BCBUF; + int slot; + +- tasklet_disable(&sc->bcon_tasklet); ++ tasklet_disable_in_atomic(&sc->bcon_tasklet); + + /* Find first taken slot. */ + for (slot = 0; slot < ATH_BCBUF; slot++) { diff --git a/debian/patches-rt/0010-lockdep-Reduce-header-files-in-debug_locks.h.patch b/debian/patches-rt/0010-lockdep-Reduce-header-files-in-debug_locks.h.patch index 58ddbffb7..010ee998d 100644 --- a/debian/patches-rt/0010-lockdep-Reduce-header-files-in-debug_locks.h.patch +++ b/debian/patches-rt/0010-lockdep-Reduce-header-files-in-debug_locks.h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 14 Aug 2020 16:55:25 +0200 Subject: [PATCH 11/23] lockdep: Reduce header files in debug_locks.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The inclusion of printk.h leads to circular dependency if spinlock_t is based on rt_mutex. diff --git a/debian/patches-rt/0010-preempt-Cleanup-the-macro-maze-a-bit.patch b/debian/patches-rt/0010-preempt-Cleanup-the-macro-maze-a-bit.patch index 8370aca39..c1b03c3d0 100644 --- a/debian/patches-rt/0010-preempt-Cleanup-the-macro-maze-a-bit.patch +++ b/debian/patches-rt/0010-preempt-Cleanup-the-macro-maze-a-bit.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:17 +0100 Subject: [PATCH 10/12] preempt: Cleanup the macro maze a bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Make the macro maze consistent and prepare it for adding the RT variant for BH accounting. diff --git a/debian/patches-rt/0010-printk-introduce-a-kmsg_dump-iterator.patch b/debian/patches-rt/0010-printk-introduce-a-kmsg_dump-iterator.patch index 9f3c21cfa..bdb2cafcf 100644 --- a/debian/patches-rt/0010-printk-introduce-a-kmsg_dump-iterator.patch +++ b/debian/patches-rt/0010-printk-introduce-a-kmsg_dump-iterator.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Fri, 18 Dec 2020 11:40:08 +0000 Subject: [PATCH 10/28] printk: introduce a kmsg_dump iterator -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Rather than store the iterator information into the registered kmsg_dump structure, create a separate iterator structure. The diff --git a/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch b/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch index 939abd4f1..53c6a029a 100644 --- a/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch +++ b/debian/patches-rt/0010-sched-Fix-migrate_disable-vs-set_cpus_allowed_ptr.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:08 +0200 Subject: [PATCH 10/19] sched: Fix migrate_disable() vs set_cpus_allowed_ptr() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Concurrent migrate_disable() and set_cpus_allowed_ptr() has interesting features. We rely on set_cpus_allowed_ptr() to not return @@ -53,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1732,15 +1732,26 @@ void migrate_enable(void) +@@ -1730,15 +1730,26 @@ void migrate_enable(void) { struct task_struct *p = current; @@ -86,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(migrate_enable); -@@ -1805,8 +1816,16 @@ static struct rq *move_queued_task(struc +@@ -1803,8 +1814,16 @@ static struct rq *move_queued_task(struc } struct migration_arg { @@ -105,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> }; /* -@@ -1838,16 +1857,19 @@ static struct rq *__migrate_task(struct +@@ -1836,16 +1855,19 @@ static struct rq *__migrate_task(struct */ static int migration_cpu_stop(void *data) { @@ -126,7 +126,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * We need to explicitly wake pending tasks before running * __migrate_task() such that we will not miss enforcing cpus_ptr -@@ -1857,21 +1879,83 @@ static int migration_cpu_stop(void *data +@@ -1855,21 +1877,83 @@ static int migration_cpu_stop(void *data raw_spin_lock(&p->pi_lock); rq_lock(rq, &rf); @@ -215,7 +215,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; } -@@ -1941,6 +2025,110 @@ void do_set_cpus_allowed(struct task_str +@@ -1939,6 +2023,110 @@ void do_set_cpus_allowed(struct task_str } /* @@ -326,7 +326,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Change a given task's CPU affinity. Migrate the thread to a * proper CPU and schedule it away if the CPU it's executing on * is removed from the allowed bitmask. -@@ -2009,23 +2197,8 @@ static int __set_cpus_allowed_ptr(struct +@@ -2007,23 +2195,8 @@ static int __set_cpus_allowed_ptr(struct p->nr_cpus_allowed != 1); } @@ -351,7 +351,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> out: task_rq_unlock(rq, p, &rf); -@@ -3210,6 +3383,7 @@ static void __sched_fork(unsigned long c +@@ -3207,6 +3380,7 @@ static void __sched_fork(unsigned long c init_numa_balancing(clone_flags, p); #ifdef CONFIG_SMP p->wake_entry.u_flags = CSD_TYPE_TTWU; diff --git a/debian/patches-rt/0011-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch b/debian/patches-rt/0011-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch new file mode 100644 index 000000000..623ad016e --- /dev/null +++ b/debian/patches-rt/0011-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch @@ -0,0 +1,36 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 9 Mar 2021 09:42:14 +0100 +Subject: [PATCH 11/20] atm: eni: Use tasklet_disable_in_atomic() in the send() + callback +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz + +The atmdev_ops::send callback which calls tasklet_disable() is invoked with +bottom halfs disabled from net_device_ops::ndo_start_xmit(). All other +invocations of tasklet_disable() in this driver happen in preemptible +context. + +Change the send() call to use tasklet_disable_in_atomic() which allows +tasklet_disable() to be made sleepable once the remaining atomic context +usage sites are cleaned up. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Cc: Chas Williams <3chas3@gmail.com> +Cc: linux-atm-general@lists.sourceforge.net +Cc: netdev@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + drivers/atm/eni.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/atm/eni.c ++++ b/drivers/atm/eni.c +@@ -2054,7 +2054,7 @@ static int eni_send(struct atm_vcc *vcc, + } + submitted++; + ATM_SKB(skb)->vcc = vcc; +- tasklet_disable(&ENI_DEV(vcc->dev)->task); ++ tasklet_disable_in_atomic(&ENI_DEV(vcc->dev)->task); + res = do_tx(skb); + tasklet_enable(&ENI_DEV(vcc->dev)->task); + if (res == enq_ok) return 0; diff --git a/debian/patches-rt/0011-csky-mm-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0011-csky-mm-highmem-Switch-to-generic-kmap-atomic.patch index f2443425b..82fcfd297 100644 --- a/debian/patches-rt/0011-csky-mm-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0011-csky-mm-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:23 +0100 Subject: [PATCH 11/37] csky/mm/highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No reason having the same code in every architecture. diff --git a/debian/patches-rt/0011-locking-split-out-the-rbtree-definition.patch b/debian/patches-rt/0011-locking-split-out-the-rbtree-definition.patch index da85fe6e9..ac695d7e5 100644 --- a/debian/patches-rt/0011-locking-split-out-the-rbtree-definition.patch +++ b/debian/patches-rt/0011-locking-split-out-the-rbtree-definition.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 14 Aug 2020 17:08:41 +0200 Subject: [PATCH 11/22] locking: split out the rbtree definition -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz rtmutex.h needs the definition for rb_root_cached. By including kernel.h we will get to spinlock.h which requires rtmutex.h again. diff --git a/debian/patches-rt/0011-sched-core-Make-migrate-disable-and-CPU-hotplug-coop.patch b/debian/patches-rt/0011-sched-core-Make-migrate-disable-and-CPU-hotplug-coop.patch index b5b1e7d0b..c97a11677 100644 --- a/debian/patches-rt/0011-sched-core-Make-migrate-disable-and-CPU-hotplug-coop.patch +++ b/debian/patches-rt/0011-sched-core-Make-migrate-disable-and-CPU-hotplug-coop.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 23 Oct 2020 12:12:09 +0200 Subject: [PATCH 11/19] sched/core: Make migrate disable and CPU hotplug cooperative -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On CPU unplug tasks which are in a migrate disabled region cannot be pushed to a different CPU until they returned to migrateable state. @@ -20,7 +20,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1721,10 +1721,17 @@ static void migrate_disable_switch(struc +@@ -1719,10 +1719,17 @@ static void migrate_disable_switch(struc void migrate_disable(void) { @@ -40,7 +40,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL_GPL(migrate_disable); -@@ -1751,6 +1758,7 @@ void migrate_enable(void) +@@ -1749,6 +1756,7 @@ void migrate_enable(void) */ barrier(); p->migration_disabled = 0; @@ -48,7 +48,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> preempt_enable(); } EXPORT_SYMBOL_GPL(migrate_enable); -@@ -1760,6 +1768,11 @@ static inline bool is_migration_disabled +@@ -1758,6 +1766,11 @@ static inline bool is_migration_disabled return p->migration_disabled; } @@ -60,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* -@@ -2691,6 +2704,11 @@ static inline bool is_migration_disabled +@@ -2689,6 +2702,11 @@ static inline bool is_migration_disabled return false; } @@ -72,7 +72,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif static void -@@ -7065,15 +7083,20 @@ static void balance_push(struct rq *rq) +@@ -7062,15 +7080,20 @@ static void balance_push(struct rq *rq) * Both the cpu-hotplug and stop task are in this case and are * required to complete the hotplug process. */ @@ -95,7 +95,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> raw_spin_unlock(&rq->lock); rcuwait_wake_up(&rq->hotplug_wait); raw_spin_lock(&rq->lock); -@@ -7120,7 +7143,8 @@ static void balance_hotplug_wait(void) +@@ -7117,7 +7140,8 @@ static void balance_hotplug_wait(void) { struct rq *rq = this_rq(); @@ -105,7 +105,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> TASK_UNINTERRUPTIBLE); } -@@ -7365,7 +7389,7 @@ int sched_cpu_dying(unsigned int cpu) +@@ -7362,7 +7386,7 @@ int sched_cpu_dying(unsigned int cpu) sched_tick_stop(cpu); rq_lock_irqsave(rq, &rf); @@ -116,7 +116,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> calc_load_migrate(rq); --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1047,6 +1047,10 @@ struct rq { +@@ -1048,6 +1048,10 @@ struct rq { /* Must be inspected within a rcu lock section */ struct cpuidle_state *idle_state; #endif diff --git a/debian/patches-rt/0011-softirq-Move-related-code-into-one-section.patch b/debian/patches-rt/0011-softirq-Move-related-code-into-one-section.patch index e7edd0f7d..2799b0acf 100644 --- a/debian/patches-rt/0011-softirq-Move-related-code-into-one-section.patch +++ b/debian/patches-rt/0011-softirq-Move-related-code-into-one-section.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 13 Nov 2020 15:02:18 +0100 Subject: [PATCH 11/12] softirq: Move related code into one section -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz To prepare for adding a RT aware variant of softirq serialization and processing move related code into one section so the necessary #ifdeffery diff --git a/debian/patches-rt/0011-um-synchronize-kmsg_dumper.patch b/debian/patches-rt/0011-um-synchronize-kmsg_dumper.patch index a7209320d..39c252467 100644 --- a/debian/patches-rt/0011-um-synchronize-kmsg_dumper.patch +++ b/debian/patches-rt/0011-um-synchronize-kmsg_dumper.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 21 Dec 2020 11:10:03 +0106 Subject: [PATCH 11/28] um: synchronize kmsg_dumper -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The kmsg_dumper can be called from any context and CPU, possibly from multiple CPUs simultaneously. Since a static buffer is used @@ -25,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include <linux/console.h> #include <shared/init.h> #include <shared/kern.h> -@@ -9,8 +10,10 @@ +@@ -9,8 +10,10 @@ static void kmsg_dumper_stdout(struct km enum kmsg_dump_reason reason, struct kmsg_dumper_iter *iter) { @@ -36,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> size_t len = 0; /* only dump kmsg when no console is available */ -@@ -25,11 +28,16 @@ +@@ -25,11 +28,16 @@ static void kmsg_dumper_stdout(struct km if (con) return; diff --git a/debian/patches-rt/0012-PCI-hv-Use-tasklet_disable_in_atomic.patch b/debian/patches-rt/0012-PCI-hv-Use-tasklet_disable_in_atomic.patch new file mode 100644 index 000000000..5422ae7f2 --- /dev/null +++ b/debian/patches-rt/0012-PCI-hv-Use-tasklet_disable_in_atomic.patch @@ -0,0 +1,40 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue, 9 Mar 2021 09:42:15 +0100 +Subject: [PATCH 12/20] PCI: hv: Use tasklet_disable_in_atomic() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz + +The hv_compose_msi_msg() callback in irq_chip::irq_compose_msi_msg is +invoked via irq_chip_compose_msi_msg(), which itself is always invoked from +atomic contexts from the guts of the interrupt core code. + +There is no way to change this w/o rewriting the whole driver, so use +tasklet_disable_in_atomic() which allows to make tasklet_disable() +sleepable once the remaining atomic users are addressed. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Cc: "K. Y. Srinivasan" <kys@microsoft.com> +Cc: Haiyang Zhang <haiyangz@microsoft.com> +Cc: Stephen Hemminger <sthemmin@microsoft.com> +Cc: Wei Liu <wei.liu@kernel.org> +Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> +Cc: Rob Herring <robh@kernel.org> +Cc: Bjorn Helgaas <bhelgaas@google.com> +Cc: linux-hyperv@vger.kernel.org +Cc: linux-pci@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + drivers/pci/controller/pci-hyperv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/pci/controller/pci-hyperv.c ++++ b/drivers/pci/controller/pci-hyperv.c +@@ -1458,7 +1458,7 @@ static void hv_compose_msi_msg(struct ir + * Prevents hv_pci_onchannelcallback() from running concurrently + * in the tasklet. + */ +- tasklet_disable(&channel->callback_event); ++ tasklet_disable_in_atomic(&channel->callback_event); + + /* + * Since this function is called with IRQ locks held, can't diff --git a/debian/patches-rt/0012-locking-rtmutex-Provide-rt_mutex_slowlock_locked.patch b/debian/patches-rt/0012-locking-rtmutex-Provide-rt_mutex_slowlock_locked.patch index 8f47eb47b..219d96edf 100644 --- a/debian/patches-rt/0012-locking-rtmutex-Provide-rt_mutex_slowlock_locked.patch +++ b/debian/patches-rt/0012-locking-rtmutex-Provide-rt_mutex_slowlock_locked.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 16:14:22 +0200 Subject: [PATCH 12/22] locking/rtmutex: Provide rt_mutex_slowlock_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz This is the inner-part of rt_mutex_slowlock(), required for rwsem-rt. diff --git a/debian/patches-rt/0012-microblaze-mm-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0012-microblaze-mm-highmem-Switch-to-generic-kmap-atomic.patch index 2e968f63c..746f9331f 100644 --- a/debian/patches-rt/0012-microblaze-mm-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0012-microblaze-mm-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:24 +0100 Subject: [PATCH 12/37] microblaze/mm/highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No reason having the same code in every architecture. diff --git a/debian/patches-rt/0012-printk-remove-logbuf_lock.patch b/debian/patches-rt/0012-printk-remove-logbuf_lock.patch index 7a12de828..4f374b118 100644 --- a/debian/patches-rt/0012-printk-remove-logbuf_lock.patch +++ b/debian/patches-rt/0012-printk-remove-logbuf_lock.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 26 Jan 2021 17:43:19 +0106 Subject: [PATCH 12/28] printk: remove logbuf_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Since the ringbuffer is lockless, there is no need for it to be protected by @logbuf_lock. Remove @logbuf_lock. @@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> __printf(4, 0) int vprintk_store(int facility, int level, const struct dev_printk_info *dev_info, -@@ -59,7 +57,7 @@ +@@ -59,7 +57,7 @@ void defer_console_output(void); __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; } /* @@ -42,7 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> */ --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -355,41 +355,6 @@ +@@ -355,41 +355,6 @@ enum log_flags { LOG_CONT = 8, /* text is a fragment of a continuation line */ }; @@ -84,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* syslog_lock protects syslog_* variables and write access to clear_seq. */ static DEFINE_RAW_SPINLOCK(syslog_lock); -@@ -401,6 +366,7 @@ +@@ -401,6 +366,7 @@ static u64 syslog_seq; static size_t syslog_partial; static bool syslog_time; @@ -92,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* the next printk record to write to the console */ static u64 console_seq; static u64 exclusive_console_stop_seq; -@@ -767,27 +733,27 @@ +@@ -767,27 +733,27 @@ static ssize_t devkmsg_read(struct file if (ret) return ret; @@ -125,7 +125,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> goto out; } -@@ -797,7 +763,7 @@ +@@ -797,7 +763,7 @@ static ssize_t devkmsg_read(struct file &r->info->dev_info); atomic64_set(&user->seq, r->info->seq + 1); @@ -134,7 +134,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (len > count) { ret = -EINVAL; -@@ -832,7 +798,7 @@ +@@ -832,7 +798,7 @@ static loff_t devkmsg_llseek(struct file if (offset) return -ESPIPE; @@ -143,7 +143,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> switch (whence) { case SEEK_SET: /* the first record */ -@@ -853,7 +819,7 @@ +@@ -853,7 +819,7 @@ static loff_t devkmsg_llseek(struct file default: ret = -EINVAL; } @@ -152,7 +152,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ret; } -@@ -868,15 +834,15 @@ +@@ -868,15 +834,15 @@ static __poll_t devkmsg_poll(struct file poll_wait(file, &log_wait, wait); @@ -171,7 +171,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ret; } -@@ -909,9 +875,9 @@ +@@ -909,9 +875,9 @@ static int devkmsg_open(struct inode *in prb_rec_init_rd(&user->record, &user->info, &user->text_buf[0], sizeof(user->text_buf)); @@ -183,7 +183,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> file->private_data = user; return 0; -@@ -1533,11 +1499,11 @@ +@@ -1533,11 +1499,11 @@ static int syslog_print(char __user *buf size_t n; size_t skip; @@ -197,7 +197,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> break; } if (r.info->seq != syslog_seq) { -@@ -1567,7 +1533,7 @@ +@@ -1567,7 +1533,7 @@ static int syslog_print(char __user *buf } else n = 0; raw_spin_unlock(&syslog_lock); @@ -206,7 +206,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (!n) break; -@@ -1601,7 +1567,7 @@ +@@ -1601,7 +1567,7 @@ static int syslog_print_all(char __user return -ENOMEM; time = printk_time; @@ -215,7 +215,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Find first record that fits, including all following records, * into the user-provided buffer for this dump. -@@ -1622,12 +1588,12 @@ +@@ -1622,12 +1588,12 @@ static int syslog_print_all(char __user break; } @@ -230,7 +230,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (len < 0) break; -@@ -1638,7 +1604,7 @@ +@@ -1638,7 +1604,7 @@ static int syslog_print_all(char __user latched_seq_write(&clear_seq, seq); raw_spin_unlock(&syslog_lock); } @@ -239,7 +239,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> kfree(text); return len; -@@ -1646,11 +1612,11 @@ +@@ -1646,11 +1612,11 @@ static int syslog_print_all(char __user static void syslog_clear(void) { @@ -253,7 +253,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* Return a consistent copy of @syslog_seq. */ -@@ -1738,12 +1704,12 @@ +@@ -1738,12 +1704,12 @@ int do_syslog(int type, char __user *buf break; /* Number of chars in the log buffer */ case SYSLOG_ACTION_SIZE_UNREAD: @@ -268,7 +268,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; } if (info.seq != syslog_seq) { -@@ -1772,7 +1738,7 @@ +@@ -1772,7 +1738,7 @@ int do_syslog(int type, char __user *buf error -= syslog_partial; } raw_spin_unlock(&syslog_lock); @@ -277,7 +277,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> break; /* Size of the log buffer */ case SYSLOG_ACTION_SIZE_BUFFER: -@@ -2621,7 +2587,6 @@ +@@ -2621,7 +2587,6 @@ void console_unlock(void) size_t len; printk_safe_enter_irqsave(flags); @@ -285,7 +285,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> skip: if (!prb_read_valid(prb, console_seq, &r)) break; -@@ -2665,7 +2630,6 @@ +@@ -2665,7 +2630,6 @@ void console_unlock(void) console_msg_format & MSG_FORMAT_SYSLOG, printk_time); console_seq++; @@ -293,7 +293,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * While actively printing out messages, if another printk() -@@ -2692,8 +2656,6 @@ +@@ -2692,8 +2656,6 @@ void console_unlock(void) console_locked = 0; @@ -302,7 +302,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> up_console_sem(); /* -@@ -2702,9 +2664,7 @@ +@@ -2702,9 +2664,7 @@ void console_unlock(void) * there's a new owner and the console_unlock() from them will do the * flush, no worries. */ @@ -312,7 +312,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> printk_safe_exit_irqrestore(flags); if (retry && console_trylock()) -@@ -2771,9 +2731,9 @@ +@@ -2771,9 +2731,9 @@ void console_flush_on_panic(enum con_flu if (mode == CONSOLE_REPLAY_ALL) { unsigned long flags; @@ -324,7 +324,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } console_unlock(); } -@@ -3002,7 +2962,7 @@ +@@ -3002,7 +2962,7 @@ void register_console(struct console *ne * console_unlock(); will print out the buffered messages * for us. */ @@ -333,7 +333,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * We're about to replay the log buffer. Only do this to the * just-registered console to avoid excessive message spam to -@@ -3020,7 +2980,7 @@ +@@ -3020,7 +2980,7 @@ void register_console(struct console *ne console_seq = syslog_seq; raw_spin_unlock(&syslog_lock); @@ -342,7 +342,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } console_unlock(); console_sysfs_notify(); -@@ -3406,10 +3366,10 @@ +@@ -3406,10 +3366,10 @@ void kmsg_dump(enum kmsg_dump_reason rea /* initialize iterator with data about the stored records */ iter.active = true; @@ -355,7 +355,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* invoke dumper which will iterate over records */ dumper->dump(dumper, reason, &iter); -@@ -3496,9 +3456,9 @@ +@@ -3496,9 +3456,9 @@ bool kmsg_dump_get_line(struct kmsg_dump unsigned long flags; bool ret; @@ -367,7 +367,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ret; } -@@ -3538,7 +3498,7 @@ +@@ -3538,7 +3498,7 @@ bool kmsg_dump_get_buffer(struct kmsg_du if (!iter->active || !buf || !size) goto out; @@ -376,7 +376,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (prb_read_valid_info(prb, iter->cur_seq, &info, NULL)) { if (info.seq != iter->cur_seq) { /* messages are gone, move to first available one */ -@@ -3548,7 +3508,7 @@ +@@ -3548,7 +3508,7 @@ bool kmsg_dump_get_buffer(struct kmsg_du /* last entry */ if (iter->cur_seq >= iter->next_seq) { @@ -385,7 +385,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> goto out; } -@@ -3582,7 +3542,7 @@ +@@ -3582,7 +3542,7 @@ bool kmsg_dump_get_buffer(struct kmsg_du iter->next_seq = next_seq; ret = true; @@ -394,7 +394,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> out: if (len_out) *len_out = len; -@@ -3618,9 +3578,9 @@ +@@ -3618,9 +3578,9 @@ void kmsg_dump_rewind(struct kmsg_dumper { unsigned long flags; @@ -417,7 +417,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> * it uses an alternative implementation that temporary stores * the strings into a per-CPU buffer. The content of the buffer * is later flushed into the main ring buffer via IRQ work. -@@ -266,18 +266,6 @@ +@@ -266,18 +266,6 @@ void printk_safe_flush(void) */ void printk_safe_flush_on_panic(void) { @@ -436,7 +436,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (raw_spin_is_locked(&safe_read_lock)) { if (num_online_cpus() > 1) return; -@@ -319,9 +307,7 @@ +@@ -319,9 +307,7 @@ void noinstr printk_nmi_exit(void) * reordering. * * It has effect only when called in NMI context. Then printk() @@ -447,7 +447,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> */ void printk_nmi_direct_enter(void) { -@@ -376,20 +362,21 @@ +@@ -376,20 +362,21 @@ void __printk_safe_exit(void) #endif /* diff --git a/debian/patches-rt/0012-sched-rt-Use-cpumask_any-_distribute.patch b/debian/patches-rt/0012-sched-rt-Use-cpumask_any-_distribute.patch index 45c3335f8..c7bcee77d 100644 --- a/debian/patches-rt/0012-sched-rt-Use-cpumask_any-_distribute.patch +++ b/debian/patches-rt/0012-sched-rt-Use-cpumask_any-_distribute.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:10 +0200 Subject: [PATCH 12/19] sched,rt: Use cpumask_any*_distribute() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Replace a bunch of cpumask_any*() instances with cpumask_any*_distribute(), by injecting this little bit of random in diff --git a/debian/patches-rt/0012-sh-irq-Add-missing-closing-parentheses-in-arch_show_.patch b/debian/patches-rt/0012-sh-irq-Add-missing-closing-parentheses-in-arch_show_.patch index 3060461c9..df1fed1e4 100644 --- a/debian/patches-rt/0012-sh-irq-Add-missing-closing-parentheses-in-arch_show_.patch +++ b/debian/patches-rt/0012-sh-irq-Add-missing-closing-parentheses-in-arch_show_.patch @@ -5,7 +5,7 @@ Subject: [PATCH 12/12] sh/irq: Add missing closing parentheses in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz arch/sh/kernel/irq.c: In function ‘arch_show_interrupts’: arch/sh/kernel/irq.c:47:58: error: expected ‘)’ before ‘;’ token diff --git a/debian/patches-rt/0019-firewire-ohci-Use-tasklet_disable_in_atomic-in-the-t.patch b/debian/patches-rt/0013-firewire-ohci-Use-tasklet_disable_in_atomic-where-re.patch index 2d66a1fa8..d454c4743 100644 --- a/debian/patches-rt/0019-firewire-ohci-Use-tasklet_disable_in_atomic-in-the-t.patch +++ b/debian/patches-rt/0013-firewire-ohci-Use-tasklet_disable_in_atomic-where-re.patch @@ -1,24 +1,33 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri, 29 Jan 2021 13:09:59 +0100 -Subject: [PATCH 19/19] firewire: ohci: Use tasklet_disable_in_atomic() in the - two atomic user -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:42:16 +0100 +Subject: [PATCH 13/20] firewire: ohci: Use tasklet_disable_in_atomic() where + required +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz -ohci_cancel_packet() can be invoked from ar_context_tasklet(). It -will cancel a different tasklet than it is running. +tasklet_disable() is invoked in several places. Some of them are in atomic +context which prevents a conversion of tasklet_disable() to a sleepable +function. -ohci_flush_iso_completions() can be invoked from other driver either -from a tasklet or from a workqueue with disabled preemption. -The function irq_target_callback() make it appear to be invoked from -IRQ-context. The `sc' callback it assigns can be tracked back to the -flush_iso_completions() function. This is called from preemptible -context (ohci_allocate_iso_context()) and ohci_flush_iso_completions(). +The atomic callchains are: -The invocation from at_context_flush() is always preemptible. + ar_context_tasklet() + ohci_cancel_packet() + tasklet_disable() -Use tasklet_disable_in_atomic() for the two invocations from atomic -context. + ... + ohci_flush_iso_completions() + tasklet_disable() +The invocation of tasklet_disable() from at_context_flush() is always in +preemptible context. + +Use tasklet_disable_in_atomic() for the two invocations in +ohci_cancel_packet() and ohci_flush_iso_completions(). + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> +Cc: linux1394-devel@lists.sourceforge.net Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/firewire/ohci.c | 4 ++-- diff --git a/debian/patches-rt/0013-locking-rtmutex-export-lockdep-less-version-of-rt_mu.patch b/debian/patches-rt/0013-locking-rtmutex-export-lockdep-less-version-of-rt_mu.patch index 1949447e4..5ff391727 100644 --- a/debian/patches-rt/0013-locking-rtmutex-export-lockdep-less-version-of-rt_mu.patch +++ b/debian/patches-rt/0013-locking-rtmutex-export-lockdep-less-version-of-rt_mu.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 16:36:39 +0200 Subject: [PATCH 13/22] locking/rtmutex: export lockdep-less version of rt_mutex's lock, trylock and unlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Required for lock implementation ontop of rtmutex. diff --git a/debian/patches-rt/0013-mips-mm-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0013-mips-mm-highmem-Switch-to-generic-kmap-atomic.patch index 18944841c..51bb278bc 100644 --- a/debian/patches-rt/0013-mips-mm-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0013-mips-mm-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:25 +0100 Subject: [PATCH 13/37] mips/mm/highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No reason having the same code in every architecture diff --git a/debian/patches-rt/0013-printk-kmsg_dump-remove-_nolock-variants.patch b/debian/patches-rt/0013-printk-kmsg_dump-remove-_nolock-variants.patch index 95efbd228..11528a1fc 100644 --- a/debian/patches-rt/0013-printk-kmsg_dump-remove-_nolock-variants.patch +++ b/debian/patches-rt/0013-printk-kmsg_dump-remove-_nolock-variants.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 21 Dec 2020 10:27:58 +0106 Subject: [PATCH 13/28] printk: kmsg_dump: remove _nolock() variants -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz kmsg_dump_rewind() and kmsg_dump_get_line() are lockless, so there is no need for _nolock() variants. Remove these functions and switch all @@ -105,7 +105,7 @@ Signed-off-by: John Ogness <john.ogness@linutronix.de> continue; --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -3382,7 +3382,7 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3378,7 +3378,7 @@ void kmsg_dump(enum kmsg_dump_reason rea } /** @@ -114,7 +114,7 @@ Signed-off-by: John Ogness <john.ogness@linutronix.de> * @iter: kmsg dumper iterator * @syslog: include the "<4>" prefixes * @line: buffer to copy the line to -@@ -3397,18 +3397,18 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3393,18 +3393,18 @@ void kmsg_dump(enum kmsg_dump_reason rea * * A return value of FALSE indicates that there are no more records to * read. @@ -137,7 +137,7 @@ Signed-off-by: John Ogness <john.ogness@linutronix.de> prb_rec_init_rd(&r, &info, line, size); if (!iter->active) -@@ -3432,40 +3432,11 @@ bool kmsg_dump_get_line_nolock(struct km +@@ -3428,40 +3428,11 @@ bool kmsg_dump_get_line_nolock(struct km iter->cur_seq = r.info->seq + 1; ret = true; out: @@ -179,7 +179,7 @@ Signed-off-by: John Ogness <john.ogness@linutronix.de> EXPORT_SYMBOL_GPL(kmsg_dump_get_line); /** -@@ -3555,22 +3526,6 @@ bool kmsg_dump_get_buffer(struct kmsg_du +@@ -3551,22 +3522,6 @@ bool kmsg_dump_get_buffer(struct kmsg_du EXPORT_SYMBOL_GPL(kmsg_dump_get_buffer); /** @@ -202,7 +202,7 @@ Signed-off-by: John Ogness <john.ogness@linutronix.de> * kmsg_dump_rewind - reset the iterator * @iter: kmsg dumper iterator * -@@ -3583,7 +3538,8 @@ void kmsg_dump_rewind(struct kmsg_dumper +@@ -3579,7 +3534,8 @@ void kmsg_dump_rewind(struct kmsg_dumper unsigned long flags; printk_safe_enter_irqsave(flags); diff --git a/debian/patches-rt/0013-sched-rt-Use-the-full-cpumask-for-balancing.patch b/debian/patches-rt/0013-sched-rt-Use-the-full-cpumask-for-balancing.patch index 469994d91..8dff2d977 100644 --- a/debian/patches-rt/0013-sched-rt-Use-the-full-cpumask-for-balancing.patch +++ b/debian/patches-rt/0013-sched-rt-Use-the-full-cpumask-for-balancing.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:11 +0200 Subject: [PATCH 13/19] sched,rt: Use the full cpumask for balancing -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz We want migrate_disable() tasks to get PULLs in order for them to PUSH away the higher priority task. diff --git a/debian/patches-rt/0014-nds32-mm-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0014-nds32-mm-highmem-Switch-to-generic-kmap-atomic.patch index 80cde28f6..fb95710c1 100644 --- a/debian/patches-rt/0014-nds32-mm-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0014-nds32-mm-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:26 +0100 Subject: [PATCH 14/37] nds32/mm/highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The mapping code is odd and looks broken. See FIXME in the comment. diff --git a/debian/patches-rt/0014-printk-kmsg_dump-use-kmsg_dump_rewind.patch b/debian/patches-rt/0014-printk-kmsg_dump-use-kmsg_dump_rewind.patch index 0626a6429..2f95ec8b4 100644 --- a/debian/patches-rt/0014-printk-kmsg_dump-use-kmsg_dump_rewind.patch +++ b/debian/patches-rt/0014-printk-kmsg_dump-use-kmsg_dump_rewind.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Wed, 17 Feb 2021 18:23:16 +0100 Subject: [PATCH 14/28] printk: kmsg_dump: use kmsg_dump_rewind -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz kmsg_dump() is open coding the kmsg_dump_rewind(). Call kmsg_dump_rewind() instead. @@ -14,7 +14,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -3351,7 +3351,6 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3347,7 +3347,6 @@ void kmsg_dump(enum kmsg_dump_reason rea { struct kmsg_dumper_iter iter; struct kmsg_dumper *dumper; @@ -22,7 +22,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> rcu_read_lock(); list_for_each_entry_rcu(dumper, &dump_list, list) { -@@ -3370,10 +3369,7 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3366,10 +3365,7 @@ void kmsg_dump(enum kmsg_dump_reason rea /* initialize iterator with data about the stored records */ iter.active = true; diff --git a/debian/patches-rt/0014-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch b/debian/patches-rt/0014-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch index 0ac23d07c..ec720a4ae 100644 --- a/debian/patches-rt/0014-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch +++ b/debian/patches-rt/0014-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Sat, 25 Jun 2011 09:21:04 +0200 Subject: [PATCH 14/22] sched: Add saved_state for tasks blocked on sleeping locks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Spinlocks are state preserving in !RT. RT changes the state when a task gets blocked on a lock. So we need to remember the state before @@ -38,7 +38,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_SMP --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3284,7 +3284,7 @@ try_to_wake_up(struct task_struct *p, un +@@ -3282,7 +3282,7 @@ try_to_wake_up(struct task_struct *p, un int cpu, success = 0; preempt_disable(); @@ -47,7 +47,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * We're waking current, this means 'p->on_rq' and 'task_cpu(p) * == smp_processor_id()'. Together this means we can special -@@ -3314,8 +3314,26 @@ try_to_wake_up(struct task_struct *p, un +@@ -3312,8 +3312,26 @@ try_to_wake_up(struct task_struct *p, un */ raw_spin_lock_irqsave(&p->pi_lock, flags); smp_mb__after_spinlock(); @@ -75,7 +75,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> trace_sched_waking(p); -@@ -3505,6 +3523,18 @@ int wake_up_process(struct task_struct * +@@ -3502,6 +3520,18 @@ int wake_up_process(struct task_struct * } EXPORT_SYMBOL(wake_up_process); @@ -96,7 +96,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return try_to_wake_up(p, state, 0); --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1743,6 +1743,7 @@ static inline int task_on_rq_migrating(s +@@ -1744,6 +1744,7 @@ static inline int task_on_rq_migrating(s #define WF_FORK 0x02 /* Child wakeup after fork */ #define WF_MIGRATED 0x04 /* Internal use, task got migrated */ #define WF_ON_CPU 0x08 /* Wakee is on_cpu */ diff --git a/debian/patches-rt/0014-sched-lockdep-Annotate-pi_lock-recursion.patch b/debian/patches-rt/0014-sched-lockdep-Annotate-pi_lock-recursion.patch index efe4e5e75..9fb9e13e5 100644 --- a/debian/patches-rt/0014-sched-lockdep-Annotate-pi_lock-recursion.patch +++ b/debian/patches-rt/0014-sched-lockdep-Annotate-pi_lock-recursion.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:12 +0200 Subject: [PATCH 14/19] sched, lockdep: Annotate ->pi_lock recursion -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz There's a valid ->pi_lock recursion issue where the actual PI code tries to wake up the stop task. Make lockdep aware so it doesn't @@ -15,7 +15,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2656,6 +2656,7 @@ int select_task_rq(struct task_struct *p +@@ -2654,6 +2654,7 @@ int select_task_rq(struct task_struct *p void sched_set_stop_task(int cpu, struct task_struct *stop) { @@ -23,7 +23,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 }; struct task_struct *old_stop = cpu_rq(cpu)->stop; -@@ -2671,6 +2672,20 @@ void sched_set_stop_task(int cpu, struct +@@ -2669,6 +2670,20 @@ void sched_set_stop_task(int cpu, struct sched_setscheduler_nocheck(stop, SCHED_FIFO, ¶m); stop->sched_class = &stop_sched_class; diff --git a/debian/patches-rt/0014-tasklets-Switch-tasklet_disable-to-the-sleep-wait-va.patch b/debian/patches-rt/0014-tasklets-Switch-tasklet_disable-to-the-sleep-wait-va.patch new file mode 100644 index 000000000..77c764407 --- /dev/null +++ b/debian/patches-rt/0014-tasklets-Switch-tasklet_disable-to-the-sleep-wait-va.patch @@ -0,0 +1,29 @@ +From: Thomas Gleixner <tglx@linutronix.de> +Date: Tue, 9 Mar 2021 09:42:17 +0100 +Subject: [PATCH 14/20] tasklets: Switch tasklet_disable() to the sleep wait + variant +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz + + -- NOT FOR IMMEDIATE MERGING -- + +Now that all users of tasklet_disable() are invoked from sleepable context, +convert it to use tasklet_unlock_wait() which might sleep. + +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + include/linux/interrupt.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/include/linux/interrupt.h ++++ b/include/linux/interrupt.h +@@ -707,8 +707,7 @@ static inline void tasklet_disable_in_at + static inline void tasklet_disable(struct tasklet_struct *t) + { + tasklet_disable_nosync(t); +- /* Spin wait until all atomic users are converted */ +- tasklet_unlock_spin_wait(t); ++ tasklet_unlock_wait(t); + smp_mb(); + } + diff --git a/debian/patches-rt/0015-locking-rtmutex-add-sleeping-lock-implementation.patch b/debian/patches-rt/0015-locking-rtmutex-add-sleeping-lock-implementation.patch index aa516d8df..d8d2cdf39 100644 --- a/debian/patches-rt/0015-locking-rtmutex-add-sleeping-lock-implementation.patch +++ b/debian/patches-rt/0015-locking-rtmutex-add-sleeping-lock-implementation.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:11:19 +0200 Subject: [PATCH 15/22] locking/rtmutex: add sleeping lock implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> @@ -1116,7 +1116,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> # include "rtmutex-debug.h" --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -512,9 +512,15 @@ static bool set_nr_if_polling(struct tas +@@ -510,9 +510,15 @@ static bool set_nr_if_polling(struct tas #endif #endif @@ -1134,7 +1134,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Atomically grab the task, if ->wake_q is !nil already it means -@@ -550,7 +556,13 @@ static bool __wake_q_add(struct wake_q_h +@@ -548,7 +554,13 @@ static bool __wake_q_add(struct wake_q_h */ void wake_q_add(struct wake_q_head *head, struct task_struct *task) { @@ -1149,7 +1149,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> get_task_struct(task); } -@@ -573,28 +585,39 @@ void wake_q_add(struct wake_q_head *head +@@ -571,28 +583,39 @@ void wake_q_add(struct wake_q_head *head */ void wake_q_add_safe(struct wake_q_head *head, struct task_struct *task) { diff --git a/debian/patches-rt/0015-powerpc-mm-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0015-powerpc-mm-highmem-Switch-to-generic-kmap-atomic.patch index c06eaf2f1..18d935b50 100644 --- a/debian/patches-rt/0015-powerpc-mm-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0015-powerpc-mm-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:27 +0100 Subject: [PATCH 15/37] powerpc/mm/highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No reason having the same code in every architecture diff --git a/debian/patches-rt/0015-printk-console-remove-unnecessary-safe-buffer-usage.patch b/debian/patches-rt/0015-printk-console-remove-unnecessary-safe-buffer-usage.patch index 78c1b6093..a74d56fa8 100644 --- a/debian/patches-rt/0015-printk-console-remove-unnecessary-safe-buffer-usage.patch +++ b/debian/patches-rt/0015-printk-console-remove-unnecessary-safe-buffer-usage.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Wed, 17 Feb 2021 18:28:05 +0100 Subject: [PATCH 15/28] printk: console: remove unnecessary safe buffer usage -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Upon registering a console, safe buffers are activated when setting up the sequence number to replay the log. However, these are already @@ -15,7 +15,7 @@ Signed-off-by: John Ogness <john.ogness@linutronix.de> --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -2967,9 +2967,7 @@ void register_console(struct console *ne +@@ -2961,9 +2961,7 @@ void register_console(struct console *ne /* * console_unlock(); will print out the buffered messages * for us. @@ -26,7 +26,7 @@ Signed-off-by: John Ogness <john.ogness@linutronix.de> * We're about to replay the log buffer. Only do this to the * just-registered console to avoid excessive message spam to * the already-registered consoles. -@@ -2982,11 +2980,9 @@ void register_console(struct console *ne +@@ -2976,11 +2974,9 @@ void register_console(struct console *ne exclusive_console_stop_seq = console_seq; /* Get a consistent copy of @syslog_seq. */ diff --git a/debian/patches-rt/0015-sched-Fix-migrate_disable-vs-rt-dl-balancing.patch b/debian/patches-rt/0015-sched-Fix-migrate_disable-vs-rt-dl-balancing.patch index 795a1ab49..2c8b5ef0e 100644 --- a/debian/patches-rt/0015-sched-Fix-migrate_disable-vs-rt-dl-balancing.patch +++ b/debian/patches-rt/0015-sched-Fix-migrate_disable-vs-rt-dl-balancing.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:13 +0200 Subject: [PATCH 15/19] sched: Fix migrate_disable() vs rt/dl balancing -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In order to minimize the interference of migrate_disable() on lower priority tasks, which can be deprived of runtime due to being stuck @@ -96,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int rcu_read_lock_nesting; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1763,11 +1763,6 @@ void migrate_enable(void) +@@ -1761,11 +1761,6 @@ void migrate_enable(void) } EXPORT_SYMBOL_GPL(migrate_enable); @@ -108,7 +108,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static inline bool rq_has_pinned_tasks(struct rq *rq) { return rq->nr_pinned; -@@ -1972,6 +1967,49 @@ static int migration_cpu_stop(void *data +@@ -1970,6 +1965,49 @@ static int migration_cpu_stop(void *data return 0; } @@ -158,7 +158,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * sched_class::set_cpus_allowed must do the below, but is not required to * actually call this function. -@@ -2052,6 +2090,14 @@ static int affine_move_task(struct rq *r +@@ -2050,6 +2088,14 @@ static int affine_move_task(struct rq *r /* Can the task run on the task's current CPU? If so, we're done */ if (cpumask_test_cpu(task_cpu(p), &p->cpus_mask)) { @@ -173,7 +173,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> pending = p->migration_pending; if (pending) { refcount_inc(&pending->refs); -@@ -2060,6 +2106,11 @@ static int affine_move_task(struct rq *r +@@ -2058,6 +2104,11 @@ static int affine_move_task(struct rq *r } task_rq_unlock(rq, p, rf); @@ -185,7 +185,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (complete) goto do_complete; -@@ -2096,6 +2147,7 @@ static int affine_move_task(struct rq *r +@@ -2094,6 +2145,7 @@ static int affine_move_task(struct rq *r if (flags & SCA_MIGRATE_ENABLE) { refcount_inc(&pending->refs); /* pending->{arg,stop_work} */ @@ -193,7 +193,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> task_rq_unlock(rq, p, rf); pending->arg = (struct migration_arg) { -@@ -2714,11 +2766,6 @@ static inline int __set_cpus_allowed_ptr +@@ -2712,11 +2764,6 @@ static inline int __set_cpus_allowed_ptr static inline void migrate_disable_switch(struct rq *rq, struct task_struct *p) { } @@ -416,7 +416,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> .task_tick = task_tick_rt, --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1051,6 +1051,8 @@ struct rq { +@@ -1052,6 +1052,8 @@ struct rq { #if defined(CONFIG_PREEMPT_RT) && defined(CONFIG_SMP) unsigned int nr_pinned; #endif @@ -425,7 +425,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> }; #ifdef CONFIG_FAIR_GROUP_SCHED -@@ -1078,6 +1080,16 @@ static inline int cpu_of(struct rq *rq) +@@ -1079,6 +1081,16 @@ static inline int cpu_of(struct rq *rq) #endif } @@ -442,7 +442,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_SCHED_SMT extern void __update_idle_core(struct rq *rq); -@@ -1817,6 +1829,8 @@ struct sched_class { +@@ -1818,6 +1830,8 @@ struct sched_class { void (*rq_online)(struct rq *rq); void (*rq_offline)(struct rq *rq); @@ -451,7 +451,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif void (*task_tick)(struct rq *rq, struct task_struct *p, int queued); -@@ -1912,6 +1926,24 @@ extern void trigger_load_balance(struct +@@ -1913,6 +1927,24 @@ extern void trigger_load_balance(struct extern void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask, u32 flags); diff --git a/debian/patches-rt/0007-softirq-Add-RT-specific-softirq-accounting.patch b/debian/patches-rt/0015-softirq-Add-RT-specific-softirq-accounting.patch index 9c4131c93..ef3f1907c 100644 --- a/debian/patches-rt/0007-softirq-Add-RT-specific-softirq-accounting.patch +++ b/debian/patches-rt/0015-softirq-Add-RT-specific-softirq-accounting.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:52 +0100 -Subject: [PATCH 07/19] softirq: Add RT specific softirq accounting -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:55:53 +0100 +Subject: [PATCH 15/20] softirq: Add RT specific softirq accounting +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz RT requires the softirq processing and local bottomhalf disabled regions to be preemptible. Using the normal preempt count based serialization is @@ -19,6 +19,7 @@ preempt.h. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/hardirq.h | 1 + include/linux/preempt.h | 6 +++++- diff --git a/debian/patches-rt/0016-ath9k-Use-tasklet_disable_in_atomic.patch b/debian/patches-rt/0016-ath9k-Use-tasklet_disable_in_atomic.patch deleted file mode 100644 index 8873e9773..000000000 --- a/debian/patches-rt/0016-ath9k-Use-tasklet_disable_in_atomic.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu, 28 Jan 2021 16:33:45 +0100 -Subject: [PATCH 16/19] ath9k: Use tasklet_disable_in_atomic(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz - -All caller of ath9k_beacon_ensure_primary_slot() are preemptible / -acquire a mutex except for the callchain: - - spin_lock_bh(&sc->sc_pcu_lock); - ath_complete_reset() - -> ath9k_calculate_summary_state() - -> ath9k_beacon_ensure_primary_slot() - -which is always invoked in atomic context due to the spin lock. -I have no idea how to get around it so convert it to -tasklet_disable_in_atomic(). - -Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - drivers/net/wireless/ath/ath9k/beacon.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/net/wireless/ath/ath9k/beacon.c -+++ b/drivers/net/wireless/ath/ath9k/beacon.c -@@ -251,7 +251,7 @@ void ath9k_beacon_ensure_primary_slot(st - int first_slot = ATH_BCBUF; - int slot; - -- tasklet_disable(&sc->bcon_tasklet); -+ tasklet_disable_in_atomic(&sc->bcon_tasklet); - - /* Find first taken slot. */ - for (slot = 0; slot < ATH_BCBUF; slot++) { diff --git a/debian/patches-rt/0008-irqtime-Make-accounting-correct-on-RT.patch b/debian/patches-rt/0016-irqtime-Make-accounting-correct-on-RT.patch index f130e3126..7e1231105 100644 --- a/debian/patches-rt/0008-irqtime-Make-accounting-correct-on-RT.patch +++ b/debian/patches-rt/0016-irqtime-Make-accounting-correct-on-RT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:53 +0100 -Subject: [PATCH 08/19] irqtime: Make accounting correct on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:55:54 +0100 +Subject: [PATCH 16/20] irqtime: Make accounting correct on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz vtime_account_irq and irqtime_account_irq() base checks on preempt_count() which fails on RT because preempt_count() does not contain the softirq @@ -21,6 +21,7 @@ Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- kernel/sched/cputime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/patches-rt/0016-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch b/debian/patches-rt/0016-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch index 2b0d542b5..d109bbe8b 100644 --- a/debian/patches-rt/0016-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch +++ b/debian/patches-rt/0016-locking-rtmutex-Allow-rt_mutex_trylock-on-PREEMPT_RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 2 Dec 2015 11:34:07 +0100 Subject: [PATCH 16/22] locking/rtmutex: Allow rt_mutex_trylock() on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Non PREEMPT_RT kernel can deadlock on rt_mutex_trylock() in softirq context. diff --git a/debian/patches-rt/0016-printk-track-limit-recursion.patch b/debian/patches-rt/0016-printk-track-limit-recursion.patch index 710b716f8..6e840a2f7 100644 --- a/debian/patches-rt/0016-printk-track-limit-recursion.patch +++ b/debian/patches-rt/0016-printk-track-limit-recursion.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Fri, 11 Dec 2020 00:55:25 +0106 Subject: [PATCH 16/28] printk: track/limit recursion -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Limit printk() recursion to 1 level. This is enough to print a stacktrace for the printk call, should a WARN or BUG occur. @@ -14,7 +14,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1940,6 +1940,65 @@ static void call_console_drivers(const c +@@ -1941,6 +1941,65 @@ static void call_console_drivers(const c } } @@ -80,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int printk_delay_msec __read_mostly; static inline void printk_delay(void) -@@ -2040,11 +2099,13 @@ int vprintk_store(int facility, int leve +@@ -2041,11 +2100,13 @@ int vprintk_store(int facility, int leve struct prb_reserved_entry e; enum log_flags lflags = 0; struct printk_record r; @@ -94,7 +94,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> u64 ts_nsec; /* -@@ -2055,6 +2116,9 @@ int vprintk_store(int facility, int leve +@@ -2056,6 +2117,9 @@ int vprintk_store(int facility, int leve */ ts_nsec = local_clock(); @@ -104,7 +104,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * The sprintf needs to come first since the syslog prefix might be * passed in as a parameter. An extra byte must be reserved so that -@@ -2092,7 +2156,8 @@ int vprintk_store(int facility, int leve +@@ -2093,7 +2157,8 @@ int vprintk_store(int facility, int leve prb_commit(&e); } @@ -114,7 +114,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } } -@@ -2108,7 +2173,7 @@ int vprintk_store(int facility, int leve +@@ -2109,7 +2174,7 @@ int vprintk_store(int facility, int leve prb_rec_init_wr(&r, reserve_size + trunc_msg_len); if (!prb_reserve(&e, prb, &r)) @@ -123,7 +123,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* fill message */ -@@ -2130,7 +2195,10 @@ int vprintk_store(int facility, int leve +@@ -2131,7 +2196,10 @@ int vprintk_store(int facility, int leve else prb_final_commit(&e); diff --git a/debian/patches-rt/0016-sched-proc-Print-accurate-cpumask-vs-migrate_disable.patch b/debian/patches-rt/0016-sched-proc-Print-accurate-cpumask-vs-migrate_disable.patch index bc9662127..af4f1c825 100644 --- a/debian/patches-rt/0016-sched-proc-Print-accurate-cpumask-vs-migrate_disable.patch +++ b/debian/patches-rt/0016-sched-proc-Print-accurate-cpumask-vs-migrate_disable.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:14 +0200 Subject: [PATCH 16/19] sched/proc: Print accurate cpumask vs migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Ensure /proc/*/status doesn't print 'random' cpumasks due to migrate_disable(). diff --git a/debian/patches-rt/0016-sparc-mm-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0016-sparc-mm-highmem-Switch-to-generic-kmap-atomic.patch index 881eb4926..a9c3af192 100644 --- a/debian/patches-rt/0016-sparc-mm-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0016-sparc-mm-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:28 +0100 Subject: [PATCH 16/37] sparc/mm/highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No reason having the same code in every architecture diff --git a/debian/patches-rt/0017-PCI-hv-Use-tasklet_disable_in_atomic.patch b/debian/patches-rt/0017-PCI-hv-Use-tasklet_disable_in_atomic.patch deleted file mode 100644 index bf3d879e5..000000000 --- a/debian/patches-rt/0017-PCI-hv-Use-tasklet_disable_in_atomic.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu, 28 Jan 2021 16:59:34 +0100 -Subject: [PATCH 17/19] PCI: hv: Use tasklet_disable_in_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz - -The hv_compose_msi_msg() callback in irq_chip::irq_compose_msi_msg is -invoked via irq_chip_compose_msi_msg(). - -Possible call paths: -- mp_irqdomain_activate() - raw_spin_lock_irqsave(&ioapic_lock,); - ioapic_configure_entry() - -> ioapic_setup_msg_from_msi() - -> irq_chip_compose_msi_msg() - -- tick_resume_broadcast() - raw_spin_lock_irqsave(&tick_broadcast_lock,); - clockevents_tick_resume() - -> dev->tick_resume() - -> hpet_clkevt_msi_resume() - -> irq_chip_compose_msi_msg() - -Use tasklet_disable_in_atomic() in atomic context. - -Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - drivers/pci/controller/pci-hyperv.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/pci/controller/pci-hyperv.c -+++ b/drivers/pci/controller/pci-hyperv.c -@@ -1458,7 +1458,7 @@ static void hv_compose_msi_msg(struct ir - * Prevents hv_pci_onchannelcallback() from running concurrently - * in the tasklet. - */ -- tasklet_disable(&channel->callback_event); -+ tasklet_disable_in_atomic(&channel->callback_event); - - /* - * Since this function is called with IRQ locks held, can't diff --git a/debian/patches-rt/0017-locking-rtmutex-add-mutex-implementation-based-on-rt.patch b/debian/patches-rt/0017-locking-rtmutex-add-mutex-implementation-based-on-rt.patch index defdea4b7..78b3086cb 100644 --- a/debian/patches-rt/0017-locking-rtmutex-add-mutex-implementation-based-on-rt.patch +++ b/debian/patches-rt/0017-locking-rtmutex-add-mutex-implementation-based-on-rt.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:17:03 +0200 Subject: [PATCH 17/22] locking/rtmutex: add mutex implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> diff --git a/debian/patches-rt/0017-printk-remove-safe-buffers.patch b/debian/patches-rt/0017-printk-remove-safe-buffers.patch index eb15335c3..ad18fcd20 100644 --- a/debian/patches-rt/0017-printk-remove-safe-buffers.patch +++ b/debian/patches-rt/0017-printk-remove-safe-buffers.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:00 +0106 Subject: [PATCH 17/28] printk: remove safe buffers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz With @logbuf_lock removed, the high level printk functions for storing messages are lockless. Messages can be stored from any @@ -21,13 +21,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> kernel/panic.c | 3 kernel/printk/internal.h | 2 kernel/printk/printk.c | 85 +--------- - kernel/printk/printk_safe.c | 321 ----------------------------------------- + kernel/printk/printk_safe.c | 329 ----------------------------------------- lib/nmi_backtrace.c | 6 - 9 files changed, 17 insertions(+), 417 deletions(-) + 9 files changed, 17 insertions(+), 425 deletions(-) --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c -@@ -170,7 +170,6 @@ +@@ -170,7 +170,6 @@ extern void panic_flush_kmsg_start(void) extern void panic_flush_kmsg_end(void) { @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> debug_locks_off(); --- a/arch/powerpc/kernel/watchdog.c +++ b/arch/powerpc/kernel/watchdog.c -@@ -181,11 +181,6 @@ +@@ -181,11 +181,6 @@ static void watchdog_smp_panic(int cpu, wd_smp_unlock(&flags); @@ -51,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -207,8 +207,6 @@ +@@ -207,8 +207,6 @@ void __init setup_log_buf(int early); void dump_stack_print_info(const char *log_lvl); void show_regs_print_info(const char *log_lvl); extern asmlinkage void dump_stack(void) __cold; @@ -60,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #else static inline __printf(1, 0) int vprintk(const char *s, va_list args) -@@ -272,14 +270,6 @@ +@@ -272,14 +270,6 @@ static inline void show_regs_print_info( static inline void dump_stack(void) { } @@ -77,7 +77,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> extern int kptr_restrict; --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c -@@ -978,7 +978,6 @@ +@@ -978,7 +978,6 @@ void crash_kexec(struct pt_regs *regs) old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, this_cpu); if (old_cpu == PANIC_CPU_INVALID) { /* This is the 1st CPU which comes here, so go ahead. */ @@ -87,7 +87,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* --- a/kernel/panic.c +++ b/kernel/panic.c -@@ -247,7 +247,6 @@ +@@ -247,7 +247,6 @@ void panic(const char *fmt, ...) * Bypass the panic_cpu check and call __crash_kexec directly. */ if (!_crash_kexec_post_notifiers) { @@ -95,7 +95,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> __crash_kexec(NULL); /* -@@ -271,8 +270,6 @@ +@@ -271,8 +270,6 @@ void panic(const char *fmt, ...) */ atomic_notifier_call_chain(&panic_notifier_list, 0, buf); @@ -106,7 +106,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h -@@ -23,7 +23,6 @@ +@@ -23,7 +23,6 @@ int vprintk_store(int facility, int leve void __printk_safe_enter(void); void __printk_safe_exit(void); @@ -114,7 +114,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> bool printk_percpu_data_ready(void); #define printk_safe_enter_irqsave(flags) \ -@@ -67,6 +66,5 @@ +@@ -67,6 +66,5 @@ void defer_console_output(void); #define printk_safe_enter_irq() local_irq_disable() #define printk_safe_exit_irq() local_irq_enable() @@ -123,7 +123,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* CONFIG_PRINTK */ --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -733,27 +733,22 @@ +@@ -733,27 +733,22 @@ static ssize_t devkmsg_read(struct file if (ret) return ret; @@ -151,7 +151,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> goto out; } -@@ -763,7 +758,6 @@ +@@ -763,7 +758,6 @@ static ssize_t devkmsg_read(struct file &r->info->dev_info); atomic64_set(&user->seq, r->info->seq + 1); @@ -159,7 +159,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (len > count) { ret = -EINVAL; -@@ -798,7 +792,6 @@ +@@ -798,7 +792,6 @@ static loff_t devkmsg_llseek(struct file if (offset) return -ESPIPE; @@ -167,7 +167,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> switch (whence) { case SEEK_SET: /* the first record */ -@@ -819,7 +812,6 @@ +@@ -819,7 +812,6 @@ static loff_t devkmsg_llseek(struct file default: ret = -EINVAL; } @@ -175,7 +175,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ret; } -@@ -834,7 +826,6 @@ +@@ -834,7 +826,6 @@ static __poll_t devkmsg_poll(struct file poll_wait(file, &log_wait, wait); @@ -183,7 +183,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (prb_read_valid_info(prb, atomic64_read(&user->seq), &info, NULL)) { /* return error when data has vanished underneath us */ if (info.seq != atomic64_read(&user->seq)) -@@ -842,7 +833,6 @@ +@@ -842,7 +833,6 @@ static __poll_t devkmsg_poll(struct file else ret = EPOLLIN|EPOLLRDNORM; } @@ -191,7 +191,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ret; } -@@ -875,9 +865,7 @@ +@@ -875,9 +865,7 @@ static int devkmsg_open(struct inode *in prb_rec_init_rd(&user->record, &user->info, &user->text_buf[0], sizeof(user->text_buf)); @@ -201,7 +201,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> file->private_data = user; return 0; -@@ -1043,9 +1031,6 @@ +@@ -1043,9 +1031,6 @@ static inline void log_buf_add_cpu(void) static void __init set_percpu_data_ready(void) { @@ -211,7 +211,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> __printk_percpu_data_ready = true; } -@@ -1143,8 +1128,6 @@ +@@ -1143,8 +1128,6 @@ void __init setup_log_buf(int early) new_descs, ilog2(new_descs_count), new_infos); @@ -220,7 +220,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> log_buf_len = new_log_buf_len; log_buf = new_log_buf; new_log_buf_len = 0; -@@ -1160,8 +1143,6 @@ +@@ -1160,8 +1143,6 @@ void __init setup_log_buf(int early) */ prb = &printk_rb_dynamic; @@ -229,7 +229,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (seq != prb_next_seq(&printk_rb_static)) { pr_err("dropped %llu messages\n", prb_next_seq(&printk_rb_static) - seq); -@@ -1499,11 +1480,9 @@ +@@ -1499,11 +1480,9 @@ static int syslog_print(char __user *buf size_t n; size_t skip; @@ -243,7 +243,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> break; } if (r.info->seq != syslog_seq) { -@@ -1532,8 +1511,7 @@ +@@ -1532,8 +1511,7 @@ static int syslog_print(char __user *buf syslog_partial += n; } else n = 0; @@ -253,7 +253,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (!n) break; -@@ -1567,7 +1545,6 @@ +@@ -1567,7 +1545,6 @@ static int syslog_print_all(char __user return -ENOMEM; time = printk_time; @@ -261,7 +261,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Find first record that fits, including all following records, * into the user-provided buffer for this dump. -@@ -1588,23 +1565,20 @@ +@@ -1588,23 +1565,20 @@ static int syslog_print_all(char __user break; } @@ -287,7 +287,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> kfree(text); return len; -@@ -1612,11 +1586,9 @@ +@@ -1612,11 +1586,9 @@ static int syslog_print_all(char __user static void syslog_clear(void) { @@ -301,7 +301,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* Return a consistent copy of @syslog_seq. */ -@@ -1704,12 +1676,10 @@ +@@ -1704,12 +1676,10 @@ int do_syslog(int type, char __user *buf break; /* Number of chars in the log buffer */ case SYSLOG_ACTION_SIZE_UNREAD: @@ -316,7 +316,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; } if (info.seq != syslog_seq) { -@@ -1737,8 +1707,7 @@ +@@ -1737,8 +1707,7 @@ int do_syslog(int type, char __user *buf } error -= syslog_partial; } @@ -326,7 +326,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> break; /* Size of the log buffer */ case SYSLOG_ACTION_SIZE_BUFFER: -@@ -2208,7 +2177,6 @@ +@@ -2208,7 +2177,6 @@ asmlinkage int vprintk_emit(int facility { int printed_len; bool in_sched = false; @@ -334,7 +334,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Suppress unimportant messages after panic happens */ if (unlikely(suppress_printk)) -@@ -2222,9 +2190,7 @@ +@@ -2222,9 +2190,7 @@ asmlinkage int vprintk_emit(int facility boot_delay_msec(level); printk_delay(); @@ -344,7 +344,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* If called from the scheduler, we can not call up(). */ if (!in_sched) { -@@ -2609,7 +2575,6 @@ +@@ -2609,7 +2575,6 @@ void console_unlock(void) { static char ext_text[CONSOLE_EXT_LOG_MAX]; static char text[CONSOLE_LOG_MAX]; @@ -352,7 +352,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> bool do_cond_resched, retry; struct printk_info info; struct printk_record r; -@@ -2654,7 +2619,6 @@ +@@ -2654,7 +2619,6 @@ void console_unlock(void) size_t ext_len = 0; size_t len; @@ -360,7 +360,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> skip: if (!prb_read_valid(prb, console_seq, &r)) break; -@@ -2711,12 +2675,8 @@ +@@ -2711,12 +2675,8 @@ void console_unlock(void) call_console_drivers(ext_text, ext_len, text, len); start_critical_timings(); @@ -374,7 +374,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (do_cond_resched) cond_resched(); -@@ -2733,8 +2693,6 @@ +@@ -2733,8 +2693,6 @@ void console_unlock(void) * flush, no worries. */ retry = prb_read_valid(prb, console_seq, NULL); @@ -383,7 +383,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (retry && console_trylock()) goto again; } -@@ -2796,13 +2754,8 @@ +@@ -2796,13 +2754,8 @@ void console_flush_on_panic(enum con_flu console_trylock(); console_may_schedule = 0; @@ -398,7 +398,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> console_unlock(); } -@@ -3460,11 +3413,9 @@ +@@ -3460,11 +3413,9 @@ bool kmsg_dump_get_line(struct kmsg_dump struct printk_info info; unsigned int line_count; struct printk_record r; @@ -410,7 +410,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> prb_rec_init_rd(&r, &info, line, size); if (!iter->active) -@@ -3488,7 +3439,6 @@ +@@ -3488,7 +3439,6 @@ bool kmsg_dump_get_line(struct kmsg_dump iter->cur_seq = r.info->seq + 1; ret = true; out: @@ -418,7 +418,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (len) *len = l; return ret; -@@ -3519,7 +3469,6 @@ +@@ -3519,7 +3469,6 @@ bool kmsg_dump_get_buffer(struct kmsg_du { struct printk_info info; struct printk_record r; @@ -426,7 +426,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> u64 seq; u64 next_seq; size_t len = 0; -@@ -3529,7 +3478,6 @@ +@@ -3529,7 +3478,6 @@ bool kmsg_dump_get_buffer(struct kmsg_du if (!iter->active || !buf || !size) goto out; @@ -434,7 +434,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (prb_read_valid_info(prb, iter->cur_seq, &info, NULL)) { if (info.seq != iter->cur_seq) { /* messages are gone, move to first available one */ -@@ -3538,10 +3486,8 @@ +@@ -3538,10 +3486,8 @@ bool kmsg_dump_get_buffer(struct kmsg_du } /* last entry */ @@ -446,7 +446,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Find first record that fits, including all following records, -@@ -3573,7 +3519,6 @@ +@@ -3573,7 +3519,6 @@ bool kmsg_dump_get_buffer(struct kmsg_du iter->next_seq = next_seq; ret = true; @@ -454,7 +454,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> out: if (len_out) *len_out = len; -@@ -3591,12 +3536,8 @@ +@@ -3591,12 +3536,8 @@ EXPORT_SYMBOL_GPL(kmsg_dump_get_buffer); */ void kmsg_dump_rewind(struct kmsg_dumper_iter *iter) { @@ -469,7 +469,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/printk/printk_safe.c +++ b/kernel/printk/printk_safe.c -@@ -15,282 +15,11 @@ +@@ -15,282 +15,9 @@ #include "internal.h" @@ -503,9 +503,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -static DEFINE_PER_CPU(struct printk_safe_seq_buf, safe_print_seq); static DEFINE_PER_CPU(int, printk_context); - static DEFINE_RAW_SPINLOCK(safe_read_lock); - - #ifdef CONFIG_PRINTK_NMI +-static DEFINE_RAW_SPINLOCK(safe_read_lock); +- +-#ifdef CONFIG_PRINTK_NMI -static DEFINE_PER_CPU(struct printk_safe_seq_buf, nmi_print_seq); -#endif - @@ -705,7 +705,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> - int cpu; - - for_each_possible_cpu(cpu) { --#ifdef CONFIG_PRINTK_NMI + #ifdef CONFIG_PRINTK_NMI - __printk_safe_flush(&per_cpu(nmi_print_seq, cpu).work); -#endif - __printk_safe_flush(&per_cpu(safe_print_seq, cpu).work); @@ -752,7 +752,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> void noinstr printk_nmi_enter(void) { this_cpu_add(printk_context, PRINTK_NMI_CONTEXT_OFFSET); -@@ -305,9 +34,6 @@ +@@ -305,9 +32,6 @@ void noinstr printk_nmi_exit(void) * Marks a code that might produce many messages in NMI context * and the risk of losing them is more critical than eventual * reordering. @@ -762,7 +762,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> */ void printk_nmi_direct_enter(void) { -@@ -320,27 +46,8 @@ +@@ -320,27 +44,8 @@ void printk_nmi_direct_exit(void) this_cpu_and(printk_context, ~PRINTK_NMI_DIRECT_CONTEXT_MASK); } @@ -790,7 +790,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Can be preempted by NMI. */ void __printk_safe_enter(void) { -@@ -365,8 +72,10 @@ +@@ -365,8 +70,10 @@ void __printk_safe_exit(void) * Use the main logbuf even in NMI. But avoid calling console * drivers that might have their own locks. */ @@ -803,7 +803,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int len; printk_safe_enter_irqsave(flags); -@@ -376,34 +85,6 @@ +@@ -376,34 +83,6 @@ void __printk_safe_exit(void) return len; } @@ -840,7 +840,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -} --- a/lib/nmi_backtrace.c +++ b/lib/nmi_backtrace.c -@@ -75,12 +75,6 @@ +@@ -75,12 +75,6 @@ void nmi_trigger_cpumask_backtrace(const touch_softlockup_watchdog(); } diff --git a/debian/patches-rt/0017-sched-Add-migrate_disable-tracepoints.patch b/debian/patches-rt/0017-sched-Add-migrate_disable-tracepoints.patch index 986fc1336..6e247d14d 100644 --- a/debian/patches-rt/0017-sched-Add-migrate_disable-tracepoints.patch +++ b/debian/patches-rt/0017-sched-Add-migrate_disable-tracepoints.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Fri, 23 Oct 2020 12:12:15 +0200 Subject: [PATCH 17/19] sched: Add migrate_disable() tracepoints -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz XXX write a tracer: @@ -44,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* This part must be outside protection */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1728,6 +1728,8 @@ void migrate_disable(void) +@@ -1726,6 +1726,8 @@ void migrate_disable(void) return; } @@ -53,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> preempt_disable(); this_rq()->nr_pinned++; p->migration_disabled = 1; -@@ -1760,6 +1762,8 @@ void migrate_enable(void) +@@ -1758,6 +1760,8 @@ void migrate_enable(void) p->migration_disabled = 0; this_rq()->nr_pinned--; preempt_enable(); diff --git a/debian/patches-rt/0009-softirq-Move-various-protections-into-inline-helpers.patch b/debian/patches-rt/0017-softirq-Move-various-protections-into-inline-helpers.patch index b5b91864b..91a666e29 100644 --- a/debian/patches-rt/0009-softirq-Move-various-protections-into-inline-helpers.patch +++ b/debian/patches-rt/0017-softirq-Move-various-protections-into-inline-helpers.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:54 +0100 -Subject: [PATCH 09/19] softirq: Move various protections into inline helpers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:55:55 +0100 +Subject: [PATCH 17/20] softirq: Move various protections into inline helpers +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz To allow reuse of the bulk of softirq processing code for RT and to avoid #ifdeffery all over the place, split protections for various code sections @@ -10,6 +10,7 @@ out into inline helpers so the RT variant can just replace them in one go. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- kernel/softirq.c | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/debian/patches-rt/0017-xtensa-mm-highmem-Switch-to-generic-kmap-atomic.patch b/debian/patches-rt/0017-xtensa-mm-highmem-Switch-to-generic-kmap-atomic.patch index d1231551a..acb3ae854 100644 --- a/debian/patches-rt/0017-xtensa-mm-highmem-Switch-to-generic-kmap-atomic.patch +++ b/debian/patches-rt/0017-xtensa-mm-highmem-Switch-to-generic-kmap-atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:29 +0100 Subject: [PATCH 17/37] xtensa/mm/highmem: Switch to generic kmap atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No reason having the same code in every architecture diff --git a/debian/patches-rt/0018-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch b/debian/patches-rt/0018-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch deleted file mode 100644 index 25f8d058e..000000000 --- a/debian/patches-rt/0018-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Thu, 28 Jan 2021 18:13:28 +0100 -Subject: [PATCH 18/19] atm: eni: Use tasklet_disable_in_atomic() in the - ->send() callback -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz - -The atmdev_ops::send callback may be invoked with disabled BH from -net_device_ops::ndo_start_xmit(). - -Use tasklet_disable_in_atomic() here so it can continue spin in atomic -context. The other user of tasklet_disable() are preemptible so they can -remain. - -Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - drivers/atm/eni.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/atm/eni.c -+++ b/drivers/atm/eni.c -@@ -2054,7 +2054,7 @@ static int eni_send(struct atm_vcc *vcc, - } - submitted++; - ATM_SKB(skb)->vcc = vcc; -- tasklet_disable(&ENI_DEV(vcc->dev)->task); -+ tasklet_disable_in_atomic(&ENI_DEV(vcc->dev)->task); - res = do_tx(skb); - tasklet_enable(&ENI_DEV(vcc->dev)->task); - if (res == enq_ok) return 0; diff --git a/debian/patches-rt/0018-highmem-Get-rid-of-kmap_types.h.patch b/debian/patches-rt/0018-highmem-Get-rid-of-kmap_types.h.patch index 6fe39c704..5cc160a23 100644 --- a/debian/patches-rt/0018-highmem-Get-rid-of-kmap_types.h.patch +++ b/debian/patches-rt/0018-highmem-Get-rid-of-kmap_types.h.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:30 +0100 Subject: [PATCH 18/37] highmem: Get rid of kmap_types.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The header is not longer used and on alpha, ia64, openrisc, parisc and um it was completely unused anyway as these architectures have no highmem diff --git a/debian/patches-rt/0018-locking-rtmutex-add-rwsem-implementation-based-on-rt.patch b/debian/patches-rt/0018-locking-rtmutex-add-rwsem-implementation-based-on-rt.patch index f3ca79007..cec06c3c4 100644 --- a/debian/patches-rt/0018-locking-rtmutex-add-rwsem-implementation-based-on-rt.patch +++ b/debian/patches-rt/0018-locking-rtmutex-add-rwsem-implementation-based-on-rt.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:28:34 +0200 Subject: [PATCH 18/22] locking/rtmutex: add rwsem implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The RT specific R/W semaphore implementation restricts the number of readers to one because a writer cannot block on multiple readers and inherit its diff --git a/debian/patches-rt/0018-printk-convert-syslog_lock-to-spin_lock.patch b/debian/patches-rt/0018-printk-convert-syslog_lock-to-spin_lock.patch index 35d0607da..dff6e5555 100644 --- a/debian/patches-rt/0018-printk-convert-syslog_lock-to-spin_lock.patch +++ b/debian/patches-rt/0018-printk-convert-syslog_lock-to-spin_lock.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Thu, 18 Feb 2021 17:37:41 +0100 Subject: [PATCH 18/28] printk: convert @syslog_lock to spin_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> @@ -20,7 +20,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_PRINTK DECLARE_WAIT_QUEUE_HEAD(log_wait); -@@ -1479,9 +1479,9 @@ static int syslog_print(char __user *buf +@@ -1480,9 +1480,9 @@ static int syslog_print(char __user *buf size_t n; size_t skip; @@ -32,7 +32,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> break; } if (r.info->seq != syslog_seq) { -@@ -1510,7 +1510,7 @@ static int syslog_print(char __user *buf +@@ -1511,7 +1511,7 @@ static int syslog_print(char __user *buf syslog_partial += n; } else n = 0; @@ -41,7 +41,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (!n) break; -@@ -1574,9 +1574,9 @@ static int syslog_print_all(char __user +@@ -1575,9 +1575,9 @@ static int syslog_print_all(char __user } if (clear) { @@ -53,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } kfree(text); -@@ -1585,9 +1585,9 @@ static int syslog_print_all(char __user +@@ -1586,9 +1586,9 @@ static int syslog_print_all(char __user static void syslog_clear(void) { @@ -65,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* Return a consistent copy of @syslog_seq. */ -@@ -1595,9 +1595,9 @@ static u64 read_syslog_seq_irq(void) +@@ -1596,9 +1596,9 @@ static u64 read_syslog_seq_irq(void) { u64 seq; @@ -77,7 +77,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return seq; } -@@ -1675,10 +1675,10 @@ int do_syslog(int type, char __user *buf +@@ -1676,10 +1676,10 @@ int do_syslog(int type, char __user *buf break; /* Number of chars in the log buffer */ case SYSLOG_ACTION_SIZE_UNREAD: @@ -90,7 +90,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; } if (info.seq != syslog_seq) { -@@ -1706,7 +1706,7 @@ int do_syslog(int type, char __user *buf +@@ -1707,7 +1707,7 @@ int do_syslog(int type, char __user *buf } error -= syslog_partial; } @@ -99,7 +99,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> break; /* Size of the log buffer */ case SYSLOG_ACTION_SIZE_BUFFER: -@@ -3001,9 +3001,9 @@ void register_console(struct console *ne +@@ -2995,9 +2995,9 @@ void register_console(struct console *ne exclusive_console_stop_seq = console_seq; /* Get a consistent copy of @syslog_seq. */ diff --git a/debian/patches-rt/0018-sched-Deny-self-issued-__set_cpus_allowed_ptr-when-m.patch b/debian/patches-rt/0018-sched-Deny-self-issued-__set_cpus_allowed_ptr-when-m.patch index dc445a1f5..a55479021 100644 --- a/debian/patches-rt/0018-sched-Deny-self-issued-__set_cpus_allowed_ptr-when-m.patch +++ b/debian/patches-rt/0018-sched-Deny-self-issued-__set_cpus_allowed_ptr-when-m.patch @@ -2,7 +2,7 @@ From: Valentin Schneider <valentin.schneider@arm.com> Date: Fri, 23 Oct 2020 12:12:16 +0200 Subject: [PATCH 18/19] sched: Deny self-issued __set_cpus_allowed_ptr() when migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz migrate_disable(); set_cpus_allowed_ptr(current, {something excluding task_cpu(current)}); @@ -18,7 +18,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2240,8 +2240,17 @@ static int __set_cpus_allowed_ptr(struct +@@ -2238,8 +2238,17 @@ static int __set_cpus_allowed_ptr(struct goto out; } diff --git a/debian/patches-rt/0010-softirq-Make-softirq-control-and-processing-RT-aware.patch b/debian/patches-rt/0018-softirq-Make-softirq-control-and-processing-RT-aware.patch index 8095f37b3..178bbf789 100644 --- a/debian/patches-rt/0010-softirq-Make-softirq-control-and-processing-RT-aware.patch +++ b/debian/patches-rt/0018-softirq-Make-softirq-control-and-processing-RT-aware.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:55 +0100 -Subject: [PATCH 10/19] softirq: Make softirq control and processing RT aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:55:56 +0100 +Subject: [PATCH 18/20] softirq: Make softirq control and processing RT aware +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Provide a local lock based serialization for soft interrupts on RT which allows the local_bh_disabled() sections and servicing soft interrupts to be @@ -13,6 +13,7 @@ softirq processing code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/bottom_half.h | 2 kernel/softirq.c | 188 ++++++++++++++++++++++++++++++++++++++++++-- diff --git a/debian/patches-rt/0019-console-add-write_atomic-interface.patch b/debian/patches-rt/0019-console-add-write_atomic-interface.patch index b34dbaec0..6192435d8 100644 --- a/debian/patches-rt/0019-console-add-write_atomic-interface.patch +++ b/debian/patches-rt/0019-console-add-write_atomic-interface.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:01 +0106 Subject: [PATCH 19/28] console: add write_atomic interface -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Add a write_atomic() callback to the console. This is an optional function for console drivers. The function must be atomic (including @@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/include/linux/console.h +++ b/include/linux/console.h -@@ -140,6 +140,7 @@ static inline int con_debug_leave(void) +@@ -141,6 +141,7 @@ static inline int con_debug_leave(void) struct console { char name[16]; void (*write)(struct console *, const char *, unsigned); @@ -39,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int (*read)(struct console *, char *, unsigned); struct tty_driver *(*device)(struct console *, int *); void (*unblank)(void); -@@ -229,4 +230,7 @@ extern void console_init(void); +@@ -230,4 +231,7 @@ extern void console_init(void); void dummycon_register_output_notifier(struct notifier_block *nb); void dummycon_unregister_output_notifier(struct notifier_block *nb); @@ -49,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* _LINUX_CONSOLE_H */ --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -3546,3 +3546,103 @@ void kmsg_dump_rewind(struct kmsg_dumper +@@ -3542,3 +3542,103 @@ void kmsg_dump_rewind(struct kmsg_dumper EXPORT_SYMBOL_GPL(kmsg_dump_rewind); #endif diff --git a/debian/patches-rt/0019-locking-rtmutex-add-rwlock-implementation-based-on-r.patch b/debian/patches-rt/0019-locking-rtmutex-add-rwlock-implementation-based-on-r.patch index cb21329a4..39a0d3226 100644 --- a/debian/patches-rt/0019-locking-rtmutex-add-rwlock-implementation-based-on-r.patch +++ b/debian/patches-rt/0019-locking-rtmutex-add-rwlock-implementation-based-on-r.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:18:06 +0200 Subject: [PATCH 19/22] locking/rtmutex: add rwlock implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The implementation is bias-based, similar to the rwsem implementation. diff --git a/debian/patches-rt/0019-mm-highmem-Remove-the-old-kmap_atomic-cruft.patch b/debian/patches-rt/0019-mm-highmem-Remove-the-old-kmap_atomic-cruft.patch index b108c73c3..9283e3441 100644 --- a/debian/patches-rt/0019-mm-highmem-Remove-the-old-kmap_atomic-cruft.patch +++ b/debian/patches-rt/0019-mm-highmem-Remove-the-old-kmap_atomic-cruft.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:31 +0100 Subject: [PATCH 19/37] mm/highmem: Remove the old kmap_atomic cruft -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz All users gone. diff --git a/debian/patches-rt/0019-sched-Comment-affine_move_task.patch b/debian/patches-rt/0019-sched-Comment-affine_move_task.patch index 8ab11cfc0..0b66ed48b 100644 --- a/debian/patches-rt/0019-sched-Comment-affine_move_task.patch +++ b/debian/patches-rt/0019-sched-Comment-affine_move_task.patch @@ -1,7 +1,7 @@ From: Valentin Schneider <valentin.schneider@arm.com> Date: Fri, 23 Oct 2020 12:12:17 +0200 Subject: [PATCH 19/19] sched: Comment affine_move_task() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> @@ -13,7 +13,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2080,7 +2080,75 @@ void do_set_cpus_allowed(struct task_str +@@ -2078,7 +2078,75 @@ void do_set_cpus_allowed(struct task_str } /* @@ -90,7 +90,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> */ static int affine_move_task(struct rq *rq, struct task_struct *p, struct rq_flags *rf, int dest_cpu, unsigned int flags) -@@ -2124,6 +2192,7 @@ static int affine_move_task(struct rq *r +@@ -2122,6 +2190,7 @@ static int affine_move_task(struct rq *r if (!(flags & SCA_MIGRATE_ENABLE)) { /* serialized by p->pi_lock */ if (!p->migration_pending) { @@ -98,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> refcount_set(&my_pending.refs, 1); init_completion(&my_pending.done); p->migration_pending = &my_pending; -@@ -2167,7 +2236,11 @@ static int affine_move_task(struct rq *r +@@ -2165,7 +2234,11 @@ static int affine_move_task(struct rq *r } if (task_running(rq, p) || p->state == TASK_WAKING) { @@ -111,7 +111,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> task_rq_unlock(rq, p, rf); stop_one_cpu(cpu_of(rq), migration_cpu_stop, &arg); -@@ -2192,6 +2265,10 @@ static int affine_move_task(struct rq *r +@@ -2190,6 +2263,10 @@ static int affine_move_task(struct rq *r if (refcount_dec_and_test(&pending->refs)) wake_up_var(&pending->refs); diff --git a/debian/patches-rt/0011-tick-sched-Prevent-false-positive-softirq-pending-wa.patch b/debian/patches-rt/0019-tick-sched-Prevent-false-positive-softirq-pending-wa.patch index 463966252..8e2af6ecc 100644 --- a/debian/patches-rt/0011-tick-sched-Prevent-false-positive-softirq-pending-wa.patch +++ b/debian/patches-rt/0019-tick-sched-Prevent-false-positive-softirq-pending-wa.patch @@ -1,8 +1,8 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:56 +0100 -Subject: [PATCH 11/19] tick/sched: Prevent false positive softirq pending +Date: Tue, 9 Mar 2021 09:55:57 +0100 +Subject: [PATCH 19/20] tick/sched: Prevent false positive softirq pending warnings on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On RT a task which has soft interrupts disabled can block on a lock and schedule out to idle while soft interrupts are pending. This triggers the @@ -17,6 +17,7 @@ out task has soft interrupts disabled. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/bottom_half.h | 6 ++++++ kernel/softirq.c | 15 +++++++++++++++ diff --git a/debian/patches-rt/0020-io-mapping-Cleanup-atomic-iomap.patch b/debian/patches-rt/0020-io-mapping-Cleanup-atomic-iomap.patch index 888bf1e83..069fe84c2 100644 --- a/debian/patches-rt/0020-io-mapping-Cleanup-atomic-iomap.patch +++ b/debian/patches-rt/0020-io-mapping-Cleanup-atomic-iomap.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:32 +0100 Subject: [PATCH 20/37] io-mapping: Cleanup atomic iomap -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Switch the atomic iomap implementation over to kmap_local and stick the preempt/pagefault mechanics into the generic code similar to the diff --git a/debian/patches-rt/0020-locking-rtmutex-wire-up-RT-s-locking.patch b/debian/patches-rt/0020-locking-rtmutex-wire-up-RT-s-locking.patch index 7021e4b31..78a9704f7 100644 --- a/debian/patches-rt/0020-locking-rtmutex-wire-up-RT-s-locking.patch +++ b/debian/patches-rt/0020-locking-rtmutex-wire-up-RT-s-locking.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:31:14 +0200 Subject: [PATCH 20/22] locking/rtmutex: wire up RT's locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> diff --git a/debian/patches-rt/0012-rcu-Prevent-false-positive-softirq-warning-on-RT.patch b/debian/patches-rt/0020-rcu-Prevent-false-positive-softirq-warning-on-RT.patch index d49818d7b..3c882494d 100644 --- a/debian/patches-rt/0012-rcu-Prevent-false-positive-softirq-warning-on-RT.patch +++ b/debian/patches-rt/0020-rcu-Prevent-false-positive-softirq-warning-on-RT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> -Date: Fri, 4 Dec 2020 18:01:57 +0100 -Subject: [PATCH 12/19] rcu: Prevent false positive softirq warning on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Date: Tue, 9 Mar 2021 09:55:58 +0100 +Subject: [PATCH 20/20] rcu: Prevent false positive softirq warning on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Soft interrupt disabled sections can legitimately be preempted or schedule out when blocking on a lock on RT enabled kernels so the RCU preempt check @@ -10,13 +10,14 @@ warning has to be disabled for RT kernels. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Paul E. McKenney <paulmck@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/rcupdate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h -@@ -325,7 +325,8 @@ static inline void rcu_preempt_sleep_che +@@ -327,7 +327,8 @@ static inline void rcu_preempt_sleep_che #define rcu_sleep_check() \ do { \ rcu_preempt_sleep_check(); \ diff --git a/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch b/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch index eb711fdbf..2b098b41e 100644 --- a/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch +++ b/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:02 +0106 Subject: [PATCH 20/28] serial: 8250: implement write_atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Implement a non-sleeping NMI-safe write_atomic() console function in order to support emergency console printing. diff --git a/debian/patches-rt/0021-Documentation-io-mapping-Remove-outdated-blurb.patch b/debian/patches-rt/0021-Documentation-io-mapping-Remove-outdated-blurb.patch index b4057f619..758e4d76c 100644 --- a/debian/patches-rt/0021-Documentation-io-mapping-Remove-outdated-blurb.patch +++ b/debian/patches-rt/0021-Documentation-io-mapping-Remove-outdated-blurb.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:33 +0100 Subject: [PATCH 21/37] Documentation/io-mapping: Remove outdated blurb -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The implementation details in the documentation are outdated and not really helpful. Remove them. diff --git a/debian/patches-rt/0021-locking-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch b/debian/patches-rt/0021-locking-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch index 5f6aedd56..2efc63766 100644 --- a/debian/patches-rt/0021-locking-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch +++ b/debian/patches-rt/0021-locking-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Oct 2017 17:34:38 +0200 Subject: [PATCH 21/22] locking/rtmutex: add ww_mutex addon for mutex-rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- diff --git a/debian/patches-rt/0021-printk-relocate-printk_delay-and-vprintk_default.patch b/debian/patches-rt/0021-printk-relocate-printk_delay-and-vprintk_default.patch index 8e02adc96..2a6f2cf93 100644 --- a/debian/patches-rt/0021-printk-relocate-printk_delay-and-vprintk_default.patch +++ b/debian/patches-rt/0021-printk-relocate-printk_delay-and-vprintk_default.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:03 +0106 Subject: [PATCH 21/28] printk: relocate printk_delay() and vprintk_default() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Move printk_delay() and vprintk_default() "as is" further up so that they can be used by new functions in an upcoming commit. @@ -14,7 +14,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1725,6 +1725,20 @@ SYSCALL_DEFINE3(syslog, int, type, char +@@ -1726,6 +1726,20 @@ SYSCALL_DEFINE3(syslog, int, type, char return do_syslog(type, buf, len, SYSLOG_FROM_READER); } @@ -35,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Special console_lock variants that help to reduce the risk of soft-lockups. * They allow to pass console_lock to another printk() call using a busy wait. -@@ -1968,20 +1982,6 @@ static void printk_exit_irqrestore(unsig +@@ -1969,20 +1983,6 @@ static void printk_exit_irqrestore(unsig local_irq_restore(flags); } @@ -56,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static inline u32 printk_caller_id(void) { return in_task() ? task_pid_nr(current) : -@@ -2214,18 +2214,18 @@ asmlinkage int vprintk_emit(int facility +@@ -2215,18 +2215,18 @@ asmlinkage int vprintk_emit(int facility } EXPORT_SYMBOL(vprintk_emit); diff --git a/debian/patches-rt/0022-highmem-High-implementation-details-and-document-API.patch b/debian/patches-rt/0022-highmem-High-implementation-details-and-document-API.patch index c8e84b513..e8be4aecf 100644 --- a/debian/patches-rt/0022-highmem-High-implementation-details-and-document-API.patch +++ b/debian/patches-rt/0022-highmem-High-implementation-details-and-document-API.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:34 +0100 Subject: [PATCH 22/37] highmem: High implementation details and document API -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Move the gory details of kmap & al into a private header and only document the interfaces which are usable by drivers. diff --git a/debian/patches-rt/0022-locking-rtmutex-Use-custom-scheduling-function-for-s.patch b/debian/patches-rt/0022-locking-rtmutex-Use-custom-scheduling-function-for-s.patch index 32a170721..036b71e0a 100644 --- a/debian/patches-rt/0022-locking-rtmutex-Use-custom-scheduling-function-for-s.patch +++ b/debian/patches-rt/0022-locking-rtmutex-Use-custom-scheduling-function-for-s.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 6 Oct 2020 13:07:17 +0200 Subject: [PATCH 22/22] locking/rtmutex: Use custom scheduling function for spin-schedule() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz PREEMPT_RT builds the rwsem, mutex, spinlock and rwlock typed locks on top of a rtmutex lock. While blocked task->pi_blocked_on is set @@ -121,7 +121,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4981,7 +4981,7 @@ pick_next_task(struct rq *rq, struct tas +@@ -4978,7 +4978,7 @@ pick_next_task(struct rq *rq, struct tas * * WARNING: must be called with preemption disabled! */ @@ -130,7 +130,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { struct task_struct *prev, *next; unsigned long *switch_count; -@@ -5034,7 +5034,7 @@ static void __sched notrace __schedule(b +@@ -5031,7 +5031,7 @@ static void __sched notrace __schedule(b * - ptrace_{,un}freeze_traced() can change ->state underneath us. */ prev_state = prev->state; @@ -139,7 +139,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (signal_pending_state(prev_state, prev)) { prev->state = TASK_RUNNING; } else { -@@ -5118,7 +5118,7 @@ void __noreturn do_task_dead(void) +@@ -5115,7 +5115,7 @@ void __noreturn do_task_dead(void) /* Tell freezer to ignore us: */ current->flags |= PF_NOFREEZE; @@ -148,7 +148,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> BUG(); /* Avoid "noreturn function does return" - but don't continue if BUG() is a NOP: */ -@@ -5151,9 +5151,6 @@ static inline void sched_submit_work(str +@@ -5148,9 +5148,6 @@ static inline void sched_submit_work(str preempt_enable_no_resched(); } @@ -158,7 +158,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * If we are going to sleep and we have plugged IO queued, * make sure to submit it to avoid deadlocks. -@@ -5179,7 +5176,7 @@ asmlinkage __visible void __sched schedu +@@ -5176,7 +5173,7 @@ asmlinkage __visible void __sched schedu sched_submit_work(tsk); do { preempt_disable(); @@ -167,7 +167,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> sched_preempt_enable_no_resched(); } while (need_resched()); sched_update_worker(tsk); -@@ -5207,7 +5204,7 @@ void __sched schedule_idle(void) +@@ -5204,7 +5201,7 @@ void __sched schedule_idle(void) */ WARN_ON_ONCE(current->state); do { @@ -176,7 +176,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } while (need_resched()); } -@@ -5260,7 +5257,7 @@ static void __sched notrace preempt_sche +@@ -5257,7 +5254,7 @@ static void __sched notrace preempt_sche */ preempt_disable_notrace(); preempt_latency_start(1); @@ -185,7 +185,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> preempt_latency_stop(1); preempt_enable_no_resched_notrace(); -@@ -5290,6 +5287,19 @@ asmlinkage __visible void __sched notrac +@@ -5287,6 +5284,19 @@ asmlinkage __visible void __sched notrac NOKPROBE_SYMBOL(preempt_schedule); EXPORT_SYMBOL(preempt_schedule); @@ -205,7 +205,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * preempt_schedule_notrace - preempt_schedule called by tracing * -@@ -5333,7 +5343,7 @@ asmlinkage __visible void __sched notrac +@@ -5330,7 +5340,7 @@ asmlinkage __visible void __sched notrac * an infinite recursion. */ prev_ctx = exception_enter(); @@ -214,7 +214,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> exception_exit(prev_ctx); preempt_latency_stop(1); -@@ -5362,7 +5372,7 @@ asmlinkage __visible void __sched preemp +@@ -5359,7 +5369,7 @@ asmlinkage __visible void __sched preemp do { preempt_disable(); local_irq_enable(); diff --git a/debian/patches-rt/0022-printk-combine-boot_delay_msec-into-printk_delay.patch b/debian/patches-rt/0022-printk-combine-boot_delay_msec-into-printk_delay.patch index 3ad7b853a..75fbf1c44 100644 --- a/debian/patches-rt/0022-printk-combine-boot_delay_msec-into-printk_delay.patch +++ b/debian/patches-rt/0022-printk-combine-boot_delay_msec-into-printk_delay.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:04 +0106 Subject: [PATCH 22/28] printk: combine boot_delay_msec() into printk_delay() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz boot_delay_msec() is always called immediately before printk_delay() so just combine the two. @@ -14,7 +14,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1727,8 +1727,10 @@ SYSCALL_DEFINE3(syslog, int, type, char +@@ -1728,8 +1728,10 @@ SYSCALL_DEFINE3(syslog, int, type, char int printk_delay_msec __read_mostly; @@ -26,7 +26,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (unlikely(printk_delay_msec)) { int m = printk_delay_msec; -@@ -2186,8 +2188,7 @@ asmlinkage int vprintk_emit(int facility +@@ -2187,8 +2189,7 @@ asmlinkage int vprintk_emit(int facility in_sched = true; } diff --git a/debian/patches-rt/0023-printk-change-console_seq-to-atomic64_t.patch b/debian/patches-rt/0023-printk-change-console_seq-to-atomic64_t.patch index 378f5f17e..60c015d16 100644 --- a/debian/patches-rt/0023-printk-change-console_seq-to-atomic64_t.patch +++ b/debian/patches-rt/0023-printk-change-console_seq-to-atomic64_t.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:05 +0106 Subject: [PATCH 23/28] printk: change @console_seq to atomic64_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In preparation for atomic printing, change @console_seq to atomic so that it can be accessed without requiring @console_sem. @@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct latched_seq { seqcount_latch_t latch; u64 val[2]; -@@ -2270,7 +2271,7 @@ EXPORT_SYMBOL(printk); +@@ -2271,7 +2272,7 @@ EXPORT_SYMBOL(printk); #define prb_first_valid_seq(rb) 0 static u64 syslog_seq; @@ -40,7 +40,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static u64 exclusive_console_stop_seq; static unsigned long console_dropped; -@@ -2585,6 +2586,7 @@ void console_unlock(void) +@@ -2579,6 +2580,7 @@ void console_unlock(void) bool do_cond_resched, retry; struct printk_info info; struct printk_record r; @@ -48,7 +48,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (console_suspended) { up_console_sem(); -@@ -2627,12 +2629,14 @@ void console_unlock(void) +@@ -2621,12 +2623,14 @@ void console_unlock(void) size_t len; skip: @@ -67,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } if (suppress_message_printing(r.info->level)) { -@@ -2641,13 +2645,13 @@ void console_unlock(void) +@@ -2635,13 +2639,13 @@ void console_unlock(void) * directly to the console when we received it, and * record that has level above the console loglevel. */ @@ -83,7 +83,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> exclusive_console = NULL; } -@@ -2668,7 +2672,7 @@ void console_unlock(void) +@@ -2662,7 +2666,7 @@ void console_unlock(void) len = record_print_text(&r, console_msg_format & MSG_FORMAT_SYSLOG, printk_time); @@ -92,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * While actively printing out messages, if another printk() -@@ -2699,7 +2703,7 @@ void console_unlock(void) +@@ -2693,7 +2697,7 @@ void console_unlock(void) * there's a new owner and the console_unlock() from them will do the * flush, no worries. */ @@ -101,7 +101,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (retry && console_trylock()) goto again; } -@@ -2762,7 +2766,7 @@ void console_flush_on_panic(enum con_flu +@@ -2756,7 +2760,7 @@ void console_flush_on_panic(enum con_flu console_may_schedule = 0; if (mode == CONSOLE_REPLAY_ALL) @@ -110,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> console_unlock(); } -@@ -2999,11 +3003,11 @@ void register_console(struct console *ne +@@ -2993,11 +2997,11 @@ void register_console(struct console *ne * ignores console_lock. */ exclusive_console = newcon; diff --git a/debian/patches-rt/0023-sched-Make-migrate_disable-enable-independent-of-RT.patch b/debian/patches-rt/0023-sched-Make-migrate_disable-enable-independent-of-RT.patch index 17999cf9f..89826f6b0 100644 --- a/debian/patches-rt/0023-sched-Make-migrate_disable-enable-independent-of-RT.patch +++ b/debian/patches-rt/0023-sched-Make-migrate_disable-enable-independent-of-RT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:35 +0100 Subject: [PATCH 23/37] sched: Make migrate_disable/enable() independent of RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Now that the scheduler can deal with migrate disable properly, there is no real compelling reason to make it only available for RT. @@ -156,7 +156,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned short migration_flags; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1696,8 +1696,6 @@ void check_preempt_curr(struct rq *rq, s +@@ -1694,8 +1694,6 @@ void check_preempt_curr(struct rq *rq, s #ifdef CONFIG_SMP @@ -165,7 +165,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void __do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask, u32 flags); -@@ -1772,8 +1770,6 @@ static inline bool rq_has_pinned_tasks(s +@@ -1770,8 +1768,6 @@ static inline bool rq_has_pinned_tasks(s return rq->nr_pinned; } @@ -174,7 +174,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Per-CPU kthreads are allowed to run on !active && online CPUs, see * __set_cpus_allowed_ptr() and select_fallback_rq(). -@@ -2854,7 +2850,7 @@ void sched_set_stop_task(int cpu, struct +@@ -2852,7 +2848,7 @@ void sched_set_stop_task(int cpu, struct } } @@ -183,7 +183,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static inline int __set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask, -@@ -2863,10 +2859,6 @@ static inline int __set_cpus_allowed_ptr +@@ -2861,10 +2857,6 @@ static inline int __set_cpus_allowed_ptr return set_cpus_allowed_ptr(p, new_mask); } @@ -194,7 +194,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static inline void migrate_disable_switch(struct rq *rq, struct task_struct *p) { } static inline bool rq_has_pinned_tasks(struct rq *rq) -@@ -2874,7 +2866,7 @@ static inline bool rq_has_pinned_tasks(s +@@ -2872,7 +2864,7 @@ static inline bool rq_has_pinned_tasks(s return false; } @@ -203,7 +203,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static void ttwu_stat(struct task_struct *p, int cpu, int wake_flags) -@@ -7901,6 +7893,39 @@ void __cant_sleep(const char *file, int +@@ -7898,6 +7890,39 @@ void __cant_sleep(const char *file, int add_taint(TAINT_WARN, LOCKDEP_STILL_OK); } EXPORT_SYMBOL_GPL(__cant_sleep); @@ -245,7 +245,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_MAGIC_SYSRQ --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1048,7 +1048,7 @@ struct rq { +@@ -1049,7 +1049,7 @@ struct rq { struct cpuidle_state *idle_state; #endif @@ -254,7 +254,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned int nr_pinned; #endif unsigned int push_busy; -@@ -1084,7 +1084,7 @@ static inline int cpu_of(struct rq *rq) +@@ -1085,7 +1085,7 @@ static inline int cpu_of(struct rq *rq) static inline bool is_migration_disabled(struct task_struct *p) { diff --git a/debian/patches-rt/0024-printk-introduce-kernel-sync-mode.patch b/debian/patches-rt/0024-printk-introduce-kernel-sync-mode.patch index b2f3400a2..da744ee22 100644 --- a/debian/patches-rt/0024-printk-introduce-kernel-sync-mode.patch +++ b/debian/patches-rt/0024-printk-introduce-kernel-sync-mode.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:06 +0106 Subject: [PATCH 24/28] printk: introduce kernel sync mode -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz When the kernel performs an OOPS, enter into "sync mode": @@ -29,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct vc_data; struct console_font_op; -@@ -150,6 +151,9 @@ struct console { +@@ -151,6 +152,9 @@ struct console { short flags; short index; int cflag; @@ -84,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #define LOG_LEVEL(v) ((v) & 0x07) #define LOG_FACILITY(v) ((v) >> 3 & 0xff) -@@ -1742,6 +1743,91 @@ static inline void printk_delay(int leve +@@ -1743,6 +1744,91 @@ static inline void printk_delay(int leve } } @@ -176,7 +176,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Special console_lock variants that help to reduce the risk of soft-lockups. * They allow to pass console_lock to another printk() call using a busy wait. -@@ -1916,6 +2002,8 @@ static void call_console_drivers(const c +@@ -1917,6 +2003,8 @@ static void call_console_drivers(const c if (!cpu_online(smp_processor_id()) && !(con->flags & CON_ANYTIME)) continue; @@ -185,7 +185,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (con->flags & CON_EXTENDED) con->write(con, ext_text, ext_len); else { -@@ -2070,6 +2158,7 @@ int vprintk_store(int facility, int leve +@@ -2071,6 +2159,7 @@ int vprintk_store(int facility, int leve const u32 caller_id = printk_caller_id(); struct prb_reserved_entry e; enum log_flags lflags = 0; @@ -193,7 +193,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct printk_record r; unsigned long irqflags; u16 trunc_msg_len = 0; -@@ -2079,6 +2168,7 @@ int vprintk_store(int facility, int leve +@@ -2080,6 +2169,7 @@ int vprintk_store(int facility, int leve u16 text_len; int ret = 0; u64 ts_nsec; @@ -201,7 +201,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Since the duration of printk() can vary depending on the message -@@ -2117,6 +2207,7 @@ int vprintk_store(int facility, int leve +@@ -2118,6 +2208,7 @@ int vprintk_store(int facility, int leve if (lflags & LOG_CONT) { prb_rec_init_wr(&r, reserve_size); if (prb_reserve_in_last(&e, prb, &r, caller_id, LOG_LINE_MAX)) { @@ -209,7 +209,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> text_len = printk_sprint(&r.text_buf[r.info->text_len], reserve_size, facility, &lflags, fmt, args); r.info->text_len += text_len; -@@ -2124,6 +2215,7 @@ int vprintk_store(int facility, int leve +@@ -2125,6 +2216,7 @@ int vprintk_store(int facility, int leve if (lflags & LOG_NEWLINE) { r.info->flags |= LOG_NEWLINE; prb_final_commit(&e); @@ -217,7 +217,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } else { prb_commit(&e); } -@@ -2148,6 +2240,8 @@ int vprintk_store(int facility, int leve +@@ -2149,6 +2241,8 @@ int vprintk_store(int facility, int leve goto out; } @@ -226,7 +226,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* fill message */ text_len = printk_sprint(&r.text_buf[0], reserve_size, facility, &lflags, fmt, args); if (trunc_msg_len) -@@ -2162,13 +2256,25 @@ int vprintk_store(int facility, int leve +@@ -2163,13 +2257,25 @@ int vprintk_store(int facility, int leve memcpy(&r.info->dev_info, dev_info, sizeof(r.info->dev_info)); /* A message without a trailing newline can be continued. */ @@ -254,7 +254,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> printk_exit_irqrestore(irqflags); return ret; } -@@ -2264,12 +2370,13 @@ EXPORT_SYMBOL(printk); +@@ -2265,12 +2371,13 @@ EXPORT_SYMBOL(printk); #else /* CONFIG_PRINTK */ @@ -269,7 +269,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static u64 syslog_seq; static atomic64_t console_seq = ATOMIC64_INIT(0); static u64 exclusive_console_stop_seq; -@@ -2562,6 +2669,8 @@ static int have_callable_console(void) +@@ -2556,6 +2663,8 @@ static int have_callable_console(void) */ static inline int can_use_console(void) { @@ -278,7 +278,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return cpu_online(raw_smp_processor_id()) || have_callable_console(); } -@@ -3374,6 +3483,18 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3370,6 +3479,18 @@ void kmsg_dump(enum kmsg_dump_reason rea struct kmsg_dumper_iter iter; struct kmsg_dumper *dumper; diff --git a/debian/patches-rt/0024-sched-highmem-Store-local-kmaps-in-task-struct.patch b/debian/patches-rt/0024-sched-highmem-Store-local-kmaps-in-task-struct.patch index f755b63ba..9dcf299ab 100644 --- a/debian/patches-rt/0024-sched-highmem-Store-local-kmaps-in-task-struct.patch +++ b/debian/patches-rt/0024-sched-highmem-Store-local-kmaps-in-task-struct.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:36 +0100 Subject: [PATCH 24/37] sched: highmem: Store local kmaps in task struct -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Instead of storing the map per CPU provide and use per task storage. That prepares for local kmaps which are preemptible. @@ -110,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> tsk->fail_nth = 0; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4071,6 +4071,22 @@ static inline void finish_lock_switch(st +@@ -4068,6 +4068,22 @@ static inline void finish_lock_switch(st # define finish_arch_post_lock_switch() do { } while (0) #endif @@ -133,7 +133,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * prepare_task_switch - prepare to switch tasks * @rq: the runqueue preparing to switch -@@ -4093,6 +4109,7 @@ prepare_task_switch(struct rq *rq, struc +@@ -4090,6 +4106,7 @@ prepare_task_switch(struct rq *rq, struc perf_event_task_sched_out(prev, next); rseq_preempt(prev); fire_sched_out_preempt_notifiers(prev, next); @@ -141,7 +141,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> prepare_task(next); prepare_arch_switch(next); } -@@ -4159,6 +4176,7 @@ static struct rq *finish_task_switch(str +@@ -4156,6 +4173,7 @@ static struct rq *finish_task_switch(str finish_lock_switch(rq); finish_arch_post_lock_switch(); kcov_finish_switch(current); diff --git a/debian/patches-rt/0024-xfrm-Use-sequence-counter-with-associated-spinlock.patch b/debian/patches-rt/0024-xfrm-Use-sequence-counter-with-associated-spinlock.patch index 82af6cfa7..fe5559eca 100644 --- a/debian/patches-rt/0024-xfrm-Use-sequence-counter-with-associated-spinlock.patch +++ b/debian/patches-rt/0024-xfrm-Use-sequence-counter-with-associated-spinlock.patch @@ -1,7 +1,7 @@ From: "Ahmed S. Darwish" <a.darwish@linutronix.de> Date: Wed, 10 Jun 2020 12:53:22 +0200 Subject: [PATCH 24/24] xfrm: Use sequence counter with associated spinlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not diff --git a/debian/patches-rt/0025-mm-highmem-Provide-kmap_local.patch b/debian/patches-rt/0025-mm-highmem-Provide-kmap_local.patch index 15baaf5a7..669a3e7bb 100644 --- a/debian/patches-rt/0025-mm-highmem-Provide-kmap_local.patch +++ b/debian/patches-rt/0025-mm-highmem-Provide-kmap_local.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:37 +0100 Subject: [PATCH 25/37] mm/highmem: Provide kmap_local* -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Now that the kmap atomic index is stored in task struct provide a preemptible variant. On context switch the maps of an outgoing task are diff --git a/debian/patches-rt/0025-printk-move-console-printing-to-kthreads.patch b/debian/patches-rt/0025-printk-move-console-printing-to-kthreads.patch index 80138952e..e59fb8f8e 100644 --- a/debian/patches-rt/0025-printk-move-console-printing-to-kthreads.patch +++ b/debian/patches-rt/0025-printk-move-console-printing-to-kthreads.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:07 +0106 Subject: [PATCH 25/28] printk: move console printing to kthreads -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Create a kthread for each console to perform console printing. Now all console printing is fully asynchronous except for the boot @@ -20,7 +20,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/include/linux/console.h +++ b/include/linux/console.h -@@ -155,6 +155,8 @@ +@@ -155,6 +155,8 @@ struct console { #ifdef CONFIG_PRINTK char sync_buf[CONSOLE_LOG_MAX]; #endif @@ -39,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include <linux/clocksource.h> #include <linux/sched/clock.h> #include <linux/sched/debug.h> -@@ -268,11 +269,6 @@ +@@ -268,11 +269,6 @@ static void __up_console_sem(unsigned lo static int console_locked, console_suspended; /* @@ -51,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> * Array of consoles built from command line options (console=) */ -@@ -356,10 +352,10 @@ +@@ -356,10 +352,10 @@ enum log_flags { LOG_CONT = 8, /* text is a fragment of a continuation line */ }; @@ -63,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Set to enable sync mode. Once set, it is never cleared. */ static bool sync_mode; -@@ -370,13 +366,6 @@ +@@ -370,13 +366,6 @@ static u64 syslog_seq; static size_t syslog_partial; static bool syslog_time; @@ -77,7 +77,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct latched_seq { seqcount_latch_t latch; u64 val[2]; -@@ -1755,6 +1744,8 @@ +@@ -1755,6 +1744,8 @@ static bool console_can_sync(struct cons return false; if (con->write_atomic && kernel_sync_mode()) return true; @@ -86,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return false; } -@@ -1764,6 +1755,8 @@ +@@ -1764,6 +1755,8 @@ static bool call_sync_console_driver(str return false; if (con->write_atomic && kernel_sync_mode()) con->write_atomic(con, text, text_len); @@ -95,7 +95,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> else return false; -@@ -1819,202 +1812,16 @@ +@@ -1819,202 +1812,16 @@ static void print_sync_until(struct cons console_atomic_lock(&flags); for (;;) { @@ -300,7 +300,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #ifdef CONFIG_PRINTK_NMI #define NUM_RECURSION_CTX 2 #else -@@ -2285,39 +2092,16 @@ +@@ -2285,39 +2092,16 @@ asmlinkage int vprintk_emit(int facility const char *fmt, va_list args) { int printed_len; @@ -341,7 +341,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> wake_up_klogd(); return printed_len; } -@@ -2369,38 +2153,158 @@ +@@ -2369,38 +2153,158 @@ asmlinkage __visible int printk(const ch } EXPORT_SYMBOL(printk); @@ -523,7 +523,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #endif /* CONFIG_PRINTK */ -@@ -2638,36 +2542,6 @@ +@@ -2638,36 +2542,6 @@ int is_console_locked(void) } EXPORT_SYMBOL(is_console_locked); @@ -560,7 +560,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /** * console_unlock - unlock the console system * -@@ -2684,131 +2558,14 @@ +@@ -2684,131 +2558,14 @@ static inline int can_use_console(void) */ void console_unlock(void) { @@ -692,7 +692,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } EXPORT_SYMBOL(console_unlock); -@@ -2858,18 +2615,20 @@ +@@ -2858,18 +2615,20 @@ void console_unblank(void) */ void console_flush_on_panic(enum con_flush_mode mode) { @@ -723,7 +723,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> console_unlock(); } -@@ -3004,7 +2763,6 @@ +@@ -3004,7 +2763,6 @@ static int try_enable_new_console(struct */ void register_console(struct console *newcon) { @@ -731,7 +731,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct console *bcon = NULL; int err; -@@ -3028,6 +2786,8 @@ +@@ -3028,6 +2786,8 @@ void register_console(struct console *ne } } @@ -740,7 +740,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (console_drivers && console_drivers->flags & CON_BOOT) bcon = console_drivers; -@@ -3092,27 +2852,12 @@ +@@ -3092,27 +2852,12 @@ void register_console(struct console *ne if (newcon->flags & CON_EXTENDED) nr_ext_console_drivers++; @@ -773,7 +773,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> console_unlock(); console_sysfs_notify(); -@@ -3186,6 +2931,9 @@ +@@ -3186,6 +2931,9 @@ int unregister_console(struct console *c console_unlock(); console_sysfs_notify(); @@ -783,7 +783,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (console->exit) res = console->exit(console); -@@ -3268,6 +3016,15 @@ +@@ -3268,6 +3016,15 @@ static int __init printk_late_init(void) unregister_console(con); } } @@ -799,7 +799,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ret = cpuhp_setup_state_nocalls(CPUHP_PRINTK_DEAD, "printk:dead", NULL, console_cpu_notify); WARN_ON(ret < 0); -@@ -3283,7 +3040,6 @@ +@@ -3283,7 +3040,6 @@ late_initcall(printk_late_init); * Delayed printk version, for scheduler-internal messages: */ #define PRINTK_PENDING_WAKEUP 0x01 @@ -807,7 +807,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> static DEFINE_PER_CPU(int, printk_pending); -@@ -3291,14 +3047,8 @@ +@@ -3291,14 +3047,8 @@ static void wake_up_klogd_work_func(stru { int pending = __this_cpu_xchg(printk_pending, 0); @@ -823,7 +823,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) = { -@@ -3321,13 +3071,6 @@ +@@ -3321,13 +3071,6 @@ void wake_up_klogd(void) void defer_console_output(void) { diff --git a/debian/patches-rt/0026-io-mapping-Provide-iomap_local-variant.patch b/debian/patches-rt/0026-io-mapping-Provide-iomap_local-variant.patch index 53e69f163..876b9985f 100644 --- a/debian/patches-rt/0026-io-mapping-Provide-iomap_local-variant.patch +++ b/debian/patches-rt/0026-io-mapping-Provide-iomap_local-variant.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:38 +0100 Subject: [PATCH 26/37] io-mapping: Provide iomap_local variant -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Similar to kmap local provide a iomap local variant which only disables migration, but neither disables pagefaults nor preemption. diff --git a/debian/patches-rt/0026-printk-remove-deferred-printing.patch b/debian/patches-rt/0026-printk-remove-deferred-printing.patch index 5aabd91e2..5c270de01 100644 --- a/debian/patches-rt/0026-printk-remove-deferred-printing.patch +++ b/debian/patches-rt/0026-printk-remove-deferred-printing.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:08 +0106 Subject: [PATCH 26/28] printk: remove deferred printing -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Since printing occurs either atomically or from the printing kthread, there is no need for any deferring or tracking possible @@ -25,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c -@@ -672,9 +672,7 @@ +@@ -672,9 +672,7 @@ static void do_handle_IPI(int ipinr) break; case IPI_CPU_BACKTRACE: @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> default: --- a/arch/powerpc/kexec/crash.c +++ b/arch/powerpc/kexec/crash.c -@@ -311,9 +311,6 @@ +@@ -311,9 +311,6 @@ void default_machine_crash_shutdown(stru unsigned int i; int (*old_handler)(struct pt_regs *regs); @@ -49,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> * has panicked or is otherwise in a critical state. --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h -@@ -115,7 +115,6 @@ +@@ -115,7 +115,6 @@ extern void rcu_nmi_exit(void); do { \ lockdep_off(); \ arch_nmi_enter(); \ @@ -57,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> BUG_ON(in_nmi() == NMI_MASK); \ __preempt_count_add(NMI_OFFSET + HARDIRQ_OFFSET); \ } while (0) -@@ -134,7 +133,6 @@ +@@ -134,7 +133,6 @@ extern void rcu_nmi_exit(void); do { \ BUG_ON(!in_nmi()); \ __preempt_count_sub(NMI_OFFSET + HARDIRQ_OFFSET); \ @@ -67,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } while (0) --- a/include/linux/printk.h +++ b/include/linux/printk.h -@@ -155,18 +155,6 @@ +@@ -155,18 +155,6 @@ static inline __printf(1, 2) __cold void early_printk(const char *s, ...) { } #endif @@ -185,7 +185,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int console_printk[4] = { CONSOLE_LOGLEVEL_DEFAULT, /* console_loglevel */ -@@ -227,19 +227,7 @@ +@@ -227,19 +227,7 @@ static int nr_ext_console_drivers; static int __down_trylock_console_sem(unsigned long ip) { @@ -206,7 +206,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 1; mutex_acquire(&console_lock_dep_map, 0, 1, ip); return 0; -@@ -248,13 +236,9 @@ +@@ -248,13 +236,9 @@ static int __down_trylock_console_sem(un static void __up_console_sem(unsigned long ip) { @@ -220,7 +220,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } #define up_console_sem() __up_console_sem(_RET_IP_) -@@ -426,7 +410,7 @@ +@@ -426,7 +410,7 @@ static struct printk_ringbuffer *prb = & */ static bool __printk_percpu_data_ready __read_mostly; @@ -229,7 +229,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { return __printk_percpu_data_ready; } -@@ -1061,7 +1045,6 @@ +@@ -1061,7 +1045,6 @@ void __init setup_log_buf(int early) struct printk_record r; size_t new_descs_size; size_t new_infos_size; @@ -237,7 +237,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> char *new_log_buf; unsigned int free; u64 seq; -@@ -1959,9 +1942,9 @@ +@@ -1959,9 +1942,9 @@ static u16 printk_sprint(char *text, u16 } __printf(4, 0) @@ -250,7 +250,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> { const u32 caller_id = printk_caller_id(); struct prb_reserved_entry e; -@@ -2107,11 +2090,22 @@ +@@ -2107,11 +2090,22 @@ asmlinkage int vprintk_emit(int facility } EXPORT_SYMBOL(vprintk_emit); @@ -275,7 +275,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> asmlinkage int vprintk(const char *fmt, va_list args) { -@@ -3069,18 +3063,10 @@ +@@ -3069,18 +3063,10 @@ void wake_up_klogd(void) preempt_enable(); } @@ -299,7 +299,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> int printk_deferred(const char *fmt, ...) --- a/kernel/printk/printk_safe.c +++ /dev/null -@@ -1,90 +0,0 @@ +@@ -1,88 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * printk_safe.c - Safe printk for printk-deadlock-prone contexts @@ -319,8 +319,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> - -static DEFINE_PER_CPU(int, printk_context); - --static DEFINE_RAW_SPINLOCK(safe_read_lock); -- -#ifdef CONFIG_PRINTK_NMI -void noinstr printk_nmi_enter(void) -{ @@ -392,7 +390,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -} --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c -@@ -9295,7 +9295,6 @@ +@@ -9295,7 +9295,6 @@ void ftrace_dump(enum ftrace_dump_mode o tracing_off(); local_irq_save(flags); @@ -400,7 +398,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Simulate the iterator */ trace_init_global_iter(&iter); -@@ -9375,7 +9374,6 @@ +@@ -9375,7 +9374,6 @@ void ftrace_dump(enum ftrace_dump_mode o atomic_dec(&per_cpu_ptr(iter.array_buffer->data, cpu)->disabled); } atomic_dec(&dump_running); diff --git a/debian/patches-rt/0027-printk-add-console-handover.patch b/debian/patches-rt/0027-printk-add-console-handover.patch index dc15898a3..52b8b07d6 100644 --- a/debian/patches-rt/0027-printk-add-console-handover.patch +++ b/debian/patches-rt/0027-printk-add-console-handover.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:09 +0106 Subject: [PATCH 27/28] printk: add console handover -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz If earlyprintk is used, a boot console will print directly to the console immediately. The boot console will unregister itself as soon @@ -26,7 +26,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/include/linux/console.h +++ b/include/linux/console.h -@@ -137,6 +137,7 @@ static inline int con_debug_leave(void) +@@ -138,6 +138,7 @@ static inline int con_debug_leave(void) #define CON_ANYTIME (16) /* Safe to call when cpu is offline */ #define CON_BRL (32) /* Used for a braille device */ #define CON_EXTENDED (64) /* Use the extended output format a la /dev/kmsg */ @@ -36,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> char name[16]; --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -1726,6 +1726,8 @@ static bool console_can_sync(struct cons +@@ -1727,6 +1727,8 @@ static bool console_can_sync(struct cons return false; if (con->write_atomic && kernel_sync_mode()) return true; @@ -45,7 +45,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (con->write && (con->flags & CON_BOOT) && !con->thread) return true; return false; -@@ -1737,6 +1739,8 @@ static bool call_sync_console_driver(str +@@ -1738,6 +1740,8 @@ static bool call_sync_console_driver(str return false; if (con->write_atomic && kernel_sync_mode()) con->write_atomic(con, text, text_len); @@ -54,7 +54,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> else if (con->write && (con->flags & CON_BOOT) && !con->thread) con->write(con, text, text_len); else -@@ -2829,8 +2833,10 @@ void register_console(struct console *ne +@@ -2823,8 +2827,10 @@ void register_console(struct console *ne * the real console are the same physical device, it's annoying to * see the beginning boot messages twice */ diff --git a/debian/patches-rt/0027-x86-crashdump-32-Simplify-copy_oldmem_page.patch b/debian/patches-rt/0027-x86-crashdump-32-Simplify-copy_oldmem_page.patch index 92e5dc5fc..a6bf2b81b 100644 --- a/debian/patches-rt/0027-x86-crashdump-32-Simplify-copy_oldmem_page.patch +++ b/debian/patches-rt/0027-x86-crashdump-32-Simplify-copy_oldmem_page.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:39 +0100 Subject: [PATCH 27/37] x86/crashdump/32: Simplify copy_oldmem_page() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Replace kmap_atomic_pfn() with kmap_local_pfn() which is preemptible and can take page faults. diff --git a/debian/patches-rt/0028-mips-crashdump-Simplify-copy_oldmem_page.patch b/debian/patches-rt/0028-mips-crashdump-Simplify-copy_oldmem_page.patch index f9e2afff9..8537e84b3 100644 --- a/debian/patches-rt/0028-mips-crashdump-Simplify-copy_oldmem_page.patch +++ b/debian/patches-rt/0028-mips-crashdump-Simplify-copy_oldmem_page.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:40 +0100 Subject: [PATCH 28/37] mips/crashdump: Simplify copy_oldmem_page() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Replace kmap_atomic_pfn() with kmap_local_pfn() which is preemptible and can take page faults. diff --git a/debian/patches-rt/0028-printk-add-pr_flush.patch b/debian/patches-rt/0028-printk-add-pr_flush.patch index 31452cf45..07329e79a 100644 --- a/debian/patches-rt/0028-printk-add-pr_flush.patch +++ b/debian/patches-rt/0028-printk-add-pr_flush.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 30 Nov 2020 01:42:10 +0106 Subject: [PATCH 28/28] printk: add pr_flush() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Provide a function to allow waiting for console printers to catch up to the latest logged message. @@ -97,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -3228,6 +3228,12 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -3224,6 +3224,12 @@ void kmsg_dump(enum kmsg_dump_reason rea sync_mode = true; pr_info("enabled sync mode\n"); } @@ -110,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } rcu_read_lock(); -@@ -3507,3 +3513,76 @@ void console_atomic_unlock(unsigned int +@@ -3503,3 +3509,76 @@ void console_atomic_unlock(unsigned int prb_unlock(&printk_cpulock, flags); } EXPORT_SYMBOL(console_atomic_unlock); diff --git a/debian/patches-rt/0029-ARM-mm-Replace-kmap_atomic_pfn.patch b/debian/patches-rt/0029-ARM-mm-Replace-kmap_atomic_pfn.patch index 670e7af64..598272807 100644 --- a/debian/patches-rt/0029-ARM-mm-Replace-kmap_atomic_pfn.patch +++ b/debian/patches-rt/0029-ARM-mm-Replace-kmap_atomic_pfn.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:41 +0100 Subject: [PATCH 29/37] ARM: mm: Replace kmap_atomic_pfn() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz There is no requirement to disable pagefaults and preemption for these cache management mappings. diff --git a/debian/patches-rt/0030-highmem-Remove-kmap_atomic_pfn.patch b/debian/patches-rt/0030-highmem-Remove-kmap_atomic_pfn.patch index 50e9039c4..383ce3b4d 100644 --- a/debian/patches-rt/0030-highmem-Remove-kmap_atomic_pfn.patch +++ b/debian/patches-rt/0030-highmem-Remove-kmap_atomic_pfn.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:42 +0100 Subject: [PATCH 30/37] highmem: Remove kmap_atomic_pfn() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No more users. diff --git a/debian/patches-rt/0031-drm-ttm-Replace-kmap_atomic-usage.patch b/debian/patches-rt/0031-drm-ttm-Replace-kmap_atomic-usage.patch index 5bca5eec8..9004961a5 100644 --- a/debian/patches-rt/0031-drm-ttm-Replace-kmap_atomic-usage.patch +++ b/debian/patches-rt/0031-drm-ttm-Replace-kmap_atomic-usage.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:43 +0100 Subject: [PATCH 31/37] drm/ttm: Replace kmap_atomic() usage -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz There is no reason to disable pagefaults and preemption as a side effect of kmap_atomic_prot(). diff --git a/debian/patches-rt/0032-drm-vmgfx-Replace-kmap_atomic.patch b/debian/patches-rt/0032-drm-vmgfx-Replace-kmap_atomic.patch index 0af74e630..5a718e3e8 100644 --- a/debian/patches-rt/0032-drm-vmgfx-Replace-kmap_atomic.patch +++ b/debian/patches-rt/0032-drm-vmgfx-Replace-kmap_atomic.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:44 +0100 Subject: [PATCH 32/37] drm/vmgfx: Replace kmap_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz There is no reason to disable pagefaults and preemption as a side effect of kmap_atomic_prot(). diff --git a/debian/patches-rt/0033-highmem-Remove-kmap_atomic_prot.patch b/debian/patches-rt/0033-highmem-Remove-kmap_atomic_prot.patch index a63f172aa..43cc343d2 100644 --- a/debian/patches-rt/0033-highmem-Remove-kmap_atomic_prot.patch +++ b/debian/patches-rt/0033-highmem-Remove-kmap_atomic_prot.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:45 +0100 Subject: [PATCH 33/37] highmem: Remove kmap_atomic_prot() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No more users. diff --git a/debian/patches-rt/0034-drm-qxl-Replace-io_mapping_map_atomic_wc.patch b/debian/patches-rt/0034-drm-qxl-Replace-io_mapping_map_atomic_wc.patch index b94136d59..c59d6adda 100644 --- a/debian/patches-rt/0034-drm-qxl-Replace-io_mapping_map_atomic_wc.patch +++ b/debian/patches-rt/0034-drm-qxl-Replace-io_mapping_map_atomic_wc.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:46 +0100 Subject: [PATCH 34/37] drm/qxl: Replace io_mapping_map_atomic_wc() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz None of these mapping requires the side effect of disabling pagefaults and preemption. diff --git a/debian/patches-rt/0035-drm-nouveau-device-Replace-io_mapping_map_atomic_wc.patch b/debian/patches-rt/0035-drm-nouveau-device-Replace-io_mapping_map_atomic_wc.patch index b0342e9c2..562aac528 100644 --- a/debian/patches-rt/0035-drm-nouveau-device-Replace-io_mapping_map_atomic_wc.patch +++ b/debian/patches-rt/0035-drm-nouveau-device-Replace-io_mapping_map_atomic_wc.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:47 +0100 Subject: [PATCH 35/37] drm/nouveau/device: Replace io_mapping_map_atomic_wc() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Neither fbmem_peek() nor fbmem_poke() require to disable pagefaults and preemption as a side effect of io_mapping_map_atomic_wc(). diff --git a/debian/patches-rt/0036-drm-i915-Replace-io_mapping_map_atomic_wc.patch b/debian/patches-rt/0036-drm-i915-Replace-io_mapping_map_atomic_wc.patch index 0e5b0916b..51c08fbfc 100644 --- a/debian/patches-rt/0036-drm-i915-Replace-io_mapping_map_atomic_wc.patch +++ b/debian/patches-rt/0036-drm-i915-Replace-io_mapping_map_atomic_wc.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:48 +0100 Subject: [PATCH 36/37] drm/i915: Replace io_mapping_map_atomic_wc() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz None of these mapping requires the side effect of disabling pagefaults and preemption. diff --git a/debian/patches-rt/0037-io-mapping-Remove-io_mapping_map_atomic_wc.patch b/debian/patches-rt/0037-io-mapping-Remove-io_mapping_map_atomic_wc.patch index 5a50fc57b..70b2c4280 100644 --- a/debian/patches-rt/0037-io-mapping-Remove-io_mapping_map_atomic_wc.patch +++ b/debian/patches-rt/0037-io-mapping-Remove-io_mapping_map_atomic_wc.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 3 Nov 2020 10:27:49 +0100 Subject: [PATCH 37/37] io-mapping: Remove io_mapping_map_atomic_wc() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz No more users. Get rid of it and remove the traces in documentation. diff --git a/debian/patches-rt/ARM-Allow-to-enable-RT.patch b/debian/patches-rt/ARM-Allow-to-enable-RT.patch index 0f1a3934a..82fe6013a 100644 --- a/debian/patches-rt/ARM-Allow-to-enable-RT.patch +++ b/debian/patches-rt/ARM-Allow-to-enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 11 Oct 2019 13:14:29 +0200 Subject: [PATCH] ARM: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Allow to select RT. diff --git a/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch b/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch index 09a16ef53..7928d6548 100644 --- a/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch +++ b/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch @@ -1,7 +1,7 @@ From: "Yadi.hu" <yadi.hu@windriver.com> Date: Wed, 10 Dec 2014 10:32:09 +0800 Subject: ARM: enable irq in translation/section permission fault handlers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Probably happens on all ARM, with CONFIG_PREEMPT_RT diff --git a/debian/patches-rt/ARM64-Allow-to-enable-RT.patch b/debian/patches-rt/ARM64-Allow-to-enable-RT.patch index 40aba3b74..aa9af23a0 100644 --- a/debian/patches-rt/ARM64-Allow-to-enable-RT.patch +++ b/debian/patches-rt/ARM64-Allow-to-enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 11 Oct 2019 13:14:35 +0200 Subject: [PATCH] ARM64: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Allow to select RT. diff --git a/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch b/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch index 991d572cd..5afc3e1e5 100644 --- a/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch +++ b/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch @@ -1,7 +1,7 @@ From: Josh Cartwright <joshc@ni.com> Date: Thu, 11 Feb 2016 11:54:01 -0600 Subject: KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating the vgic and timer states to prevent the calling task from migrating to diff --git a/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch b/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch index 8c355357f..f267c01be 100644 --- a/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch +++ b/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 11 Oct 2019 13:14:41 +0200 Subject: [PATCH] POWERPC: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Allow to select RT. diff --git a/debian/patches-rt/add_cpu_light.patch b/debian/patches-rt/add_cpu_light.patch index 440c2ea9d..89942555d 100644 --- a/debian/patches-rt/add_cpu_light.patch +++ b/debian/patches-rt/add_cpu_light.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 27 May 2017 19:02:06 +0200 Subject: kernel/sched: add {put|get}_cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- diff --git a/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch b/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch index 58e77fe4a..110b79635 100644 --- a/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch +++ b/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch @@ -1,7 +1,7 @@ From: Anders Roxell <anders.roxell@linaro.org> Date: Thu, 14 May 2015 17:52:17 +0200 Subject: arch/arm64: Add lazy preempt support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz arm64 is missing support for PREEMPT_RT. The main feature which is lacking is support for lazy preemption. The arch-specific entry code, diff --git a/debian/patches-rt/arm-preempt-lazy-support.patch b/debian/patches-rt/arm-preempt-lazy-support.patch index 29c4d0330..588e3e0b8 100644 --- a/debian/patches-rt/arm-preempt-lazy-support.patch +++ b/debian/patches-rt/arm-preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: arm: Add support for lazy preemption From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 31 Oct 2012 12:04:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Implement the arm pieces for lazy preempt. @@ -65,7 +65,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif /* __ASM_ARM_THREAD_INFO_H */ --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c -@@ -41,6 +41,7 @@ int main(void) +@@ -42,6 +42,7 @@ int main(void) BLANK(); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); diff --git a/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch b/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch index 15e4bb7fa..99cbe9d0c 100644 --- a/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch +++ b/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 25 Jul 2018 14:02:38 +0200 Subject: [PATCH] arm64: fpsimd: Delay freeing memory in fpsimd_flush_thread() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz fpsimd_flush_thread() invokes kfree() via sve_free() within a preempt disabled section which is not working on -RT. diff --git a/debian/patches-rt/blk-mq-Always-complete-remote-completions-requests-i.patch b/debian/patches-rt/blk-mq-Always-complete-remote-completions-requests-i.patch index 1f558201f..be91fa969 100644 --- a/debian/patches-rt/blk-mq-Always-complete-remote-completions-requests-i.patch +++ b/debian/patches-rt/blk-mq-Always-complete-remote-completions-requests-i.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 23 Jan 2021 21:10:26 +0100 Subject: [PATCH] blk-mq: Always complete remote completions requests in softirq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Controllers with multiple queues have their IRQ-handelers pinned to a CPU. The core shouldn't need to complete the request on a remote CPU. diff --git a/debian/patches-rt/blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch b/debian/patches-rt/blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch index 327a8139e..2ab538ec5 100644 --- a/debian/patches-rt/blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch +++ b/debian/patches-rt/blk-mq-Don-t-complete-on-a-remote-CPU-in-force-threa.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 4 Dec 2020 20:13:54 +0100 Subject: [PATCH] blk-mq: Don't complete on a remote CPU in force threaded mode -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz With force threaded interrupts enabled, raising softirq from an SMP function call will always result in waking the ksoftirqd thread. This is diff --git a/debian/patches-rt/blk-mq-Use-llist_head-for-blk_cpu_done.patch b/debian/patches-rt/blk-mq-Use-llist_head-for-blk_cpu_done.patch index 33c0d2562..91f07fa19 100644 --- a/debian/patches-rt/blk-mq-Use-llist_head-for-blk_cpu_done.patch +++ b/debian/patches-rt/blk-mq-Use-llist_head-for-blk_cpu_done.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 23 Jan 2021 21:10:27 +0100 Subject: [PATCH] blk-mq: Use llist_head for blk_cpu_done -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz With llist_head it is possible to avoid the locking (the irq-off region) when items are added. This makes it possible to add items on a remote diff --git a/debian/patches-rt/block-mq-drop-preempt-disable.patch b/debian/patches-rt/block-mq-drop-preempt-disable.patch index 4b8e90acd..ab7363aca 100644 --- a/debian/patches-rt/block-mq-drop-preempt-disable.patch +++ b/debian/patches-rt/block-mq-drop-preempt-disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: block/mq: do not invoke preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz preempt_disable() and get_cpu() don't play well together with the sleeping locks it tries to allocate later. diff --git a/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch b/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch index eaf8335b4..6276524a8 100644 --- a/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch +++ b/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 3 Jul 2018 18:19:48 +0200 Subject: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock either with spin_lock_irq() or spin_lock_irqsave(). diff --git a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch index 70a78cf18..a18cae021 100644 --- a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch +++ b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Mike Galbraith <efault@gmx.de> Date: Sun, 8 Jan 2017 09:32:25 +0100 Subject: [PATCH] cpuset: Convert callback_lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The two commits below add up to a cpuset might_sleep() splat for RT: diff --git a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch index 1b24121b5..0c2be2511 100644 --- a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch +++ b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 21 Feb 2014 17:24:04 +0100 Subject: crypto: Reduce preempt disabled regions, more algos -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Don Estabrook reported | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() diff --git a/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch b/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch index e872ad3f9..d444e31eb 100644 --- a/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch +++ b/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 18:52:00 +0200 Subject: [PATCH] crypto: cryptd - add a lock instead preempt_disable/local_bh_disable -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz cryptd has a per-CPU lock which protected with local_bh_disable() and preempt_disable(). diff --git a/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch b/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch index bb339cb4d..51d14222d 100644 --- a/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch +++ b/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch @@ -4,7 +4,7 @@ Subject: [PATCH] crypto: limit more FPU-enabled sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Those crypto drivers use SSE/AVX/… for their crypto work and in order to do so in kernel they need to enable the "FPU" in kernel mode which diff --git a/debian/patches-rt/debugobjects-rt.patch b/debian/patches-rt/debugobjects-rt.patch index 2f1b22cad..d5f3847f9 100644 --- a/debian/patches-rt/debugobjects-rt.patch +++ b/debian/patches-rt/debugobjects-rt.patch @@ -1,7 +1,7 @@ Subject: debugobjects: Make RT aware From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 21:41:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Avoid filling the pool / allocating memory with irqs off(). diff --git a/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch b/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch index 9c36fb194..7d7a1faff 100644 --- a/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch +++ b/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch @@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Thu, 31 Mar 2016 04:08:28 +0200 Subject: [PATCH] drivers/block/zram: Replace bit spinlocks with rtmutex for -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz They're nondeterministic, and lead to ___might_sleep() splats in -rt. OTOH, they're a lot less wasteful than an rtmutex per page. diff --git a/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch b/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch index 00d851036..f3baf18e9 100644 --- a/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch +++ b/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch @@ -1,7 +1,7 @@ Subject: tty/serial/omap: Make the locking RT aware From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 28 Jul 2011 13:32:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and diff --git a/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch b/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch index ddbb0ceb7..f6a003168 100644 --- a/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch +++ b/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch @@ -1,7 +1,7 @@ Subject: tty/serial/pl011: Make the locking work on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 08 Jan 2013 21:36:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and non-RT. diff --git a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch index f643a6519..a02fb1c9f 100644 --- a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch +++ b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-on-PREEMPT_RT-duri.patch @@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Sat, 27 Feb 2016 09:01:42 +0100 Subject: [PATCH] drm/i915: Don't disable interrupts on PREEMPT_RT during atomic updates -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Commit 8d7849db3eab7 ("drm/i915: Make sprite updates atomic") diff --git a/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch b/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch index 906e130a8..adf7b1e5b 100644 --- a/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch +++ b/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 6 Dec 2018 09:52:20 +0100 Subject: [PATCH] drm/i915: disable tracing on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Luca Abeni reported this: | BUG: scheduling while atomic: kworker/u8:2/15203/0x00000003 diff --git a/debian/patches-rt/drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch b/debian/patches-rt/drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch index f48553dbc..fc73adcfd 100644 --- a/debian/patches-rt/drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch +++ b/debian/patches-rt/drm-i915-gt-Only-disable-interrupts-for-the-timeline.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 7 Jul 2020 12:25:11 +0200 Subject: [PATCH] drm/i915/gt: Only disable interrupts for the timeline lock on !force-threaded -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz According to commit d67739268cf0e ("drm/i915/gt: Mark up the nested engine-pm timeline lock as irqsafe") diff --git a/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch b/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch index 2d446bdda..1c392b7f3 100644 --- a/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch +++ b/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 19 Dec 2018 10:47:02 +0100 Subject: [PATCH] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with NOTRACE -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The order of the header files is important. If this header file is included after tracepoint.h was included then the NOTRACE here becomes a diff --git a/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch b/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch index 21518b02c..8c41e358f 100644 --- a/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch +++ b/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch @@ -1,7 +1,7 @@ Subject: drm,radeon,i915: Use preempt_disable/enable_rt() where recommended From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Sat, 27 Feb 2016 08:09:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz DRM folks identified the spots, so use them. diff --git a/debian/patches-rt/efi-Allow-efi-runtime.patch b/debian/patches-rt/efi-Allow-efi-runtime.patch index 1d9eed6c4..08b7b7567 100644 --- a/debian/patches-rt/efi-Allow-efi-runtime.patch +++ b/debian/patches-rt/efi-Allow-efi-runtime.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 15:06:10 +0200 Subject: [PATCH] efi: Allow efi=runtime -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In case the command line option "efi=noruntime" is default at built-time, the user could overwrite its state by `efi=runtime' and allow it again. diff --git a/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch b/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch index c7eae82c7..2d371c1d2 100644 --- a/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch +++ b/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 15:03:16 +0200 Subject: [PATCH] efi: Disable runtime services on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Based on meassurements the EFI functions get_variable / get_next_variable take up to 2us which looks okay. diff --git a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index d6d307166..f61d45c3c 100644 --- a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +++ b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 20 Oct 2017 11:29:53 +0200 Subject: [PATCH] fs/dcache: disable preemption on i_dir_seq's write side -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz i_dir_seq is an opencoded seqcounter. Based on the code it looks like we could have two writers in parallel despite the fact that the d_lock is diff --git a/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch b/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch index a34838063..d3705dbda 100644 --- a/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch +++ b/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 14 Sep 2016 14:35:49 +0200 Subject: [PATCH] fs/dcache: use swait_queue instead of waitqueue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz __d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock() which disables preemption. As a workaround convert it to swait. @@ -113,7 +113,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Don't go there if it's already dead */ if (unlikely(IS_DEADDIR(inode))) -@@ -3019,7 +3019,7 @@ static struct dentry *lookup_open(struct +@@ -3014,7 +3014,7 @@ static struct dentry *lookup_open(struct struct dentry *dentry; int error, create_error = 0; umode_t mode = op->mode; diff --git a/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch b/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch index ffbdf2b5a..d42834e45 100644 --- a/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch +++ b/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch @@ -1,7 +1,7 @@ Subject: fs: namespace: Use cpu_chill() in trylock loops From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 07 Mar 2012 21:00:34 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches-rt/ftrace-migrate-disable-tracing.patch b/debian/patches-rt/ftrace-migrate-disable-tracing.patch index 984b9875a..a18b5c0f0 100644 --- a/debian/patches-rt/ftrace-migrate-disable-tracing.patch +++ b/debian/patches-rt/ftrace-migrate-disable-tracing.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 21:56:42 +0200 Subject: trace: Add migrate-disabled counter to tracing output -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- diff --git a/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch b/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch index 5201d34b0..3f30650db 100644 --- a/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch +++ b/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:29:57 -0500 Subject: genirq: Disable irqpoll on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Creates long latencies for no value diff --git a/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch b/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch index a479cd6a0..4e2f8a1a4 100644 --- a/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch +++ b/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch @@ -1,7 +1,7 @@ From: Josh Cartwright <joshc@ni.com> Date: Thu, 11 Feb 2016 11:54:00 -0600 Subject: genirq: update irq_set_irqchip_state documentation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On -rt kernels, the use of migrate_disable()/migrate_enable() is sufficient to guarantee a task isn't moved to another CPU. Update the diff --git a/debian/patches-rt/highmem-Don-t-disable-preemption-on-RT-in-kmap_atomi.patch b/debian/patches-rt/highmem-Don-t-disable-preemption-on-RT-in-kmap_atomi.patch index 0c1759488..8eee75a53 100644 --- a/debian/patches-rt/highmem-Don-t-disable-preemption-on-RT-in-kmap_atomi.patch +++ b/debian/patches-rt/highmem-Don-t-disable-preemption-on-RT-in-kmap_atomi.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 30 Oct 2020 13:59:06 +0100 Subject: [PATCH] highmem: Don't disable preemption on RT in kmap_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Disabling preemption makes it impossible to acquire sleeping locks within kmap_atomic() section. diff --git a/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch b/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch index 28af3ff1f..e64205d6f 100644 --- a/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch +++ b/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch @@ -1,7 +1,7 @@ Subject: irqwork: push most work into softirq context From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 23 Jun 2015 15:32:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Initially we defered all irqwork into softirq because we didn't want the latency spikes if perf or another user was busy and delayed the RT task. diff --git a/debian/patches-rt/jump-label-rt.patch b/debian/patches-rt/jump-label-rt.patch index ef6ceca26..38e5f2917 100644 --- a/debian/patches-rt/jump-label-rt.patch +++ b/debian/patches-rt/jump-label-rt.patch @@ -1,7 +1,7 @@ Subject: jump-label: disable if stop_machine() is used From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 08 Jul 2015 17:14:48 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Some architectures are using stop_machine() while switching the opcode which leads to latency spikes. diff --git a/debian/patches-rt/kconfig-disable-a-few-options-rt.patch b/debian/patches-rt/kconfig-disable-a-few-options-rt.patch index 6ccd2112e..9c45111c0 100644 --- a/debian/patches-rt/kconfig-disable-a-few-options-rt.patch +++ b/debian/patches-rt/kconfig-disable-a-few-options-rt.patch @@ -1,7 +1,7 @@ Subject: kconfig: Disable config options which are not RT compatible From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 24 Jul 2011 12:11:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Disable stuff which is known to have issues on RT diff --git a/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch b/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch index 5cf3240b6..76c983738 100644 --- a/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch +++ b/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 21 Nov 2016 19:31:08 +0100 Subject: [PATCH] kernel/sched: move stack + kprobe clean up to __put_task_struct() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz There is no need to free the stack before the task struct (except for reasons mentioned in commit 68f24b08ee89 ("sched/core: Free the stack early if @@ -55,7 +55,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> task_numa_free(tsk, true); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4260,15 +4260,6 @@ static struct rq *finish_task_switch(str +@@ -4257,15 +4257,6 @@ static struct rq *finish_task_switch(str if (prev->sched_class->task_dead) prev->sched_class->task_dead(prev); diff --git a/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch b/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch index 72fd943f3..2db81db9d 100644 --- a/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch +++ b/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 23 Jan 2014 14:45:59 +0100 Subject: leds: trigger: disable CPU trigger on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz as it triggers: |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141 diff --git a/debian/patches-rt/lib-test_lockup-Minimum-fix-to-get-it-compiled-on-PR.patch b/debian/patches-rt/lib-test_lockup-Minimum-fix-to-get-it-compiled-on-PR.patch index d0768118e..822d967ea 100644 --- a/debian/patches-rt/lib-test_lockup-Minimum-fix-to-get-it-compiled-on-PR.patch +++ b/debian/patches-rt/lib-test_lockup-Minimum-fix-to-get-it-compiled-on-PR.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 28 Oct 2020 18:55:27 +0100 Subject: [PATCH] lib/test_lockup: Minimum fix to get it compiled on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On PREEMPT_RT the locks are quite different so they can't be tested as it is done below. The alternative is test for the waitlock within diff --git a/debian/patches-rt/localversion.patch b/debian/patches-rt/localversion.patch index dd207d35c..1be00c7d4 100644 --- a/debian/patches-rt/localversion.patch +++ b/debian/patches-rt/localversion.patch @@ -1,7 +1,7 @@ Subject: Add localversion for -RT release From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 08 Jul 2011 20:25:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- @@ -11,4 +11,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt32 ++-rt34 diff --git a/debian/patches-rt/lockdep-disable-self-test.patch b/debian/patches-rt/lockdep-disable-self-test.patch index c8291ec60..f83989c3a 100644 --- a/debian/patches-rt/lockdep-disable-self-test.patch +++ b/debian/patches-rt/lockdep-disable-self-test.patch @@ -4,7 +4,7 @@ Subject: [PATCH] lockdep: disable self-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The self-test wasn't always 100% accurate for RT. We disabled a few tests which failed because they had a different semantic for RT. Some diff --git a/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch b/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch index 9eabf3c8a..a6e07a923 100644 --- a/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch +++ b/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch @@ -1,7 +1,7 @@ Subject: lockdep: Make it RT aware From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 18:51:23 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz teach lockdep that we don't really do softirqs on -RT. @@ -52,7 +52,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> extern void stop_critical_timings(void); --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c -@@ -5290,6 +5290,7 @@ static noinstr void check_flags(unsigned +@@ -5291,6 +5291,7 @@ static noinstr void check_flags(unsigned } } @@ -60,7 +60,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * We dont accurately track softirq state in e.g. * hardirq contexts (such as on 4KSTACKS), so only -@@ -5304,6 +5305,7 @@ static noinstr void check_flags(unsigned +@@ -5305,6 +5306,7 @@ static noinstr void check_flags(unsigned DEBUG_LOCKS_WARN_ON(!current->softirqs_enabled); } } diff --git a/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch b/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch index fb102f631..643da7f88 100644 --- a/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch +++ b/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch @@ -1,7 +1,7 @@ From: Josh Cartwright <josh.cartwright@ni.com> Date: Wed, 28 Jan 2015 13:08:45 -0600 Subject: lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz "lockdep: Selftest: Only do hardirq context test for raw spinlock" disabled the execution of certain tests with PREEMPT_RT, but did diff --git a/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch b/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch index f830a7a34..78bd5ce7a 100644 --- a/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch +++ b/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch @@ -1,7 +1,7 @@ Subject: lockdep: selftest: Only do hardirq context test for raw spinlock From: Yong Zhang <yong.zhang0@gmail.com> Date: Mon, 16 Apr 2012 15:01:56 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz From: Yong Zhang <yong.zhang@windriver.com> diff --git a/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch b/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch index c2722d8f7..b6d33a365 100644 --- a/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch +++ b/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 19 Nov 2019 09:25:04 +0100 Subject: [PATCH] locking: Make spinlock_t and rwlock_t a RCU section on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On !RT a locked spinlock_t and rwlock_t disables preemption which implies a RCU read section. There is code that relies on that behaviour. diff --git a/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch b/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch index af0ff9fb0..3552d8f26 100644 --- a/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch +++ b/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 4 Aug 2017 17:40:42 +0200 Subject: [PATCH 1/2] locking: don't check for __LINUX_SPINLOCK_TYPES_H on -RT archs -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Upstream uses arch_spinlock_t within spinlock_t and requests that spinlock_types.h header file is included first. diff --git a/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch b/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch index 4bbcde878..beed271bb 100644 --- a/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch +++ b/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 6 Apr 2010 16:51:31 +0200 Subject: md: raid5: Make raid5_percpu handling RT aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic diff --git a/debian/patches-rt/mm-disable-sloub-rt.patch b/debian/patches-rt/mm-disable-sloub-rt.patch index 88d4bef87..df361eaec 100644 --- a/debian/patches-rt/mm-disable-sloub-rt.patch +++ b/debian/patches-rt/mm-disable-sloub-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:44:03 -0500 Subject: mm: Allow only SLUB on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Memory allocation disables interrupts as part of the allocation and freeing process. For -RT it is important that this section remain short and don't @@ -23,7 +23,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/init/Kconfig +++ b/init/Kconfig -@@ -1885,6 +1885,7 @@ choice +@@ -1896,6 +1896,7 @@ choice config SLAB bool "SLAB" @@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> select HAVE_HARDENED_USERCOPY_ALLOCATOR help The regular slab allocator that is established and known to work -@@ -1905,6 +1906,7 @@ config SLUB +@@ -1916,6 +1917,7 @@ config SLUB config SLOB depends on EXPERT bool "SLOB (Simple Allocator)" diff --git a/debian/patches-rt/mm-highmem-Take-kmap_high_get-properly-into-account.patch b/debian/patches-rt/mm-highmem-Take-kmap_high_get-properly-into-account.patch index eeff1c881..ee9ddf2d3 100644 --- a/debian/patches-rt/mm-highmem-Take-kmap_high_get-properly-into-account.patch +++ b/debian/patches-rt/mm-highmem-Take-kmap_high_get-properly-into-account.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Nov 2020 11:59:32 +0100 Subject: [PATCH] mm/highmem: Take kmap_high_get() properly into account -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz kunmap_local() warns when the virtual address to unmap is below PAGE_OFFSET. This is correct except for the case that the mapping was diff --git a/debian/patches-rt/mm-make-vmstat-rt-aware.patch b/debian/patches-rt/mm-make-vmstat-rt-aware.patch index 6ab3dadbe..48ded06b2 100644 --- a/debian/patches-rt/mm-make-vmstat-rt-aware.patch +++ b/debian/patches-rt/mm-make-vmstat-rt-aware.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:30:13 -0500 Subject: mm/vmstat: Protect per cpu variables with preempt disable on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Disable preemption on -RT for the vmstat code. On vanila the code runs in IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the diff --git a/debian/patches-rt/mm-memcontrol-Disable-preemption-in-__mod_memcg_lruv.patch b/debian/patches-rt/mm-memcontrol-Disable-preemption-in-__mod_memcg_lruv.patch index 7828aa497..5be5222ce 100644 --- a/debian/patches-rt/mm-memcontrol-Disable-preemption-in-__mod_memcg_lruv.patch +++ b/debian/patches-rt/mm-memcontrol-Disable-preemption-in-__mod_memcg_lruv.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 28 Oct 2020 18:15:32 +0100 Subject: [PATCH] mm/memcontrol: Disable preemption in __mod_memcg_lruvec_state() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The callers expect disabled preemption/interrupts while invoking __mod_memcg_lruvec_state(). This works mainline because a lock of diff --git a/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch b/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch index 808bf2649..dac39b3b8 100644 --- a/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch +++ b/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch @@ -1,7 +1,7 @@ From: Yang Shi <yang.shi@windriver.com> Subject: mm/memcontrol: Don't call schedule_work_on in preemption disabled context Date: Wed, 30 Oct 2013 11:48:33 -0700 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The following trace is triggered when running ltp oom test cases: @@ -49,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -2353,7 +2353,7 @@ static void drain_all_stock(struct mem_c +@@ -2349,7 +2349,7 @@ static void drain_all_stock(struct mem_c * as well as workers from this path always operate on the local * per-cpu data. CPU up doesn't touch memcg_stock at all. */ @@ -58,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> for_each_online_cpu(cpu) { struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu); struct mem_cgroup *memcg; -@@ -2376,7 +2376,7 @@ static void drain_all_stock(struct mem_c +@@ -2372,7 +2372,7 @@ static void drain_all_stock(struct mem_c schedule_work_on(cpu, &stock->work); } } diff --git a/debian/patches-rt/mm-memcontrol-Provide-a-local_lock-for-per-CPU-memcg.patch b/debian/patches-rt/mm-memcontrol-Provide-a-local_lock-for-per-CPU-memcg.patch index 2af676cf1..5c0c3ed1d 100644 --- a/debian/patches-rt/mm-memcontrol-Provide-a-local_lock-for-per-CPU-memcg.patch +++ b/debian/patches-rt/mm-memcontrol-Provide-a-local_lock-for-per-CPU-memcg.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 18 Aug 2020 10:30:00 +0200 Subject: [PATCH] mm: memcontrol: Provide a local_lock for per-CPU memcg_stock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The interrupts are disabled to ensure CPU-local access to the per-CPU variable `memcg_stock'. @@ -21,7 +21,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -2206,6 +2206,7 @@ void unlock_page_memcg(struct page *page +@@ -2202,6 +2202,7 @@ void unlock_page_memcg(struct page *page EXPORT_SYMBOL(unlock_page_memcg); struct memcg_stock_pcp { @@ -29,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct mem_cgroup *cached; /* this never be root cgroup */ unsigned int nr_pages; -@@ -2257,7 +2258,7 @@ static bool consume_stock(struct mem_cgr +@@ -2253,7 +2254,7 @@ static bool consume_stock(struct mem_cgr if (nr_pages > MEMCG_CHARGE_BATCH) return ret; @@ -38,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> stock = this_cpu_ptr(&memcg_stock); if (memcg == stock->cached && stock->nr_pages >= nr_pages) { -@@ -2265,7 +2266,7 @@ static bool consume_stock(struct mem_cgr +@@ -2261,7 +2262,7 @@ static bool consume_stock(struct mem_cgr ret = true; } @@ -47,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ret; } -@@ -2300,14 +2301,14 @@ static void drain_local_stock(struct wor +@@ -2296,14 +2297,14 @@ static void drain_local_stock(struct wor * The only protection from memory hotplug vs. drain_stock races is * that we always operate on local CPU stock here with IRQ disabled */ @@ -64,7 +64,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* -@@ -2319,7 +2320,7 @@ static void refill_stock(struct mem_cgro +@@ -2315,7 +2316,7 @@ static void refill_stock(struct mem_cgro struct memcg_stock_pcp *stock; unsigned long flags; @@ -73,7 +73,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> stock = this_cpu_ptr(&memcg_stock); if (stock->cached != memcg) { /* reset if necessary */ -@@ -2332,7 +2333,7 @@ static void refill_stock(struct mem_cgro +@@ -2328,7 +2329,7 @@ static void refill_stock(struct mem_cgro if (stock->nr_pages > MEMCG_CHARGE_BATCH) drain_stock(stock); @@ -82,7 +82,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* -@@ -3143,7 +3144,7 @@ static bool consume_obj_stock(struct obj +@@ -3139,7 +3140,7 @@ static bool consume_obj_stock(struct obj unsigned long flags; bool ret = false; @@ -91,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> stock = this_cpu_ptr(&memcg_stock); if (objcg == stock->cached_objcg && stock->nr_bytes >= nr_bytes) { -@@ -3151,7 +3152,7 @@ static bool consume_obj_stock(struct obj +@@ -3147,7 +3148,7 @@ static bool consume_obj_stock(struct obj ret = true; } @@ -100,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return ret; } -@@ -3210,7 +3211,7 @@ static void refill_obj_stock(struct obj_ +@@ -3206,7 +3207,7 @@ static void refill_obj_stock(struct obj_ struct memcg_stock_pcp *stock; unsigned long flags; @@ -109,7 +109,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> stock = this_cpu_ptr(&memcg_stock); if (stock->cached_objcg != objcg) { /* reset if necessary */ -@@ -3224,7 +3225,7 @@ static void refill_obj_stock(struct obj_ +@@ -3220,7 +3221,7 @@ static void refill_obj_stock(struct obj_ if (stock->nr_bytes > PAGE_SIZE) drain_obj_stock(stock); @@ -118,7 +118,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } int obj_cgroup_charge(struct obj_cgroup *objcg, gfp_t gfp, size_t size) -@@ -7135,9 +7136,13 @@ static int __init mem_cgroup_init(void) +@@ -7141,9 +7142,13 @@ static int __init mem_cgroup_init(void) cpuhp_setup_state_nocalls(CPUHP_MM_MEMCQ_DEAD, "mm/memctrl:dead", NULL, memcg_hotplug_cpu_dead); diff --git a/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch b/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch index 5dd1e4201..acfd8b38c 100644 --- a/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch +++ b/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Subject: mm/memcontrol: Replace local_irq_disable with local locks Date: Wed, 28 Jan 2015 17:14:16 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz There are a few local_irq_disable() which then take sleeping locks. This patch converts them local locks. @@ -23,7 +23,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> #include <linux/uaccess.h> -@@ -93,6 +94,13 @@ +@@ -93,6 +94,13 @@ bool cgroup_memory_noswap __read_mostly; static DECLARE_WAIT_QUEUE_HEAD(memcg_cgwb_frn_waitq); #endif @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Whether legacy memory+swap accounting is active */ static bool do_memsw_account(void) { -@@ -5727,12 +5735,12 @@ +@@ -5727,12 +5735,12 @@ static int mem_cgroup_move_account(struc ret = 0; @@ -52,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> out_unlock: unlock_page(page); out: -@@ -6802,10 +6810,10 @@ +@@ -6802,10 +6810,10 @@ int mem_cgroup_charge(struct page *page, css_get(&memcg->css); commit_charge(page, memcg); @@ -65,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * Cgroup1's unified memory+swap counter has been charged with the -@@ -6861,11 +6869,11 @@ +@@ -6861,11 +6869,11 @@ static void uncharge_batch(const struct memcg_oom_recover(ug->memcg); } @@ -79,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* drop reference from uncharge_page */ css_put(&ug->memcg->css); -@@ -7019,10 +7027,10 @@ +@@ -7019,10 +7027,10 @@ void mem_cgroup_migrate(struct page *old css_get(&memcg->css); commit_charge(newpage, memcg); @@ -92,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } DEFINE_STATIC_KEY_FALSE(memcg_sockets_enabled_key); -@@ -7197,6 +7205,7 @@ +@@ -7197,6 +7205,7 @@ void mem_cgroup_swapout(struct page *pag struct mem_cgroup *memcg, *swap_memcg; unsigned int nr_entries; unsigned short oldid; @@ -100,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> VM_BUG_ON_PAGE(PageLRU(page), page); VM_BUG_ON_PAGE(page_count(page), page); -@@ -7242,9 +7251,13 @@ +@@ -7242,9 +7251,13 @@ void mem_cgroup_swapout(struct page *pag * important here to have the interrupts disabled because it is the * only synchronisation we have for updating the per-CPU variables. */ diff --git a/debian/patches-rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch b/debian/patches-rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch index dca3472ea..816293fe9 100644 --- a/debian/patches-rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch +++ b/debian/patches-rt/mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 2 Jul 2020 14:27:23 +0200 Subject: [PATCH] mm/page_alloc: Use migrate_disable() in drain_local_pages_wq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz drain_local_pages_wq() disables preemption to avoid CPU migration during CPU hotplug. diff --git a/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch b/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch index c1d670ade..3a009f2f0 100644 --- a/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch +++ b/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:29:37 -0500 Subject: mm: page_alloc: rt-friendly per-cpu pages -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. diff --git a/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch b/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch index eb6a285e0..ed6f4eba0 100644 --- a/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch +++ b/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 3 Jul 2009 08:44:34 -0500 Subject: mm/scatterlist: Do not disable irqs on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz For -RT it is enough to keep pagefault disabled (which is currently handled by kmap_atomic()). diff --git a/debian/patches-rt/mm-slub-Always-flush-the-delayed-empty-slubs-in-flus.patch b/debian/patches-rt/mm-slub-Always-flush-the-delayed-empty-slubs-in-flus.patch index c0d1f9776..052dc6989 100644 --- a/debian/patches-rt/mm-slub-Always-flush-the-delayed-empty-slubs-in-flus.patch +++ b/debian/patches-rt/mm-slub-Always-flush-the-delayed-empty-slubs-in-flus.patch @@ -1,7 +1,7 @@ From: Kevin Hao <haokexin@gmail.com> Date: Mon, 4 May 2020 11:34:07 +0800 Subject: [PATCH] mm: slub: Always flush the delayed empty slubs in flush_all() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz After commit f0b231101c94 ("mm/SLUB: delay giving back empty slubs to IRQ enabled regions"), when the free_slab() is invoked with the IRQ diff --git a/debian/patches-rt/mm-slub-Don-t-resize-the-location-tracking-cache-on-.patch b/debian/patches-rt/mm-slub-Don-t-resize-the-location-tracking-cache-on-.patch new file mode 100644 index 000000000..ad93d08f7 --- /dev/null +++ b/debian/patches-rt/mm-slub-Don-t-resize-the-location-tracking-cache-on-.patch @@ -0,0 +1,31 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Fri, 26 Feb 2021 17:26:04 +0100 +Subject: [PATCH 6/8] mm: slub: Don't resize the location tracking cache on + PREEMPT_RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz + +The location tracking cache has a size of a page and is resized if its +current size is too small. +This allocation happens with disabled interrupts and can't happen on +PREEMPT_RT. +Should one page be too small, then we have to allocate more at the +beginning. The only downside is that less callers will be visible. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + mm/slub.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/mm/slub.c ++++ b/mm/slub.c +@@ -4681,6 +4681,9 @@ static int alloc_loc_track(struct loc_tr + struct location *l; + int order; + ++ if (IS_ENABLED(CONFIG_PREEMPT_RT) && flags == GFP_ATOMIC) ++ return 0; ++ + order = get_order(sizeof(struct location) * max); + + l = (void *)__get_free_pages(flags, order); diff --git a/debian/patches-rt/mm-slub-Make-object_map_lock-a-raw_spinlock_t.patch b/debian/patches-rt/mm-slub-Make-object_map_lock-a-raw_spinlock_t.patch index 7912709e7..7789ca0b8 100644 --- a/debian/patches-rt/mm-slub-Make-object_map_lock-a-raw_spinlock_t.patch +++ b/debian/patches-rt/mm-slub-Make-object_map_lock-a-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 16 Jul 2020 18:47:50 +0200 Subject: [PATCH] mm/slub: Make object_map_lock a raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The variable object_map is protected by object_map_lock. The lock is always acquired in debug code and within already atomic context diff --git a/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch b/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch index eba765219..b85ef96da 100644 --- a/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch +++ b/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch @@ -1,7 +1,7 @@ Subject: mm/vmalloc: Another preempt disable region which sucks From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 12 Jul 2011 11:39:36 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Avoid the preempt disable version of get_cpu_var(). The inner-lock should provide enough serialisation. diff --git a/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch b/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch index 22ae164b9..e5755e23b 100644 --- a/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch +++ b/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 11 Feb 2019 10:40:46 +0100 Subject: [PATCH] mm: workingset: replace IRQ-off check with a lockdep assert. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Commit diff --git a/debian/patches-rt/mm-zswap-Use-local-lock-to-protect-per-CPU-data.patch b/debian/patches-rt/mm-zswap-Use-local-lock-to-protect-per-CPU-data.patch index d583c6ffb..07acafa3d 100644 --- a/debian/patches-rt/mm-zswap-Use-local-lock-to-protect-per-CPU-data.patch +++ b/debian/patches-rt/mm-zswap-Use-local-lock-to-protect-per-CPU-data.patch @@ -1,7 +1,7 @@ From: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com> Date: Tue, 25 Jun 2019 11:28:04 -0300 Subject: [PATCH] mm/zswap: Use local lock to protect per-CPU data -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz zwap uses per-CPU compression. The per-CPU data pointer is acquired with get_cpu_ptr() which implicitly disables preemption. It allocates diff --git a/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch b/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch index 8ffb8f317..fa95e7b8c 100644 --- a/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch +++ b/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch @@ -1,7 +1,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Tue, 22 Mar 2016 11:16:09 +0100 Subject: [PATCH] mm/zsmalloc: copy with get_cpu_var() and locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz get_cpu_var() disables preemption and triggers a might_sleep() splat later. This is replaced with get_locked_var(). diff --git a/debian/patches-rt/net--Move-lockdep-where-it-belongs.patch b/debian/patches-rt/net--Move-lockdep-where-it-belongs.patch index b81d4dadb..08c9b7527 100644 --- a/debian/patches-rt/net--Move-lockdep-where-it-belongs.patch +++ b/debian/patches-rt/net--Move-lockdep-where-it-belongs.patch @@ -1,7 +1,7 @@ Subject: net: Move lockdep where it belongs From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 08 Sep 2020 07:32:20 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- diff --git a/debian/patches-rt/net-Dequeue-in-dev_cpu_dead-without-the-lock.patch b/debian/patches-rt/net-Dequeue-in-dev_cpu_dead-without-the-lock.patch index 53363cd10..2df2ad501 100644 --- a/debian/patches-rt/net-Dequeue-in-dev_cpu_dead-without-the-lock.patch +++ b/debian/patches-rt/net-Dequeue-in-dev_cpu_dead-without-the-lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 16 Sep 2020 16:15:39 +0200 Subject: [PATCH] net: Dequeue in dev_cpu_dead() without the lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Upstream uses skb_dequeue() to acquire lock of `input_pkt_queue'. The reason is to synchronize against a remote CPU which still thinks that the CPU is online @@ -20,7 +20,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -10865,7 +10865,7 @@ static int dev_cpu_dead(unsigned int old +@@ -10910,7 +10910,7 @@ static int dev_cpu_dead(unsigned int old netif_rx_ni(skb); input_queue_head_incr(oldsd); } diff --git a/debian/patches-rt/net-Properly-annotate-the-try-lock-for-the-seqlock.patch b/debian/patches-rt/net-Properly-annotate-the-try-lock-for-the-seqlock.patch index cf0dae925..133152f39 100644 --- a/debian/patches-rt/net-Properly-annotate-the-try-lock-for-the-seqlock.patch +++ b/debian/patches-rt/net-Properly-annotate-the-try-lock-for-the-seqlock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 8 Sep 2020 16:57:11 +0200 Subject: [PATCH] net: Properly annotate the try-lock for the seqlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In patch ("net/Qdisc: use a seqlock instead seqcount") diff --git a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch index 47cfda2df..be96abd8d 100644 --- a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch +++ b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 14 Sep 2016 17:36:35 +0200 Subject: [PATCH] net/Qdisc: use a seqlock instead seqcount -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The seqcount disables preemption on -RT while it is held which can't remove. Also we don't want the reader to spin for ages if the writer is diff --git a/debian/patches-rt/0014-net-arcnet-Fix-RESET-flag-handling.patch b/debian/patches-rt/net-arcnet-Fix-RESET-flag-handling.patch index 9ff63286c..faeeff296 100644 --- a/debian/patches-rt/0014-net-arcnet-Fix-RESET-flag-handling.patch +++ b/debian/patches-rt/net-arcnet-Fix-RESET-flag-handling.patch @@ -1,7 +1,7 @@ From: "Ahmed S. Darwish" <a.darwish@linutronix.de> Date: Thu, 28 Jan 2021 20:48:02 +0100 -Subject: [PATCH 14/19] net: arcnet: Fix RESET flag handling -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Subject: [PATCH] net: arcnet: Fix RESET flag handling +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The main arcnet interrupt handler calls arcnet_close() then arcnet_open(), if the RESET status flag is encountered. @@ -29,6 +29,9 @@ Run the device RESET sequence from a scheduled workqueue instead. Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Link: https://lore.kernel.org/r/20210128194802.727770-1-a.darwish@linutronix.de +Signed-off-by: Jakub Kicinski <kuba@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/net/arcnet/arc-rimi.c | 4 +- drivers/net/arcnet/arcdevice.h | 6 +++ diff --git a/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch b/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch index 62503092a..91e587ace 100644 --- a/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch +++ b/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 16 Jun 2017 19:03:16 +0200 Subject: [PATCH] net/core: use local_bh_disable() in netif_rx_ni() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz In 2004 netif_rx_ni() gained a preempt_disable() section around netif_rx() and its do_softirq() + testing for it. The do_softirq() part @@ -19,7 +19,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4833,11 +4833,9 @@ int netif_rx_ni(struct sk_buff *skb) +@@ -4834,11 +4834,9 @@ int netif_rx_ni(struct sk_buff *skb) trace_netif_rx_ni_entry(skb); diff --git a/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch b/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch index 36d1e0cc3..37ecdc715 100644 --- a/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch +++ b/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 30 Mar 2016 13:36:29 +0200 Subject: [PATCH] net: dev: always take qdisc's busylock in __dev_xmit_skb() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The root-lock is dropped before dev_hard_start_xmit() is invoked and after setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away diff --git a/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch b/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch index 7e4a4b9a9..2415e00ce 100644 --- a/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch +++ b/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 27 May 2017 19:02:06 +0200 Subject: net/core: disable NET_RX_BUSY_POLL on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz napi_busy_loop() disables preemption and performs a NAPI poll. We can't acquire sleeping locks with disabled preemption so we would have to work around this diff --git a/debian/patches-rt/notifier-Make-atomic_notifiers-use-raw_spinlock.patch b/debian/patches-rt/notifier-Make-atomic_notifiers-use-raw_spinlock.patch index a9f953cc7..fdb9ed571 100644 --- a/debian/patches-rt/notifier-Make-atomic_notifiers-use-raw_spinlock.patch +++ b/debian/patches-rt/notifier-Make-atomic_notifiers-use-raw_spinlock.patch @@ -1,7 +1,7 @@ From: Valentin Schneider <valentin.schneider@arm.com> Date: Sun, 22 Nov 2020 20:19:04 +0000 Subject: [PATCH] notifier: Make atomic_notifiers use raw_spinlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Booting a recent PREEMPT_RT kernel (v5.10-rc3-rt7-rebase) on my arm64 Juno leads to the idle task blocking on an RT sleeping spinlock down some diff --git a/debian/patches-rt/oleg-signal-rt-fix.patch b/debian/patches-rt/oleg-signal-rt-fix.patch index 6e52172ea..692b87a5e 100644 --- a/debian/patches-rt/oleg-signal-rt-fix.patch +++ b/debian/patches-rt/oleg-signal-rt-fix.patch @@ -1,7 +1,7 @@ From: Oleg Nesterov <oleg@redhat.com> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: signal/x86: Delay calling signals in atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using diff --git a/debian/patches-rt/panic-disable-random-on-rt.patch b/debian/patches-rt/panic-disable-random-on-rt.patch index 463c4f27f..7608f7375 100644 --- a/debian/patches-rt/panic-disable-random-on-rt.patch +++ b/debian/patches-rt/panic-disable-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Disable on -RT. If this is invoked from irq-context we will have problems to acquire the sleeping lock. diff --git a/debian/patches-rt/pid.h-include-atomic.h.patch b/debian/patches-rt/pid.h-include-atomic.h.patch index f071085f6..3ee2c4b62 100644 --- a/debian/patches-rt/pid.h-include-atomic.h.patch +++ b/debian/patches-rt/pid.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Grygorii Strashko <Grygorii.Strashko@linaro.org> Date: Tue, 21 Jul 2015 19:43:56 +0300 Subject: pid.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz This patch fixes build error: CC kernel/pid_namespace.o diff --git a/debian/patches-rt/powerpc-Avoid-recursive-header-includes.patch b/debian/patches-rt/powerpc-Avoid-recursive-header-includes.patch index 2a31efc11..bfe545660 100644 --- a/debian/patches-rt/powerpc-Avoid-recursive-header-includes.patch +++ b/debian/patches-rt/powerpc-Avoid-recursive-header-includes.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 8 Jan 2021 19:48:21 +0100 Subject: [PATCH] powerpc: Avoid recursive header includes -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz - The include of bug.h leads to an include of printk.h which gets back to spinlock.h and complains then about missing xchg(). diff --git a/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch b/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch index 5158ee6a5..a71b9d505 100644 --- a/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch +++ b/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch @@ -1,7 +1,7 @@ From: Bogdan Purcareata <bogdan.purcareata@freescale.com> Date: Fri, 24 Apr 2015 15:53:13 +0000 Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz While converting the openpic emulation code to use a raw_spinlock_t enables guests to run on RT, there's still a performance issue. For interrupts sent in diff --git a/debian/patches-rt/powerpc-preempt-lazy-support.patch b/debian/patches-rt/powerpc-preempt-lazy-support.patch index 69d579bd5..c5ee247d2 100644 --- a/debian/patches-rt/powerpc-preempt-lazy-support.patch +++ b/debian/patches-rt/powerpc-preempt-lazy-support.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 1 Nov 2012 10:14:11 +0100 Subject: powerpc: Add support for lazy preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Implement the powerpc pieces for lazy preempt. @@ -94,7 +94,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> OFFSET(DCACHEL1BLOCKSIZE, ppc64_caches, l1d.block_size); --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S -@@ -411,7 +411,9 @@ +@@ -414,7 +414,9 @@ mtmsr r10 lwz r9,TI_FLAGS(r2) li r8,-MAX_ERRNO @@ -105,7 +105,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> bne- syscall_exit_work cmplw 0,r3,r8 blt+ syscall_exit_cont -@@ -527,13 +529,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE +@@ -530,13 +532,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE b syscall_dotrace_cont syscall_exit_work: @@ -121,7 +121,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> bne- 1f lwz r11,_CCR(r1) /* Load CR */ neg r3,r3 -@@ -542,12 +544,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE +@@ -545,12 +547,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE 1: stw r6,RESULT(r1) /* Save result */ stw r3,GPR3(r1) /* Update return value */ @@ -136,7 +136,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> addi r12,r2,TI_FLAGS 3: lwarx r8,0,r12 andc r8,r8,r11 -@@ -924,7 +926,14 @@ user_exc_return: /* r10 contains MSR_KE +@@ -927,7 +929,14 @@ user_exc_return: /* r10 contains MSR_KE cmpwi 0,r0,0 /* if non-zero, just restore regs and return */ bne restore_kuap andi. r8,r8,_TIF_NEED_RESCHED @@ -151,7 +151,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> lwz r3,_MSR(r1) andi. r0,r3,MSR_EE /* interrupts off? */ beq restore_kuap /* don't schedule if so */ -@@ -1245,7 +1254,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE +@@ -1248,7 +1257,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRE #endif /* !(CONFIG_4xx || CONFIG_BOOKE) */ do_work: /* r10 contains MSR_KERNEL here */ @@ -160,7 +160,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> beq do_user_signal do_resched: /* r10 contains MSR_KERNEL here */ -@@ -1264,7 +1273,7 @@ do_resched: /* r10 contains MSR_KERNEL +@@ -1267,7 +1276,7 @@ do_resched: /* r10 contains MSR_KERNEL LOAD_REG_IMMEDIATE(r10,MSR_KERNEL) mtmsr r10 /* disable interrupts */ lwz r9,TI_FLAGS(r2) diff --git a/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch b/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch index 75395a40a..b9f16d4e7 100644 --- a/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch +++ b/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 26 Mar 2019 18:31:54 +0100 Subject: [PATCH] powerpc/pseries/iommu: Use a locallock instead local_irq_save() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The locallock protects the per-CPU variable tce_page. The function attempts to allocate memory while tce_page is protected (by disabling diff --git a/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch b/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch index 0a01909ed..3691f9b9a 100644 --- a/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch +++ b/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 26 Mar 2019 18:31:29 +0100 Subject: [PATCH ] powerpc/stackprotector: work around stack-guard init from atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz This is invoked from the secondary CPU in atomic context. On x86 we use tsc instead. On Power we XOR it against mftb() so lets use stack address diff --git a/debian/patches-rt/powerpc-traps.patch b/debian/patches-rt/powerpc-traps.patch index 4654b6a97..110c7fbf0 100644 --- a/debian/patches-rt/powerpc-traps.patch +++ b/debian/patches-rt/powerpc-traps.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 26 Jul 2019 11:30:49 +0200 Subject: [PATCH] powerpc: traps: Use PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Add PREEMPT_RT to the backtrace if enabled. diff --git a/debian/patches-rt/preempt-lazy-support.patch b/debian/patches-rt/preempt-lazy-support.patch index 37b200f31..7423adeb6 100644 --- a/debian/patches-rt/preempt-lazy-support.patch +++ b/debian/patches-rt/preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: sched: Add support for lazy preemption From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 26 Oct 2012 18:50:54 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points @@ -286,7 +286,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> default PREEMPT_NONE --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -657,6 +657,48 @@ void resched_curr(struct rq *rq) +@@ -655,6 +655,48 @@ void resched_curr(struct rq *rq) trace_sched_wake_idle_without_ipi(cpu); } @@ -335,7 +335,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> void resched_cpu(int cpu) { struct rq *rq = cpu_rq(cpu); -@@ -1758,6 +1800,7 @@ void migrate_disable(void) +@@ -1756,6 +1798,7 @@ void migrate_disable(void) preempt_disable(); this_rq()->nr_pinned++; p->migration_disabled = 1; @@ -343,7 +343,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_enable(); } EXPORT_SYMBOL_GPL(migrate_disable); -@@ -1786,6 +1829,7 @@ void migrate_enable(void) +@@ -1784,6 +1827,7 @@ void migrate_enable(void) barrier(); p->migration_disabled = 0; this_rq()->nr_pinned--; @@ -351,7 +351,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_enable(); trace_sched_migrate_enable_tp(p); -@@ -3822,6 +3866,9 @@ int sched_fork(unsigned long clone_flags +@@ -3819,6 +3863,9 @@ int sched_fork(unsigned long clone_flags p->on_cpu = 0; #endif init_task_preempt_count(p); @@ -361,7 +361,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_SMP plist_node_init(&p->pushable_tasks, MAX_PRIO); RB_CLEAR_NODE(&p->pushable_dl_tasks); -@@ -5081,6 +5128,7 @@ static void __sched notrace __schedule(b +@@ -5078,6 +5125,7 @@ static void __sched notrace __schedule(b next = pick_next_task(rq, prev, &rf); clear_tsk_need_resched(prev); @@ -369,7 +369,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> clear_preempt_need_resched(); if (likely(prev != next)) { -@@ -5280,6 +5328,30 @@ static void __sched notrace preempt_sche +@@ -5277,6 +5325,30 @@ static void __sched notrace preempt_sche } while (need_resched()); } @@ -400,7 +400,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #ifdef CONFIG_PREEMPTION /* * This is the entry point to schedule() from in-kernel preemption -@@ -5293,7 +5365,8 @@ asmlinkage __visible void __sched notrac +@@ -5290,7 +5362,8 @@ asmlinkage __visible void __sched notrac */ if (likely(!preemptible())) return; @@ -410,7 +410,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> preempt_schedule_common(); } NOKPROBE_SYMBOL(preempt_schedule); -@@ -5333,6 +5406,9 @@ asmlinkage __visible void __sched notrac +@@ -5330,6 +5403,9 @@ asmlinkage __visible void __sched notrac if (likely(!preemptible())) return; @@ -420,7 +420,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> do { /* * Because the function tracer can trace preempt_count_sub() -@@ -7168,7 +7244,9 @@ void init_idle(struct task_struct *idle, +@@ -7165,7 +7241,9 @@ void init_idle(struct task_struct *idle, /* Set the preempt count _outside_ the spinlocks! */ init_idle_preempt_count(idle, cpu); @@ -433,7 +433,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> */ --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -4361,7 +4361,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq +@@ -4372,7 +4372,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq ideal_runtime = sched_slice(cfs_rq, curr); delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; if (delta_exec > ideal_runtime) { @@ -442,7 +442,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * The current task ran long enough, ensure it doesn't get * re-elected due to buddy favours. -@@ -4385,7 +4385,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq +@@ -4396,7 +4396,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq return; if (delta > ideal_runtime) @@ -451,7 +451,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static void -@@ -4528,7 +4528,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc +@@ -4539,7 +4539,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc * validating it and just reschedule. */ if (queued) { @@ -460,7 +460,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return; } /* -@@ -4665,7 +4665,7 @@ static void __account_cfs_rq_runtime(str +@@ -4676,7 +4676,7 @@ static void __account_cfs_rq_runtime(str * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -469,7 +469,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static __always_inline -@@ -5400,7 +5400,7 @@ static void hrtick_start_fair(struct rq +@@ -5411,7 +5411,7 @@ static void hrtick_start_fair(struct rq if (delta < 0) { if (rq->curr == p) @@ -478,7 +478,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return; } hrtick_start(rq, delta); -@@ -6979,7 +6979,7 @@ static void check_preempt_wakeup(struct +@@ -6992,7 +6992,7 @@ static void check_preempt_wakeup(struct return; preempt: @@ -487,7 +487,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* * Only set the backward buddy when the current task is still * on the rq. This can happen when a wakeup gets interleaved -@@ -10736,7 +10736,7 @@ static void task_fork_fair(struct task_s +@@ -10749,7 +10749,7 @@ static void task_fork_fair(struct task_s * 'current' within the tree based on its new key value. */ swap(curr->vruntime, se->vruntime); @@ -496,7 +496,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } se->vruntime -= cfs_rq->min_vruntime; -@@ -10763,7 +10763,7 @@ prio_changed_fair(struct rq *rq, struct +@@ -10776,7 +10776,7 @@ prio_changed_fair(struct rq *rq, struct */ if (rq->curr == p) { if (p->prio > oldprio) @@ -519,7 +519,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -1987,6 +1987,15 @@ extern void reweight_task(struct task_st +@@ -1988,6 +1988,15 @@ extern void reweight_task(struct task_st extern void resched_curr(struct rq *rq); extern void resched_cpu(int cpu); diff --git a/debian/patches-rt/preempt-nort-rt-variants.patch b/debian/patches-rt/preempt-nort-rt-variants.patch index 5741476c5..a84b2429b 100644 --- a/debian/patches-rt/preempt-nort-rt-variants.patch +++ b/debian/patches-rt/preempt-nort-rt-variants.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 24 Jul 2009 12:38:56 +0200 Subject: preempt: Provide preempt_*_(no)rt variants -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. diff --git a/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch b/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch index cb05617d3..61dd3aaf9 100644 --- a/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch +++ b/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Aug 2013 18:21:04 +0200 Subject: ptrace: fix ptrace vs tasklist_lock race -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz As explained by Alexander Fyodorov <halcy@yandex.ru>: @@ -116,7 +116,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> spin_unlock_irq(&task->sighand->siglock); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2573,6 +2573,18 @@ int migrate_swap(struct task_struct *cur +@@ -2571,6 +2571,18 @@ int migrate_swap(struct task_struct *cur } #endif /* CONFIG_NUMA_BALANCING */ @@ -135,7 +135,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * wait_task_inactive - wait for a thread to unschedule. * -@@ -2617,7 +2629,7 @@ unsigned long wait_task_inactive(struct +@@ -2615,7 +2627,7 @@ unsigned long wait_task_inactive(struct * is actually now running somewhere else! */ while (task_running(rq, p)) { @@ -144,7 +144,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return 0; cpu_relax(); } -@@ -2632,7 +2644,8 @@ unsigned long wait_task_inactive(struct +@@ -2630,7 +2642,8 @@ unsigned long wait_task_inactive(struct running = task_running(rq, p); queued = task_on_rq_queued(p); ncsw = 0; diff --git a/debian/patches-rt/ptrace-fix-ptrace_unfreeze_traced-race-with-rt-lock.patch b/debian/patches-rt/ptrace-fix-ptrace_unfreeze_traced-race-with-rt-lock.patch index ef99ebb20..1cf15206e 100644 --- a/debian/patches-rt/ptrace-fix-ptrace_unfreeze_traced-race-with-rt-lock.patch +++ b/debian/patches-rt/ptrace-fix-ptrace_unfreeze_traced-race-with-rt-lock.patch @@ -1,7 +1,7 @@ From: Oleg Nesterov <oleg@redhat.com> Date: Tue, 3 Nov 2020 12:39:01 +0100 Subject: [PATCH] ptrace: fix ptrace_unfreeze_traced() race with rt-lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The patch "ptrace: fix ptrace vs tasklist_lock race" changed ptrace_freeze_traced() to take task->saved_state into account, but diff --git a/debian/patches-rt/random-make-it-work-on-rt.patch b/debian/patches-rt/random-make-it-work-on-rt.patch index b5b639de6..b7a3d49e5 100644 --- a/debian/patches-rt/random-make-it-work-on-rt.patch +++ b/debian/patches-rt/random-make-it-work-on-rt.patch @@ -1,7 +1,7 @@ Subject: random: Make it work on rt From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 21 Aug 2012 20:38:50 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Delegate the random insertion to the forced threaded interrupt handler. Store the return IP of the hard interrupt handler in the irq diff --git a/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch b/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch index b642025d3..719e2e771 100644 --- a/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch +++ b/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch @@ -2,7 +2,7 @@ From: Scott Wood <swood@redhat.com> Date: Wed, 11 Sep 2019 17:57:29 +0100 Subject: [PATCH] rcutorture: Avoid problematic critical section nesting on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz rcutorture was generating some nesting scenarios that are not reasonable. Constrain the state selection to avoid them. diff --git a/debian/patches-rt/rt-introduce-cpu-chill.patch b/debian/patches-rt/rt-introduce-cpu-chill.patch index e566dff26..945334305 100644 --- a/debian/patches-rt/rt-introduce-cpu-chill.patch +++ b/debian/patches-rt/rt-introduce-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: rt: Introduce cpu_chill() From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 07 Mar 2012 20:51:03 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill() diff --git a/debian/patches-rt/rt-local-irq-lock.patch b/debian/patches-rt/rt-local-irq-lock.patch index bd4344a31..5102abde5 100644 --- a/debian/patches-rt/rt-local-irq-lock.patch +++ b/debian/patches-rt/rt-local-irq-lock.patch @@ -1,7 +1,7 @@ Subject: rt: Add local irq locks From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 20 Jun 2011 09:03:47 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Introduce locallock. For !RT this maps to preempt_disable()/ local_irq_disable() so there is not much that changes. For RT this will diff --git a/debian/patches-rt/sched-Fix-migration_cpu_stop-WARN.patch b/debian/patches-rt/sched-Fix-migration_cpu_stop-WARN.patch index 1baca103e..7e26adaa0 100644 --- a/debian/patches-rt/sched-Fix-migration_cpu_stop-WARN.patch +++ b/debian/patches-rt/sched-Fix-migration_cpu_stop-WARN.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Tue, 17 Nov 2020 12:14:51 +0100 Subject: [PATCH] sched: Fix migration_cpu_stop() WARN -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Oleksandr reported hitting the WARN in the 'task_rq(p) != rq' branch of migration_cpu_stop(). Valentin noted that using cpu_of(rq) in that @@ -21,7 +21,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1915,7 +1915,7 @@ static int migration_cpu_stop(void *data +@@ -1913,7 +1913,7 @@ static int migration_cpu_stop(void *data * and we should be valid again. Nothing to do. */ if (!pending) { @@ -30,7 +30,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> goto out; } -@@ -1943,7 +1943,7 @@ static int migration_cpu_stop(void *data +@@ -1941,7 +1941,7 @@ static int migration_cpu_stop(void *data * valid again. Nothing to do. */ if (!pending) { diff --git a/debian/patches-rt/sched-Unlock-the-rq-in-affine_move_task-error-path.patch b/debian/patches-rt/sched-Unlock-the-rq-in-affine_move_task-error-path.patch index 47ff25dea..ddc4a5af9 100644 --- a/debian/patches-rt/sched-Unlock-the-rq-in-affine_move_task-error-path.patch +++ b/debian/patches-rt/sched-Unlock-the-rq-in-affine_move_task-error-path.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 9 Nov 2020 15:54:03 +0100 Subject: [PATCH] sched: Unlock the rq in affine_move_task() error path -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Unlock the rq if returned early in the error path. @@ -14,7 +14,7 @@ Link: https://lkml.kernel.org/r/20201106203921.GA48461@zipoli.concurrent-rt.com --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2214,8 +2214,10 @@ static int affine_move_task(struct rq *r +@@ -2212,8 +2212,10 @@ static int affine_move_task(struct rq *r * * Either way, we really should have a @pending here. */ diff --git a/debian/patches-rt/sched-core-Add-missing-completion-for-affine_move_ta.patch b/debian/patches-rt/sched-core-Add-missing-completion-for-affine_move_ta.patch index 1cd23007e..ace17f11b 100644 --- a/debian/patches-rt/sched-core-Add-missing-completion-for-affine_move_ta.patch +++ b/debian/patches-rt/sched-core-Add-missing-completion-for-affine_move_ta.patch @@ -2,7 +2,7 @@ From: Valentin Schneider <valentin.schneider@arm.com> Date: Fri, 13 Nov 2020 11:24:14 +0000 Subject: [PATCH] sched/core: Add missing completion for affine_move_task() waiters -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Qian reported that some fuzzer issuing sched_setaffinity() ends up stuck on a wait_for_completion(). The problematic pattern seems to be: @@ -44,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1927,7 +1927,7 @@ static int migration_cpu_stop(void *data +@@ -1925,7 +1925,7 @@ static int migration_cpu_stop(void *data else p->wake_cpu = dest_cpu; @@ -53,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* * This happens when we get migrated between migrate_enable()'s * preempt_enable() and scheduling the stopper task. At that -@@ -1938,6 +1938,17 @@ static int migration_cpu_stop(void *data +@@ -1936,6 +1936,17 @@ static int migration_cpu_stop(void *data */ /* diff --git a/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch b/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch index 8f4d19791..bff54ba67 100644 --- a/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch +++ b/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch @@ -1,7 +1,7 @@ Subject: sched: Disable CONFIG_RT_GROUP_SCHED on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 18 Jul 2011 17:03:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Carsten reported problems when running: diff --git a/debian/patches-rt/sched-disable-ttwu-queue.patch b/debian/patches-rt/sched-disable-ttwu-queue.patch index 730b5eda3..06c13d777 100644 --- a/debian/patches-rt/sched-disable-ttwu-queue.patch +++ b/debian/patches-rt/sched-disable-ttwu-queue.patch @@ -1,7 +1,7 @@ Subject: sched: Disable TTWU_QUEUE on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 13 Sep 2011 16:42:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The queued remote wakeup mechanism can introduce rather large latencies if the number of migrated tasks is high. Disable it for RT. diff --git a/debian/patches-rt/sched-limit-nr-migrate.patch b/debian/patches-rt/sched-limit-nr-migrate.patch index 3aae2c29a..dbdb04faa 100644 --- a/debian/patches-rt/sched-limit-nr-migrate.patch +++ b/debian/patches-rt/sched-limit-nr-migrate.patch @@ -1,7 +1,7 @@ Subject: sched: Limit the number of task migrations per batch From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 06 Jun 2011 12:12:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Put an upper limit on the number of tasks which are migrated per batch to avoid large latencies. diff --git a/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch b/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch index 7e2b2139a..5042ab240 100644 --- a/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch +++ b/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch @@ -1,7 +1,7 @@ Subject: sched: Do not account rcu_preempt_depth on RT in might_sleep() From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 07 Jun 2011 09:19:06 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz RT changes the rcu_preempt_depth semantics, so we cannot check for it in might_sleep(). @@ -37,7 +37,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> /* Internal to kernel */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7877,7 +7877,7 @@ void __init sched_init(void) +@@ -7874,7 +7874,7 @@ void __init sched_init(void) #ifdef CONFIG_DEBUG_ATOMIC_SLEEP static inline int preempt_count_equals(int preempt_offset) { diff --git a/debian/patches-rt/sched-mmdrop-delayed.patch b/debian/patches-rt/sched-mmdrop-delayed.patch index 20969cf9e..d60100d0f 100644 --- a/debian/patches-rt/sched-mmdrop-delayed.patch +++ b/debian/patches-rt/sched-mmdrop-delayed.patch @@ -1,7 +1,7 @@ Subject: sched: Move mmdrop to RCU on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 06 Jun 2011 12:20:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Takes sleeping locks and calls into the memory allocator, so nothing we want to do in task switch and oder atomic contexts. @@ -78,7 +78,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> struct mm_struct *mm; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4248,9 +4248,13 @@ static struct rq *finish_task_switch(str +@@ -4245,9 +4245,13 @@ static struct rq *finish_task_switch(str * provided by mmdrop(), * - a sync_core for SYNC_CORE. */ @@ -93,7 +93,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } if (unlikely(prev_state == TASK_DEAD)) { if (prev->sched_class->task_dead) -@@ -7265,6 +7269,7 @@ void sched_setnuma(struct task_struct *p +@@ -7262,6 +7266,7 @@ void sched_setnuma(struct task_struct *p #endif /* CONFIG_NUMA_BALANCING */ #ifdef CONFIG_HOTPLUG_CPU diff --git a/debian/patches-rt/scsi-fcoe-rt-aware.patch b/debian/patches-rt/scsi-fcoe-rt-aware.patch index 991f57a6c..b6d9fe9f2 100644 --- a/debian/patches-rt/scsi-fcoe-rt-aware.patch +++ b/debian/patches-rt/scsi-fcoe-rt-aware.patch @@ -1,7 +1,7 @@ Subject: scsi/fcoe: Make RT aware. From: Thomas Gleixner <tglx@linutronix.de> Date: Sat, 12 Nov 2011 14:00:48 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Do not disable preemption while taking sleeping locks. All user look safe for migrate_diable() only. diff --git a/debian/patches-rt/series b/debian/patches-rt/series index 437631d37..3c2b5ad35 100644 --- a/debian/patches-rt/series +++ b/debian/patches-rt/series @@ -211,26 +211,33 @@ tcp-Remove-superfluous-BH-disable-around-listening_h.patch # 20210215181027.mxkzolp3fibfiwvv@linutronix.de smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch -# WIP -0001-softirq-Replace-barrier-with-cpu_relax-in-tasklet_un.patch +# Softirq + tasklet rework +# 01365633bd1c836240f9bbf86bbeee749795480a +net-arcnet-Fix-RESET-flag-handling.patch +# 2021-03-09 09:42 Thomas Gleixner [patch 00/14] tasklets: Replace the spin wait loops and make it RT safe +# 20210309084203.995862150@linutronix.de +0001-tasklets-Replace-barrier-with-cpu_relax-in-tasklet_u.patch 0002-tasklets-Use-static-inlines-for-stub-implementations.patch 0003-tasklets-Provide-tasklet_disable_in_atomic.patch -0004-tasklets-Replace-spin-wait-in-tasklet_unlock_wait.patch -0005-tasklets-Replace-spin-wait-in-tasklet_kill.patch -0006-tasklets-Prevent-tasklet_unlock_spin_wait-deadlock-o.patch -0007-softirq-Add-RT-specific-softirq-accounting.patch -0008-irqtime-Make-accounting-correct-on-RT.patch -0009-softirq-Move-various-protections-into-inline-helpers.patch -0010-softirq-Make-softirq-control-and-processing-RT-aware.patch -0011-tick-sched-Prevent-false-positive-softirq-pending-wa.patch -0012-rcu-Prevent-false-positive-softirq-warning-on-RT.patch -0013-net-jme-Replace-link-change-tasklet-with-a-worker.patch -0014-net-arcnet-Fix-RESET-flag-handling.patch -0015-net-sundance-Use-tasklet_disable_in_atomic.patch -0016-ath9k-Use-tasklet_disable_in_atomic.patch -0017-PCI-hv-Use-tasklet_disable_in_atomic.patch -0018-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch -0019-firewire-ohci-Use-tasklet_disable_in_atomic-in-the-t.patch +0004-tasklets-Use-spin-wait-in-tasklet_disable-temporaril.patch +0005-tasklets-Replace-spin-wait-in-tasklet_unlock_wait.patch +0006-tasklets-Replace-spin-wait-in-tasklet_kill.patch +0007-tasklets-Prevent-tasklet_unlock_spin_wait-deadlock-o.patch +0008-net-jme-Replace-link-change-tasklet-with-work.patch +0009-net-sundance-Use-tasklet_disable_in_atomic.patch +0010-ath9k-Use-tasklet_disable_in_atomic.patch +0011-atm-eni-Use-tasklet_disable_in_atomic-in-the-send-ca.patch +0012-PCI-hv-Use-tasklet_disable_in_atomic.patch +0013-firewire-ohci-Use-tasklet_disable_in_atomic-where-re.patch +0014-tasklets-Switch-tasklet_disable-to-the-sleep-wait-va.patch +# 2021-03-09 09:55 Thomas Gleixner [patch V3 0/6] softirq: Add RT specific softirq accounting +# 20210309085552.815026890@linutronix.de +0015-softirq-Add-RT-specific-softirq-accounting.patch +0016-irqtime-Make-accounting-correct-on-RT.patch +0017-softirq-Move-various-protections-into-inline-helpers.patch +0018-softirq-Make-softirq-control-and-processing-RT-aware.patch +0019-tick-sched-Prevent-false-positive-softirq-pending-wa.patch +0020-rcu-Prevent-false-positive-softirq-warning-on-RT.patch # 20210202170104.1909200-1-bigeasy@linutronix.de 0001-chelsio-cxgb-Replace-the-workqueue-with-threaded-int.patch @@ -326,6 +333,7 @@ oleg-signal-rt-fix.patch 0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch 0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch mm-slub-Always-flush-the-delayed-empty-slubs-in-flus.patch +mm-slub-Don-t-resize-the-location-tracking-cache-on-.patch mm-page_alloc-Use-migrate_disable-in-drain_local_pag.patch mm-page_alloc-rt-friendly-per-cpu-pages.patch diff --git a/debian/patches-rt/shmem-Use-raw_spinlock_t-for-stat_lock.patch b/debian/patches-rt/shmem-Use-raw_spinlock_t-for-stat_lock.patch index 85c864517..caf13e969 100644 --- a/debian/patches-rt/shmem-Use-raw_spinlock_t-for-stat_lock.patch +++ b/debian/patches-rt/shmem-Use-raw_spinlock_t-for-stat_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 14 Aug 2020 18:53:34 +0200 Subject: [PATCH] shmem: Use raw_spinlock_t for ->stat_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Each CPU has SHMEM_INO_BATCH inodes available in `->ino_batch' which is per-CPU. Access here is serialized by disabling preemption. If the pool is diff --git a/debian/patches-rt/signal-Prevent-double-free-of-user-struct.patch b/debian/patches-rt/signal-Prevent-double-free-of-user-struct.patch index adbcd567b..3a5f3f2fd 100644 --- a/debian/patches-rt/signal-Prevent-double-free-of-user-struct.patch +++ b/debian/patches-rt/signal-Prevent-double-free-of-user-struct.patch @@ -1,7 +1,7 @@ From: Matt Fleming <matt@codeblueprint.co.uk> Date: Tue, 7 Apr 2020 10:54:13 +0100 Subject: [PATCH] signal: Prevent double-free of user struct -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The way user struct reference counting works changed significantly with, diff --git a/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch b/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch index b66a710ae..e5632f4e7 100644 --- a/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch +++ b/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch @@ -1,7 +1,7 @@ Subject: signal: Revert ptrace preempt magic From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 21 Sep 2011 19:57:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more than a bandaid around the ptrace design trainwreck. It's not a diff --git a/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch b/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch index 5287e72c3..618b4aadd 100644 --- a/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch +++ b/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 3 Jul 2009 08:44:56 -0500 Subject: signals: Allow rt tasks to cache one sigqueue struct -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. diff --git a/debian/patches-rt/skbufhead-raw-lock.patch b/debian/patches-rt/skbufhead-raw-lock.patch index f015baa76..166de0781 100644 --- a/debian/patches-rt/skbufhead-raw-lock.patch +++ b/debian/patches-rt/skbufhead-raw-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 12 Jul 2011 15:38:34 +0200 Subject: net: Use skbufhead with raw lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Use the rps lock as rawlock so we can keep irq-off regions. It looks low latency. However we can't kfree() from this context therefore we defer this @@ -55,7 +55,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #endif } -@@ -11181,7 +11181,7 @@ static int __init net_dev_init(void) +@@ -11226,7 +11226,7 @@ static int __init net_dev_init(void) INIT_WORK(flush, flush_backlog); diff --git a/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch b/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch index 63fa9c2f5..ab995c23b 100644 --- a/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch +++ b/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 15 Apr 2015 19:00:47 +0200 Subject: slub: Disable SLUB_CPU_PARTIAL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 87, name: rcuop/7 @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/init/Kconfig +++ b/init/Kconfig -@@ -1974,7 +1974,7 @@ config SHUFFLE_PAGE_ALLOCATOR +@@ -1985,7 +1985,7 @@ config SHUFFLE_PAGE_ALLOCATOR config SLUB_CPU_PARTIAL default y diff --git a/debian/patches-rt/slub-enable-irqs-for-no-wait.patch b/debian/patches-rt/slub-enable-irqs-for-no-wait.patch index c0395deae..8fd238f8c 100644 --- a/debian/patches-rt/slub-enable-irqs-for-no-wait.patch +++ b/debian/patches-rt/slub-enable-irqs-for-no-wait.patch @@ -1,7 +1,7 @@ Subject: slub: Enable irqs for __GFP_WAIT From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 09 Jan 2013 12:08:15 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz SYSTEM_RUNNING might be too late for enabling interrupts. Allocations with GFP_WAIT can happen before that. So use this as an indicator. diff --git a/debian/patches-rt/smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch b/debian/patches-rt/smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch index 069d51e1c..9319a31a2 100644 --- a/debian/patches-rt/smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch +++ b/debian/patches-rt/smp-Wake-ksoftirqd-on-PREEMPT_RT-instead-do_softirq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 15 Feb 2021 18:44:12 +0100 Subject: [PATCH] smp: Wake ksoftirqd on PREEMPT_RT instead do_softirq(). -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz The softirq implementation on PREEMPT_RT does not provide do_softirq(). The other user of do_softirq() is replaced with a local_bh_disable() diff --git a/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch b/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch index d5b98db16..aceb6e986 100644 --- a/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch +++ b/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch @@ -1,7 +1,7 @@ Subject: softirq: Disable softirq stacks for RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 18 Jul 2011 13:59:17 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Disable extra stacks for softirqs. We want to preempt softirqs and having them on special IRQ-stack does not make this easier. @@ -20,7 +20,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c -@@ -728,10 +728,12 @@ void *mcheckirq_ctx[NR_CPUS] __read_most +@@ -753,10 +753,12 @@ void *mcheckirq_ctx[NR_CPUS] __read_most void *softirq_ctx[NR_CPUS] __read_mostly; void *hardirq_ctx[NR_CPUS] __read_mostly; diff --git a/debian/patches-rt/softirq-preempt-fix-3-re.patch b/debian/patches-rt/softirq-preempt-fix-3-re.patch index 128daa1c0..3980e6656 100644 --- a/debian/patches-rt/softirq-preempt-fix-3-re.patch +++ b/debian/patches-rt/softirq-preempt-fix-3-re.patch @@ -1,7 +1,7 @@ Subject: softirq: Check preemption after reenabling interrupts From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 13 Nov 2011 17:17:09 +0100 (CET) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, @@ -101,7 +101,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(__dev_kfree_skb_irq); -@@ -4559,6 +4561,7 @@ static int enqueue_to_backlog(struct sk_ +@@ -4560,6 +4562,7 @@ static int enqueue_to_backlog(struct sk_ rps_unlock(sd); local_irq_restore(flags); @@ -109,7 +109,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> atomic_long_inc(&skb->dev->rx_dropped); kfree_skb(skb); -@@ -6275,12 +6278,14 @@ static void net_rps_action_and_irq_enabl +@@ -6278,12 +6281,14 @@ static void net_rps_action_and_irq_enabl sd->rps_ipi_list = NULL; local_irq_enable(); @@ -124,7 +124,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) -@@ -6358,6 +6363,7 @@ void __napi_schedule(struct napi_struct +@@ -6361,6 +6366,7 @@ void __napi_schedule(struct napi_struct local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); @@ -132,7 +132,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(__napi_schedule); -@@ -10847,6 +10853,7 @@ static int dev_cpu_dead(unsigned int old +@@ -10892,6 +10898,7 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); diff --git a/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch b/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch index 26e276770..411dda817 100644 --- a/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch +++ b/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch @@ -1,7 +1,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Wed, 18 Feb 2015 16:05:28 +0100 Subject: sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 3194, name: rpc.nfsd diff --git a/debian/patches-rt/sysfs-realtime-entry.patch b/debian/patches-rt/sysfs-realtime-entry.patch index 962a321ed..c5084dd2b 100644 --- a/debian/patches-rt/sysfs-realtime-entry.patch +++ b/debian/patches-rt/sysfs-realtime-entry.patch @@ -1,7 +1,7 @@ Subject: sysfs: Add /sys/kernel/realtime entry From: Clark Williams <williams@redhat.com> Date: Sat Jul 30 21:55:53 2011 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. diff --git a/debian/patches-rt/tcp-Remove-superfluous-BH-disable-around-listening_h.patch b/debian/patches-rt/tcp-Remove-superfluous-BH-disable-around-listening_h.patch index f549ee5b6..668e1cce4 100644 --- a/debian/patches-rt/tcp-Remove-superfluous-BH-disable-around-listening_h.patch +++ b/debian/patches-rt/tcp-Remove-superfluous-BH-disable-around-listening_h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 12 Oct 2020 17:33:54 +0200 Subject: [PATCH] tcp: Remove superfluous BH-disable around listening_hash -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Commit 9652dc2eb9e40 ("tcp: relax listening_hash operations") diff --git a/debian/patches-rt/timers-Don-t-block-on-expiry_lock-for-TIMER_IRQSAFE.patch b/debian/patches-rt/timers-Don-t-block-on-expiry_lock-for-TIMER_IRQSAFE.patch index 61f25d30b..4a4920103 100644 --- a/debian/patches-rt/timers-Don-t-block-on-expiry_lock-for-TIMER_IRQSAFE.patch +++ b/debian/patches-rt/timers-Don-t-block-on-expiry_lock-for-TIMER_IRQSAFE.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 2 Nov 2020 14:14:24 +0100 Subject: [PATCH] timers: Don't block on ->expiry_lock for TIMER_IRQSAFE -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz PREEMPT_RT does not spin and wait until a running timer completes its callback but instead it blocks on a sleeping lock to prevent a deadlock. diff --git a/debian/patches-rt/timers-Move-clearing-of-base-timer_running-under-bas.patch b/debian/patches-rt/timers-Move-clearing-of-base-timer_running-under-bas.patch index fc09537a1..3de109e70 100644 --- a/debian/patches-rt/timers-Move-clearing-of-base-timer_running-under-bas.patch +++ b/debian/patches-rt/timers-Move-clearing-of-base-timer_running-under-bas.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 6 Dec 2020 22:40:07 +0100 Subject: [PATCH] timers: Move clearing of base::timer_running under base::lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz syzbot reported KCSAN data races vs. timer_base::timer_running being set to NULL without holding base::lock in expire_timers(). diff --git a/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch b/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch index 8b645e067..ddf97b981 100644 --- a/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch +++ b/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 11 Feb 2019 11:33:11 +0100 Subject: [PATCH] tpm: remove tpm_dev_wq_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Added in commit diff --git a/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch b/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch index 023c59842..14f4c9e6b 100644 --- a/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch +++ b/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch @@ -1,7 +1,7 @@ From: Haris Okanovic <haris.okanovic@ni.com> Date: Tue, 15 Aug 2017 15:13:08 -0500 Subject: [PATCH] tpm_tis: fix stall after iowrite*()s -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz ioread8() operations to TPM MMIO addresses can stall the cpu when immediately following a sequence of iowrite*()'s to the same region. diff --git a/debian/patches-rt/u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch b/debian/patches-rt/u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch index b505e53dc..3d591006a 100644 --- a/debian/patches-rt/u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch +++ b/debian/patches-rt/u64_stats-Disable-preemption-on-32bit-UP-SMP-with-RT.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 17 Aug 2020 12:28:10 +0200 Subject: [PATCH] u64_stats: Disable preemption on 32bit-UP/SMP with RT during updates -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz On RT the seqcount_t is required even on UP because the softirq can be preempted. The IRQ handler is threaded so it is also preemptible. diff --git a/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch b/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch index 1cf9721e3..21f30ffdf 100644 --- a/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch +++ b/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch @@ -1,7 +1,7 @@ Subject: net: Remove preemption disabling in netif_rx() From: Priyanka Jain <Priyanka.Jain@freescale.com> Date: Thu, 17 May 2012 09:35:11 +0530 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz 1)enqueue_to_backlog() (called from netif_rx) should be bind to a particluar CPU. This can be achieved by @@ -35,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4781,7 +4781,7 @@ static int netif_rx_internal(struct sk_b +@@ -4782,7 +4782,7 @@ static int netif_rx_internal(struct sk_b struct rps_dev_flow voidflow, *rflow = &voidflow; int cpu; @@ -44,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> rcu_read_lock(); cpu = get_rps_cpu(skb->dev, skb, &rflow); -@@ -4791,14 +4791,14 @@ static int netif_rx_internal(struct sk_b +@@ -4792,14 +4792,14 @@ static int netif_rx_internal(struct sk_b ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); rcu_read_unlock(); diff --git a/debian/patches-rt/wait.h-include-atomic.h.patch b/debian/patches-rt/wait.h-include-atomic.h.patch index cc275afc8..6d3f69cf9 100644 --- a/debian/patches-rt/wait.h-include-atomic.h.patch +++ b/debian/patches-rt/wait.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 28 Oct 2013 12:19:57 +0100 Subject: wait.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz | CC init/main.o |In file included from include/linux/mmzone.h:9:0, diff --git a/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch b/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch index 98f149c86..c4b9e44e9 100644 --- a/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch +++ b/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 7 Nov 2019 17:49:20 +0100 Subject: [PATCH] x86: Enable RT also on 32bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- diff --git a/debian/patches-rt/x86-Enable-RT.patch b/debian/patches-rt/x86-Enable-RT.patch index 2f3c33c01..3acd4514d 100644 --- a/debian/patches-rt/x86-Enable-RT.patch +++ b/debian/patches-rt/x86-Enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 7 Aug 2019 18:15:38 +0200 Subject: [PATCH] x86: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Allow to select RT. diff --git a/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch b/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch index 21d73f46f..6dadc471d 100644 --- a/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch +++ b/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch @@ -1,7 +1,7 @@ Subject: x86: crypto: Reduce preempt disabled regions From: Peter Zijlstra <peterz@infradead.org> Date: Mon, 14 Nov 2011 18:19:27 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions. diff --git a/debian/patches-rt/x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch b/debian/patches-rt/x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch index ad7fb9237..1d3bbc6d9 100644 --- a/debian/patches-rt/x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch +++ b/debian/patches-rt/x86-entry-Use-should_resched-in-idtentry_exit_cond_r.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 30 Jun 2020 11:45:14 +0200 Subject: [PATCH] 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.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.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 diff --git a/debian/patches-rt/x86-fpu-Make-kernel-FPU-protection-RT-friendly.patch b/debian/patches-rt/x86-fpu-Make-kernel-FPU-protection-RT-friendly.patch index a2cde055a..c946e41d9 100644 --- a/debian/patches-rt/x86-fpu-Make-kernel-FPU-protection-RT-friendly.patch +++ b/debian/patches-rt/x86-fpu-Make-kernel-FPU-protection-RT-friendly.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 27 Oct 2020 11:09:51 +0100 Subject: [PATCH] x86/fpu: Make kernel FPU protection RT friendly -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Non RT kernels need to protect FPU against preemption and bottom half processing. This is achieved by disabling bottom halfs via diff --git a/debian/patches-rt/x86-fpu-Simplify-fpregs_-un-lock.patch b/debian/patches-rt/x86-fpu-Simplify-fpregs_-un-lock.patch index 34ca74e53..1c39194ae 100644 --- a/debian/patches-rt/x86-fpu-Simplify-fpregs_-un-lock.patch +++ b/debian/patches-rt/x86-fpu-Simplify-fpregs_-un-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 27 Oct 2020 11:09:50 +0100 Subject: [PATCH] x86/fpu: Simplify fpregs_[un]lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz There is no point in disabling preemption and then disabling bottom halfs. diff --git a/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch b/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch index a0f8f0f33..08d5ea55f 100644 --- a/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch +++ b/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch @@ -1,7 +1,7 @@ Subject: x86: kvm Require const tsc for RT From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 06 Nov 2011 12:26:18 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Non constant TSC is a nightmare on bare metal already, but with virtualization it becomes a complete disaster because the workarounds diff --git a/debian/patches-rt/x86-preempt-lazy.patch b/debian/patches-rt/x86-preempt-lazy.patch index b842bb151..b12c07dba 100644 --- a/debian/patches-rt/x86-preempt-lazy.patch +++ b/debian/patches-rt/x86-preempt-lazy.patch @@ -1,7 +1,7 @@ Subject: x86: Support for lazy preemption From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 01 Nov 2012 11:03:47 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz Implement the x86 pieces for lazy preempt. diff --git a/debian/patches-rt/x86-stackprot-no-random-on-rt.patch b/debian/patches-rt/x86-stackprot-no-random-on-rt.patch index 3b9acd256..6058e39bc 100644 --- a/debian/patches-rt/x86-stackprot-no-random-on-rt.patch +++ b/debian/patches-rt/x86-stackprot-no-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 16 Dec 2010 14:25:18 +0100 Subject: x86: stackprotector: Avoid random pool on rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.17-rt32.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.10/older/patches-5.10.21-rt34.tar.xz CPU bringup calls into the random pool to initialize the stack canary. During boot that works nicely even on RT as the might sleep |