From dc06784bb990fcfe64cfd623cf65c59f7ccd400a Mon Sep 17 00:00:00 2001 From: CBL-Mariner Servicing Account Date: Thu, 30 Jan 2025 19:32:28 +0000 Subject: [PATCH 1/2] Kernel-rt upgrade to 6.6.65.1 version --- SPECS-EXTENDED/kernel-rt/config | 2 +- .../kernel-rt/kernel-rt.signatures.json | 4 +- SPECS-EXTENDED/kernel-rt/kernel-rt.spec | 7 +- ....44-rt39.patch => patch-6.6.65-rt47.patch} | 2326 +++++++++++------ cgmanifest.json | 4 +- 5 files changed, 1586 insertions(+), 757 deletions(-) rename SPECS-EXTENDED/kernel-rt/{patch-6.6.44-rt39.patch => patch-6.6.65-rt47.patch} (93%) diff --git a/SPECS-EXTENDED/kernel-rt/config b/SPECS-EXTENDED/kernel-rt/config index 6bb08f08746..019d287ebbd 100644 --- a/SPECS-EXTENDED/kernel-rt/config +++ b/SPECS-EXTENDED/kernel-rt/config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86_64 6.6.44.1 Kernel Configuration +# Linux/x86_64 6.6.65.1 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0" CONFIG_CC_IS_GCC=y diff --git a/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json b/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json index 3f20214235b..78a4b9816cc 100644 --- a/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json +++ b/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json @@ -1,10 +1,10 @@ { "Signatures": { "cbl-mariner-ca-20211013.pem": "5ef124b0924cb1047c111a0ecff1ae11e6ad7cac8d1d9b40f98f99334121f0b0", - "config": "2c67ae488fa1e01db4230f09fdd7f1d898ed17def7cff53da275a79e80b68548", + "config": "43963dcd73f4136fd19d7a8a9a7f51d73868744127a7871e96f57e9e3bd9152c", "cpupower": "d7518767bf2b1110d146a49c7d42e76b803f45eb8bd14d931aa6d0d346fae985", "cpupower.service": "b057fe9e5d0e8c36f485818286b80e3eba8ff66ff44797940e99b1fd5361bb98", "sha512hmac-openssl.sh": "02ab91329c4be09ee66d759e4d23ac875037c3b56e5a598e32fd1206da06a27f", - "kernel-6.6.44.1.tar.gz": "664f0c0f3c898001f624b1a028d96551fa515ab06d52e101c5f893a9dd5e395b" + "kernel-6.6.65.1.tar.gz": "fcc02a412e45f98e899b7497d0bf0fd5153873f1b4cbb920e43975bf2b2b7fb5" } } diff --git a/SPECS-EXTENDED/kernel-rt/kernel-rt.spec b/SPECS-EXTENDED/kernel-rt/kernel-rt.spec index f3b370142f7..25b72af788f 100644 --- a/SPECS-EXTENDED/kernel-rt/kernel-rt.spec +++ b/SPECS-EXTENDED/kernel-rt/kernel-rt.spec @@ -1,6 +1,6 @@ %global security_hardening none %global sha512hmac bash %{_sourcedir}/sha512hmac-openssl.sh -%global rt_version rt39 +%global rt_version rt47 %define uname_r %{version}-%{rt_version}-%{release} %define mariner_version 3 %define version_upstream %(echo %{version} | rev | cut -d'.' -f2- | rev) @@ -23,7 +23,7 @@ Summary: Realtime Linux Kernel Name: kernel-rt -Version: 6.6.44.1 +Version: 6.6.65.1 Release: 1%{?dist} License: GPLv2 Vendor: Microsoft Corporation @@ -414,6 +414,9 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg %{_sysconfdir}/bash_completion.d/bpftool %changelog +* Thu Jan 30 2025 CBL-Mariner Servicing Account - 6.6.65.1-1 +- Auto-upgrade to 6.6.65.1 + * Wed Aug 14 2024 CBL-Mariner Servicing Account - 6.6.44.1-1 - Auto-upgrade to 6.6.44.1 diff --git a/SPECS-EXTENDED/kernel-rt/patch-6.6.44-rt39.patch b/SPECS-EXTENDED/kernel-rt/patch-6.6.65-rt47.patch similarity index 93% rename from SPECS-EXTENDED/kernel-rt/patch-6.6.44-rt39.patch rename to SPECS-EXTENDED/kernel-rt/patch-6.6.65-rt47.patch index 30e8dc8dd92..c4f51ae2ade 100644 --- a/SPECS-EXTENDED/kernel-rt/patch-6.6.44-rt39.patch +++ b/SPECS-EXTENDED/kernel-rt/patch-6.6.65-rt47.patch @@ -1,7 +1,7 @@ -From c31fd57df2b7621190d30077ad57f6bb4ca387ec Mon Sep 17 00:00:00 2001 +From 491a4698831c626aa94e8ca72f26db9ed1023985 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 8 Sep 2023 18:22:48 +0200 -Subject: [PATCH 001/200] sched: Constrain locks in sched_submit_work() +Subject: [PATCH 001/208] sched: Constrain locks in sched_submit_work() Even though sched_submit_work() is ran from preemptible context, it is discouraged to have it use blocking locks due to the recursion @@ -18,10 +18,10 @@ Link: https://lkml.kernel.org/r/20230908162254.999499-2-bigeasy@linutronix.de 1 file changed, 9 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 92e4afeb71ad..849fc7d07107 100644 +index b6f922a20f83..de235dc4ed73 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6721,11 +6721,18 @@ void __noreturn do_task_dead(void) +@@ -6722,11 +6722,18 @@ void __noreturn do_task_dead(void) static inline void sched_submit_work(struct task_struct *tsk) { @@ -40,7 +40,7 @@ index 92e4afeb71ad..849fc7d07107 100644 task_flags = tsk->flags; /* * If a worker goes to sleep, notify and ask workqueue whether it -@@ -6750,6 +6757,8 @@ static inline void sched_submit_work(struct task_struct *tsk) +@@ -6751,6 +6758,8 @@ static inline void sched_submit_work(struct task_struct *tsk) * make sure to submit it to avoid deadlocks. */ blk_flush_plug(tsk->plug, true); @@ -50,12 +50,12 @@ index 92e4afeb71ad..849fc7d07107 100644 static void sched_update_worker(struct task_struct *tsk) -- -2.45.2 +2.47.1 -From 72f3810ae4e509f7480e115e674d04fa960710b8 Mon Sep 17 00:00:00 2001 +From 06d4d3a538082b4dd96d34b7c566d7375ed479f5 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 8 Sep 2023 18:22:49 +0200 -Subject: [PATCH 002/200] locking/rtmutex: Avoid unconditional slowpath for +Subject: [PATCH 002/208] locking/rtmutex: Avoid unconditional slowpath for DEBUG_RT_MUTEXES With DEBUG_RT_MUTEXES enabled the fast-path rt_mutex_cmpxchg_acquire() @@ -77,7 +77,7 @@ Link: https://lkml.kernel.org/r/20230908162254.999499-3-bigeasy@linutronix.de 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c -index 21db0df0eb00..bcec0533a0cc 100644 +index bf3a28ee7d8f..ad15a7d81e59 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -218,6 +218,11 @@ static __always_inline bool rt_mutex_cmpxchg_acquire(struct rt_mutex_base *lock, @@ -113,7 +113,7 @@ index 21db0df0eb00..bcec0533a0cc 100644 static __always_inline bool rt_mutex_cmpxchg_release(struct rt_mutex_base *lock, struct task_struct *old, struct task_struct *new) -@@ -1755,7 +1774,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1756,7 +1775,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, static __always_inline int __rt_mutex_lock(struct rt_mutex_base *lock, unsigned int state) { @@ -136,12 +136,12 @@ index d1473c624105..c7196de838ed 100644 ww_mutex_set_context_fastpath(lock, ww_ctx); return 0; -- -2.45.2 +2.47.1 -From 925e452d2b87ee4ac76c3225f60384fa1b460ef4 Mon Sep 17 00:00:00 2001 +From 7ba31bb6899058ebe32f795409fe905d76abf5e6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 8 Sep 2023 18:22:50 +0200 -Subject: [PATCH 003/200] sched: Extract __schedule_loop() +Subject: [PATCH 003/208] sched: Extract __schedule_loop() There are currently two implementations of this basic __schedule() loop, and there is soon to be a third. @@ -155,10 +155,10 @@ Link: https://lkml.kernel.org/r/20230908162254.999499-4-bigeasy@linutronix.de 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 849fc7d07107..716f521d6e3e 100644 +index de235dc4ed73..665de23656b6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6771,16 +6771,21 @@ static void sched_update_worker(struct task_struct *tsk) +@@ -6772,16 +6772,21 @@ static void sched_update_worker(struct task_struct *tsk) } } @@ -185,7 +185,7 @@ index 849fc7d07107..716f521d6e3e 100644 sched_update_worker(tsk); } EXPORT_SYMBOL(schedule); -@@ -6844,11 +6849,7 @@ void __sched schedule_preempt_disabled(void) +@@ -6845,11 +6850,7 @@ void __sched schedule_preempt_disabled(void) #ifdef CONFIG_PREEMPT_RT void __sched notrace schedule_rtlock(void) { @@ -199,12 +199,12 @@ index 849fc7d07107..716f521d6e3e 100644 NOKPROBE_SYMBOL(schedule_rtlock); #endif -- -2.45.2 +2.47.1 -From c3c52ffe17dd2b7862968e6921f42a3777cbb2d3 Mon Sep 17 00:00:00 2001 +From 4e0da8f325e37579edb4711c3ed3b1cde5a505e4 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 8 Sep 2023 18:22:51 +0200 -Subject: [PATCH 004/200] sched: Provide rt_mutex specific scheduler helpers +Subject: [PATCH 004/208] sched: Provide rt_mutex specific scheduler helpers With PREEMPT_RT there is a rt_mutex recursion problem where sched_submit_work() can use an rtlock (aka spinlock_t). More @@ -246,10 +246,10 @@ Link: https://lkml.kernel.org/r/20230908162254.999499-5-bigeasy@linutronix.de 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h -index 77f01ac385f7..67623ffd4a8e 100644 +index 3d83cc397eac..77dece2bc42a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -911,6 +911,9 @@ struct task_struct { +@@ -913,6 +913,9 @@ struct task_struct { * ->sched_remote_wakeup gets used, so it can be in this word. */ unsigned sched_remote_wakeup:1; @@ -275,10 +275,10 @@ index 994c25640e15..b2b9e6eb9683 100644 * Must hold either p->pi_lock or task_rq(p)->lock. */ diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 716f521d6e3e..c3dc0103e2f3 100644 +index 665de23656b6..397c9c525af5 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6724,9 +6724,6 @@ static inline void sched_submit_work(struct task_struct *tsk) +@@ -6725,9 +6725,6 @@ static inline void sched_submit_work(struct task_struct *tsk) static DEFINE_WAIT_OVERRIDE_MAP(sched_map, LD_WAIT_CONFIG); unsigned int task_flags; @@ -288,7 +288,7 @@ index 716f521d6e3e..c3dc0103e2f3 100644 /* * Establish LD_WAIT_CONFIG context to ensure none of the code called * will use a blocking primitive -- which would lead to recursion. -@@ -6784,7 +6781,12 @@ asmlinkage __visible void __sched schedule(void) +@@ -6785,7 +6782,12 @@ asmlinkage __visible void __sched schedule(void) { struct task_struct *tsk = current; @@ -302,7 +302,7 @@ index 716f521d6e3e..c3dc0103e2f3 100644 __schedule_loop(SM_NONE); sched_update_worker(tsk); } -@@ -7045,6 +7047,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) +@@ -7046,6 +7048,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) #ifdef CONFIG_RT_MUTEXES @@ -336,12 +336,12 @@ index 716f521d6e3e..c3dc0103e2f3 100644 { if (pi_task) -- -2.45.2 +2.47.1 -From 1714943dda97cac2e6f767914db38a7de60d3898 Mon Sep 17 00:00:00 2001 +From 821685ad6779066907ac24374451a424cc24a848 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 8 Sep 2023 18:22:52 +0200 -Subject: [PATCH 005/200] locking/rtmutex: Use rt_mutex specific scheduler +Subject: [PATCH 005/208] locking/rtmutex: Use rt_mutex specific scheduler helpers Have rt_mutex use the rt_mutex specific scheduler helpers to avoid @@ -398,7 +398,7 @@ index ce2889f12375..f8e65b27d9d6 100644 /* * Fixup the pi_state owner and possibly acquire the lock if we diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c -index bcec0533a0cc..a3fe05dfd0d8 100644 +index ad15a7d81e59..f9c66d1415d6 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -1632,7 +1632,7 @@ static int __sched rt_mutex_slowlock_block(struct rt_mutex_base *lock, @@ -410,8 +410,8 @@ index bcec0533a0cc..a3fe05dfd0d8 100644 raw_spin_lock_irq(&lock->wait_lock); set_current_state(state); -@@ -1661,7 +1661,7 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock, - WARN(1, "rtmutex deadlock detected\n"); +@@ -1662,7 +1662,7 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock, + while (1) { set_current_state(TASK_INTERRUPTIBLE); - schedule(); @@ -419,7 +419,7 @@ index bcec0533a0cc..a3fe05dfd0d8 100644 } } -@@ -1756,6 +1756,15 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1757,6 +1757,15 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, unsigned long flags; int ret; @@ -435,7 +435,7 @@ index bcec0533a0cc..a3fe05dfd0d8 100644 /* * Technically we could use raw_spin_[un]lock_irq() here, but this can * be called in early boot if the cmpxchg() fast path is disabled -@@ -1767,6 +1776,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1768,6 +1777,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, raw_spin_lock_irqsave(&lock->wait_lock, flags); ret = __rt_mutex_slowlock_locked(lock, ww_ctx, state); raw_spin_unlock_irqrestore(&lock->wait_lock, flags); @@ -527,12 +527,12 @@ index 48a19ed8486d..842037b2ba54 100644 /* * The common functions which get wrapped into the rwlock API. -- -2.45.2 +2.47.1 -From ef10de7e059aad3e8a44fa85060d9c89693ecba2 Mon Sep 17 00:00:00 2001 +From 6714b2ebcbffe3f44f7550be3242efb47843091e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 8 Sep 2023 18:22:53 +0200 -Subject: [PATCH 006/200] locking/rtmutex: Add a lockdep assert to catch +Subject: [PATCH 006/208] locking/rtmutex: Add a lockdep assert to catch potential nested blocking There used to be a BUG_ON(current->pi_blocked_on) in the lock acquisition @@ -554,10 +554,10 @@ Link: https://lkml.kernel.org/r/20230908162254.999499-7-bigeasy@linutronix.de 3 files changed, 6 insertions(+) diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c -index a3fe05dfd0d8..4a10e8c16fd2 100644 +index f9c66d1415d6..99129c89120a 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c -@@ -1784,6 +1784,8 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1785,6 +1785,8 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, static __always_inline int __rt_mutex_lock(struct rt_mutex_base *lock, unsigned int state) { @@ -593,12 +593,12 @@ index 842037b2ba54..38e292454fcc 100644 rtlock_slowlock(rtm); } -- -2.45.2 +2.47.1 -From 6cde51509c49f25edd00a7b55365ef1a4c061d96 Mon Sep 17 00:00:00 2001 +From d9782a88de064addc8d1f22d1cad46874183ed9b Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 15 Sep 2023 17:19:44 +0200 -Subject: [PATCH 007/200] futex/pi: Fix recursive rt_mutex waiter state +Subject: [PATCH 007/208] futex/pi: Fix recursive rt_mutex waiter state Some new assertions pointed out that the existing code has nested rt_mutex wait state in the futex code. @@ -797,12 +797,12 @@ index cba8b1a6a4cc..4c73e0b81acc 100644 /* * Fixup the pi_state owner and possibly acquire the lock if we -- -2.45.2 +2.47.1 -From 54d7bb86c6afda9a4f6420dfe10f08ed7b89a9c8 Mon Sep 17 00:00:00 2001 +From a86cd7b96c676490ce8e1dff4bc533d26adc8e1f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 3 Aug 2023 12:09:31 +0200 -Subject: [PATCH 008/200] signal: Add proper comment about the preempt-disable +Subject: [PATCH 008/208] signal: Add proper comment about the preempt-disable in ptrace_stop(). Commit 53da1d9456fe7 ("fix ptrace slowness") added a preempt-disable section @@ -820,10 +820,10 @@ Link: https://lore.kernel.org/r/20230803100932.325870-2-bigeasy@linutronix.de 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c -index 21903f524ef8..83865eeaadc5 100644 +index 49c8c24b444d..f14b6be19e79 100644 --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -2329,10 +2329,21 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, +@@ -2331,10 +2331,21 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, do_notify_parent_cldstop(current, false, why); /* @@ -849,12 +849,12 @@ index 21903f524ef8..83865eeaadc5 100644 preempt_disable(); read_unlock(&tasklist_lock); -- -2.45.2 +2.47.1 -From 6eabd5ae946e572aaf30aa9db6e99cf9a165fa13 Mon Sep 17 00:00:00 2001 +From 412cdcfb58545b8782d5c4999be3c1645f27da02 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 3 Aug 2023 12:09:32 +0200 -Subject: [PATCH 009/200] signal: Don't disable preemption in ptrace_stop() on +Subject: [PATCH 009/208] signal: Don't disable preemption in ptrace_stop() on PREEMPT_RT. On PREEMPT_RT keeping preemption disabled during the invocation of @@ -875,10 +875,10 @@ Link: https://lore.kernel.org/r/20230803100932.325870-3-bigeasy@linutronix.de 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c -index 83865eeaadc5..9f240d9cb240 100644 +index f14b6be19e79..107953e8a90c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -2344,11 +2344,20 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, +@@ -2346,11 +2346,20 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, * The preempt-disable section ensures that there will be no preemption * between unlock and schedule() and so improving the performance since * the ptracer has no reason to sleep. @@ -902,12 +902,12 @@ index 83865eeaadc5..9f240d9cb240 100644 cgroup_leave_frozen(true); -- -2.45.2 +2.47.1 -From 7205a8cde8bd8e87f1c02d4f38ca4b91f40506a9 Mon Sep 17 00:00:00 2001 +From 0dc191acb1ac7e51135e1f344f280044fc698ee0 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2023 16:15:12 +0200 -Subject: [PATCH 010/200] drm/amd/display: Remove migrate_en/dis from +Subject: [PATCH 010/208] drm/amd/display: Remove migrate_en/dis from dc_fpu_begin(). This is a revert of the commit mentioned below while it is not wrong, as @@ -993,12 +993,12 @@ index 172aa10a8800..86f4c0e04654 100644 if (cpu_has_feature(CPU_FTR_VSX_COMP)) { disable_kernel_vsx(); -- -2.45.2 +2.47.1 -From 48035cee8f31618a1500e94836463901ddf78dce Mon Sep 17 00:00:00 2001 +From f477c574833155c0a1987d9f82c2992a03dd1dbf Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2023 16:15:13 +0200 -Subject: [PATCH 011/200] drm/amd/display: Simplify the per-CPU usage. +Subject: [PATCH 011/208] drm/amd/display: Simplify the per-CPU usage. The fpu_recursion_depth counter is used to ensure that dc_fpu_begin() can be invoked multiple times while the FPU-disable function itself is @@ -1125,12 +1125,12 @@ index 86f4c0e04654..8bd5926b47e0 100644 + preempt_enable(); } -- -2.45.2 +2.47.1 -From 3dd4f1938bceeec541d5095ad8834e5e4fe376d4 Mon Sep 17 00:00:00 2001 +From f5007abe3fbe1f8fa18f75108b07fec265a028d7 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2023 16:15:14 +0200 -Subject: [PATCH 012/200] drm/amd/display: Add a warning if the FPU is used +Subject: [PATCH 012/208] drm/amd/display: Add a warning if the FPU is used outside from task context. Add a warning if the FPU is used from any context other than task @@ -1156,12 +1156,12 @@ index 8bd5926b47e0..4ae4720535a5 100644 depth = __this_cpu_inc_return(fpu_recursion_depth); -- -2.45.2 +2.47.1 -From 16504f4905da1ee14eb6883b3e1ab1141ccd97b0 Mon Sep 17 00:00:00 2001 +From 44233ad70472a8545d0b49c5ff3a66347932ed74 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2023 16:15:15 +0200 -Subject: [PATCH 013/200] drm/amd/display: Move the memory allocation out of +Subject: [PATCH 013/208] drm/amd/display: Move the memory allocation out of dcn21_validate_bandwidth_fp(). dcn21_validate_bandwidth_fp() is invoked while FPU access has been @@ -1252,12 +1252,12 @@ index c51badf7b68a..a81a0b9e6884 100644 void dcn21_clk_mgr_set_bw_params_wm_table(struct clk_bw_params *bw_params); -- -2.45.2 +2.47.1 -From 78c8dde20d1982c88d3c428dc84fcbb25a337b71 Mon Sep 17 00:00:00 2001 +From 47e4e159286ddfb0c6fdef75a6f5e26b1817cfef Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2023 16:15:16 +0200 -Subject: [PATCH 014/200] drm/amd/display: Move the memory allocation out of +Subject: [PATCH 014/208] drm/amd/display: Move the memory allocation out of dcn20_validate_bandwidth_fp(). dcn20_validate_bandwidth_fp() is invoked while FPU access has been @@ -1382,12 +1382,12 @@ index a81a0b9e6884..b6c34198ddc8 100644 struct pp_smu_wm_range_sets *ranges, struct _vcs_dpi_soc_bounding_box_st *loaded_bb); -- -2.45.2 +2.47.1 -From c3924b6f37744b4af19ce3819279c0b6b42890b3 Mon Sep 17 00:00:00 2001 +From 20c81465588543a547507aa64dd32d77de9d46f9 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 15 Aug 2022 17:29:50 +0200 -Subject: [PATCH 015/200] net: Avoid the IPI to free the +Subject: [PATCH 015/208] net: Avoid the IPI to free the skb_attempt_defer_free() collects a skbs, which was allocated on a remote CPU, on a per-CPU list. These skbs are either freed on that @@ -1410,7 +1410,7 @@ Signed-off-by: Sebastian Andrzej Siewior 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h -index b8e60a20416b..ffa5248a90e2 100644 +index 1576e7443eee..65a58e6df3d4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3258,7 +3258,11 @@ struct softnet_data { @@ -1426,10 +1426,10 @@ index b8e60a20416b..ffa5248a90e2 100644 static inline void input_queue_head_incr(struct softnet_data *sd) diff --git a/net/core/dev.c b/net/core/dev.c -index 5a5bd339f11e..8f193d7b8b41 100644 +index 4beb9acf2c18..aa8894995dbe 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4705,15 +4705,6 @@ static void rps_trigger_softirq(void *data) +@@ -4713,15 +4713,6 @@ static void rps_trigger_softirq(void *data) #endif /* CONFIG_RPS */ @@ -1445,7 +1445,7 @@ index 5a5bd339f11e..8f193d7b8b41 100644 /* * After we queued a packet into sd->input_pkt_queue, * we need to make sure this queue is serviced soon. -@@ -6682,6 +6673,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) +@@ -6690,6 +6681,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) } } @@ -1478,7 +1478,7 @@ index 5a5bd339f11e..8f193d7b8b41 100644 static int napi_threaded_poll(void *data) { struct napi_struct *napi = data; -@@ -11619,7 +11636,11 @@ static int __init net_dev_init(void) +@@ -11627,7 +11644,11 @@ static int __init net_dev_init(void) INIT_CSD(&sd->csd, rps_trigger_softirq, sd); sd->cpu = i; #endif @@ -1510,12 +1510,12 @@ index f0a9ef1aeaa2..682175af439d 100644 static void skb_splice_csum_page(struct sk_buff *skb, struct page *page, -- -2.45.2 +2.47.1 -From d3b6df512dfe902f1d8348338c60e98dcdd7b769 Mon Sep 17 00:00:00 2001 +From 9d615370ada25f8aa1f4735457a35faafa98e12c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 7 Aug 2019 18:15:38 +0200 -Subject: [PATCH 016/200] x86: Allow to enable RT +Subject: [PATCH 016/208] x86: Allow to enable RT Allow to select RT. @@ -1526,7 +1526,7 @@ Signed-off-by: Thomas Gleixner 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 82d12c93feab..231e41817ea4 100644 +index 05c82fd5d0f6..4e12735e4a5d 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -28,6 +28,7 @@ config X86_64 @@ -1538,12 +1538,12 @@ index 82d12c93feab..231e41817ea4 100644 select HAVE_ARCH_SOFT_DIRTY select MODULES_USE_ELF_RELA -- -2.45.2 +2.47.1 -From e549b0437c804a41acecb0591ba12887411e99be Mon Sep 17 00:00:00 2001 +From 9b19b6e5c438c297ccd9c1141ef1a9856d1521ed Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 7 Nov 2019 17:49:20 +0100 -Subject: [PATCH 017/200] x86: Enable RT also on 32bit +Subject: [PATCH 017/208] x86: Enable RT also on 32bit Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner @@ -1552,7 +1552,7 @@ Signed-off-by: Thomas Gleixner 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 231e41817ea4..fe340c07ddbf 100644 +index 4e12735e4a5d..261188e66e78 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -28,7 +28,6 @@ config X86_64 @@ -1572,12 +1572,12 @@ index 231e41817ea4..fe340c07ddbf 100644 select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS -- -2.45.2 +2.47.1 -From 07cb5b821c910fdb8193d0e4fbd2aca82dc49a05 Mon Sep 17 00:00:00 2001 +From a6df94b596b462035d38d503412e02947a56296d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 1 Aug 2023 17:26:48 +0200 -Subject: [PATCH 018/200] sched/rt: Don't try push tasks if there are none. +Subject: [PATCH 018/208] sched/rt: Don't try push tasks if there are none. I have a RT task X at a high priority and cyclictest on each CPU with lower priority than X's. If X is active and each CPU wakes their own @@ -1635,12 +1635,12 @@ index 4ac36eb4cdee..acd1510e8d47 100644 rd->rto_cpu = -1; -- -2.45.2 +2.47.1 -From 1b21c110976b90f6168e86e7bc760194bc4a7737 Mon Sep 17 00:00:00 2001 +From 15cbf306a8315f54d50955d213bcdd41d3c1f133 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 1 Dec 2021 17:41:09 +0100 -Subject: [PATCH 019/200] softirq: Use a dedicated thread for timer wakeups. +Subject: [PATCH 019/208] softirq: Use a dedicated thread for timer wakeups. A timer/hrtimer softirq is raised in-IRQ context. With threaded interrupts enabled or on PREEMPT_RT this leads to waking the ksoftirqd @@ -1833,10 +1833,10 @@ index bd9716d7bb63..0e43058c2e58 100644 } early_initcall(spawn_ksoftirqd); diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c -index edb0f821dcea..a7290012179a 100644 +index 57e5cb36f1bc..c4ae45701fab 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c -@@ -1809,7 +1809,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) +@@ -1812,7 +1812,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) if (!ktime_before(now, cpu_base->softirq_expires_next)) { cpu_base->softirq_expires_next = KTIME_MAX; cpu_base->softirq_activated = 1; @@ -1845,7 +1845,7 @@ index edb0f821dcea..a7290012179a 100644 } __hrtimer_run_queues(cpu_base, now, flags, HRTIMER_ACTIVE_HARD); -@@ -1922,7 +1922,7 @@ void hrtimer_run_queues(void) +@@ -1925,7 +1925,7 @@ void hrtimer_run_queues(void) if (!ktime_before(now, cpu_base->softirq_expires_next)) { cpu_base->softirq_expires_next = KTIME_MAX; cpu_base->softirq_activated = 1; @@ -1868,12 +1868,12 @@ index 63a8ce7177dd..7cad6fe3c035 100644 /* -- -2.45.2 +2.47.1 -From 0a0992d76d7462ceebfafc9d57215aa3f62060d6 Mon Sep 17 00:00:00 2001 +From 569d0f717913954e00ee151578be7052b6df548c Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Tue, 5 Apr 2022 03:07:51 +0200 -Subject: [PATCH 020/200] rcutorture: Also force sched priority to timersd on +Subject: [PATCH 020/208] rcutorture: Also force sched priority to timersd on boosting test. ksoftirqd is statically boosted to the priority level right above the @@ -1918,7 +1918,7 @@ index 0efba74a835c..f459b0f27c94 100644 extern void raise_hrtimer_softirq(void); diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c -index 781146600aa4..7ee1c84b52ee 100644 +index 46612fb15fc6..f893f4cfdd38 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -2409,6 +2409,12 @@ static int rcutorture_booster_init(unsigned int cpu) @@ -1948,12 +1948,12 @@ index 0e43058c2e58..63e8b9ad2727 100644 static unsigned int local_pending_timers(void) -- -2.45.2 +2.47.1 -From 7f4ecc8e16a895bbb0f10d6d72f819152b613e10 Mon Sep 17 00:00:00 2001 +From bc2ff38659b55669db376a2386777fbdeabdb0ab Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Tue, 5 Apr 2022 03:07:52 +0200 -Subject: [PATCH 021/200] tick: Fix timer storm since introduction of timersd +Subject: [PATCH 021/208] tick: Fix timer storm since introduction of timersd If timers are pending while the tick is reprogrammed on nohz_mode, the next expiry is not armed to fire now, it is delayed one jiffy forward @@ -2063,12 +2063,12 @@ index 55cbc49f70d1..1a0ed106b192 100644 static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) -- -2.45.2 +2.47.1 -From e14b37b3ae0c307ce0b833eb4ccab314beb2a8bf Mon Sep 17 00:00:00 2001 +From a35a095b9ccc10cd274cc4e1c0e9c8fdaa2dad49 Mon Sep 17 00:00:00 2001 From: Junxiao Chang Date: Mon, 20 Feb 2023 09:12:20 +0100 -Subject: [PATCH 022/200] softirq: Wake ktimers thread also in softirq. +Subject: [PATCH 022/208] softirq: Wake ktimers thread also in softirq. If the hrtimer is raised while a softirq is processed then it does not wake the corresponding ktimers thread. This is due to the optimisation in the @@ -2112,12 +2112,12 @@ index 65477d8e00af..ea6198bf64e0 100644 tick_irq_exit(); } -- -2.45.2 +2.47.1 -From 076ad72e50ed0c20311ba6dd11b5814c113b2e46 Mon Sep 17 00:00:00 2001 +From b224b92daf9d697af17ef8a6c7824c4ba9a21297 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Thu, 31 Mar 2016 04:08:28 +0200 -Subject: [PATCH 023/200] zram: Replace bit spinlocks with spinlock_t for +Subject: [PATCH 023/208] zram: Replace bit spinlocks with spinlock_t for PREEMPT_RT. The bit spinlock disables preemption. The spinlock_t lock becomes a sleeping @@ -2138,7 +2138,7 @@ Link: https://lore.kernel.org/20230323161830.jFbWCosd@linutronix.de 2 files changed, 40 insertions(+) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c -index 06673c6ca255..a5d0f7c06342 100644 +index c29c471b6a18..e0ea17a61721 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -57,6 +57,41 @@ static void zram_free_page(struct zram *zram, size_t index); @@ -2214,12 +2214,12 @@ index ca7a15bd4845..e64eb607eb45 100644 ktime_t ac_time; #endif -- -2.45.2 +2.47.1 -From b2df669c653f2acb7afd5af4509574bcb1fe126f Mon Sep 17 00:00:00 2001 +From 138b749b4eb57890eb840e4ccf90405f7b7256d6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 8 Mar 2023 16:29:38 +0100 -Subject: [PATCH 024/200] preempt: Put preempt_enable() within an +Subject: [PATCH 024/208] preempt: Put preempt_enable() within an instrumentation*() section. Callers of preempt_enable() can be within an noinstr section leading to: @@ -2266,12 +2266,12 @@ index 9aa6358a1a16..cd16f0330fba 100644 #define preempt_check_resched() \ -- -2.45.2 +2.47.1 -From cb6aa9b55149e7c01ef15c45c09a3873376a0d2b Mon Sep 17 00:00:00 2001 +From 787626b8ba2bea21cf6397b50a50260fad98fb02 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2023 13:30:37 +0200 -Subject: [PATCH 025/200] sched/core: Provide a method to check if a task is +Subject: [PATCH 025/208] sched/core: Provide a method to check if a task is PI-boosted. Provide a method to check if a task inherited the priority from another @@ -2289,10 +2289,10 @@ Signed-off-by: Sebastian Andrzej Siewior 2 files changed, 16 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h -index 67623ffd4a8e..eab173e5d09b 100644 +index 77dece2bc42a..d3b18c00d765 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1905,6 +1905,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu +@@ -1907,6 +1907,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu } #endif @@ -2301,10 +2301,10 @@ index 67623ffd4a8e..eab173e5d09b 100644 extern void set_user_nice(struct task_struct *p, long nice); extern int task_prio(const struct task_struct *p); diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index c3dc0103e2f3..fb30aad3c1b6 100644 +index 397c9c525af5..c6b0b04a3d37 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -8923,6 +8923,21 @@ static inline void preempt_dynamic_init(void) { } +@@ -8924,6 +8924,21 @@ static inline void preempt_dynamic_init(void) { } #endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ @@ -2327,12 +2327,12 @@ index c3dc0103e2f3..fb30aad3c1b6 100644 * yield - yield the current processor to other threads. * -- -2.45.2 +2.47.1 -From 1093748bae3b49d27d22a711a359cc040cc48a9e Mon Sep 17 00:00:00 2001 +From 5c3f91456a07e3ed93e73a262cd9f4df764f020b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2023 13:30:38 +0200 -Subject: [PATCH 026/200] softirq: Add function to preempt serving softirqs. +Subject: [PATCH 026/208] softirq: Add function to preempt serving softirqs. Add a functionality for the softirq handler to preempt its current work if needed. The softirq core has no particular state. It reads and resets @@ -2394,12 +2394,12 @@ index ea6198bf64e0..2fde8af88e48 100644 * Invoked from ksoftirqd_run() outside of the interrupt disabled section * to acquire the per CPU local lock for reentrancy protection. -- -2.45.2 +2.47.1 -From 8330f8203d8688bb5ad6d4b8570f71680f4905eb Mon Sep 17 00:00:00 2001 +From 66e05588a3963feb8a39cda4f7c3c9bff90ddf6b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2023 13:30:39 +0200 -Subject: [PATCH 027/200] time: Allow to preempt after a callback. +Subject: [PATCH 027/208] time: Allow to preempt after a callback. The TIMER_SOFTIRQ handler invokes timer callbacks of the expired timers. Before each invocation the timer_base::lock is dropped. The only lock @@ -2446,12 +2446,12 @@ index 7cad6fe3c035..b3fbe97d1e34 100644 raw_spin_lock_irq(&base->lock); } -- -2.45.2 +2.47.1 -From 6cbb174a00cb86a0004e040c59f3cdc9e232d448 Mon Sep 17 00:00:00 2001 +From f5d122181868ed07cea02730815854cbbe55b9e8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:19 +0206 -Subject: [PATCH 028/200] serial: core: Use lock wrappers +Subject: [PATCH 028/208] serial: core: Use lock wrappers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -2544,12 +2544,12 @@ index 052df85dfd59..71d925e8a79b 100644 #endif /* CONFIG_MAGIC_SYSRQ_SERIAL */ -- -2.45.2 +2.47.1 -From 6a0973155e66e0c794a9d4b836231cef07146ffc Mon Sep 17 00:00:00 2001 +From 196072f47be9d723de84c033a0b215dff8e00595 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:20 +0206 -Subject: [PATCH 029/200] serial: 21285: Use port lock wrappers +Subject: [PATCH 029/208] serial: 21285: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -2624,12 +2624,12 @@ index d756fcc884cb..4de0c975ebdc 100644 static const char *serial21285_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From deeff9a4358ee6cf3b3c8c3fec09417829e1adf6 Mon Sep 17 00:00:00 2001 +From 8a934a6c4762fcc70dd60b9ade2dfd83233ebc0b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:21 +0206 -Subject: [PATCH 030/200] serial: 8250_aspeed_vuart: Use port lock wrappers +Subject: [PATCH 030/208] serial: 8250_aspeed_vuart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -2690,12 +2690,12 @@ index 4a9e71b2dbbc..021949f252f8 100644 lsr = serial_port_in(port, UART_LSR); -- -2.45.2 +2.47.1 -From 194f8956ecc544192307e5c83848dc67aad1ba48 Mon Sep 17 00:00:00 2001 +From 7428e560d5db60f90b2ef8abd4332da5128d8287 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:22 +0206 -Subject: [PATCH 031/200] serial: 8250_bcm7271: Use port lock wrappers +Subject: [PATCH 031/208] serial: 8250_bcm7271: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -2846,12 +2846,12 @@ index 9afd5979c9e0..db23b3a02aef 100644 return 0; -- -2.45.2 +2.47.1 -From f75ca1ee70d313783e05ce32e588ca41c1b710bf Mon Sep 17 00:00:00 2001 +From 822ec4f69d861e1311b91e85be940c4d600cb9eb Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:23 +0206 -Subject: [PATCH 032/200] serial: 8250: Use port lock wrappers +Subject: [PATCH 032/208] serial: 8250: Use port lock wrappers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3318,12 +3318,12 @@ index a17803da83f8..cba5a1b1030f 100644 static unsigned int probe_baud(struct uart_port *port) -- -2.45.2 +2.47.1 -From 407885d0e92f662c65b27fe9c6a8bb13feeb2a6a Mon Sep 17 00:00:00 2001 +From 032fb18a56944f5f97b0e2e97b1d500a3e0c3823 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:24 +0206 -Subject: [PATCH 033/200] serial: 8250_dma: Use port lock wrappers +Subject: [PATCH 033/208] serial: 8250_dma: Use port lock wrappers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3403,12 +3403,12 @@ index 7fa66501792d..8b30ca8fdd3f 100644 int serial8250_tx_dma(struct uart_8250_port *p) -- -2.45.2 +2.47.1 -From b53a2e919c22d5f7a214a068bf3262716b01e429 Mon Sep 17 00:00:00 2001 +From ef138210af3690da4c8e91010fe4fe1e8c0edeff Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:25 +0206 -Subject: [PATCH 034/200] serial: 8250_dw: Use port lock wrappers +Subject: [PATCH 034/208] serial: 8250_dw: Use port lock wrappers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -3477,12 +3477,12 @@ index 8aed33be2ebf..5367bcc6256c 100644 if (status & (UART_LSR_DR | UART_LSR_BI)) { dw8250_writel_ext(p, RZN1_UART_RDMACR, 0); -- -2.45.2 +2.47.1 -From f69add349f4fb4293bee743ba58c51e5bfe52477 Mon Sep 17 00:00:00 2001 +From bb8066eab7873c27049adbeb0dd25752a993352e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:26 +0206 -Subject: [PATCH 035/200] serial: 8250_exar: Use port lock wrappers +Subject: [PATCH 035/208] serial: 8250_exar: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -3534,12 +3534,12 @@ index 27430fdd9e76..17be6ad24a0f 100644 return serial8250_do_startup(port); } -- -2.45.2 +2.47.1 -From c1c6f640c501e1c7edff13e70dec543da53b619f Mon Sep 17 00:00:00 2001 +From 8173ba3e6cc190d74ee4fdacb3c558c5d2a5bdb5 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:27 +0206 -Subject: [PATCH 036/200] serial: 8250_fsl: Use port lock wrappers +Subject: [PATCH 036/208] serial: 8250_fsl: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -3602,12 +3602,12 @@ index 6af4e1c1210a..f522eb5026c9 100644 } -- -2.45.2 +2.47.1 -From 697e639468793562ed658f3c79eb26662178e439 Mon Sep 17 00:00:00 2001 +From e0878b1c322eff1bdafe522b452cf9fc77809fb6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:28 +0206 -Subject: [PATCH 037/200] serial: 8250_mtk: Use port lock wrappers +Subject: [PATCH 037/208] serial: 8250_mtk: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -3684,12 +3684,12 @@ index 28f9a2679a20..33699e86eb52 100644 if (tty_termios_baud_rate(termios)) tty_termios_encode_baud_rate(termios, baud, baud); -- -2.45.2 +2.47.1 -From 5102b1b22dd8465e266c8d83a3084969104c1bb9 Mon Sep 17 00:00:00 2001 +From 0bcde71b11e65e78708aec52754217469537812d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:29 +0206 -Subject: [PATCH 038/200] serial: 8250_omap: Use port lock wrappers +Subject: [PATCH 038/208] serial: 8250_omap: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -3725,7 +3725,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c -index 8f472a2080ff..78fc1f17d5e2 100644 +index 9ed62bc7cdd8..e687cd0daa76 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -405,7 +405,7 @@ static void omap_8250_set_termios(struct uart_port *port, @@ -3925,12 +3925,12 @@ index 8f472a2080ff..78fc1f17d5e2 100644 priv->latency = priv->calc_latency; -- -2.45.2 +2.47.1 -From 17dbdf19ef2c3a2432e801de5abd82159adfc584 Mon Sep 17 00:00:00 2001 +From 51ff5ebfbe96ca13bff3e3ecf82181b3a2fb4225 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:30 +0206 -Subject: [PATCH 039/200] serial: 8250_pci1xxxx: Use port lock wrappers +Subject: [PATCH 039/208] serial: 8250_pci1xxxx: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -3996,12 +3996,12 @@ index a3b25779d921..53e238c8cc89 100644 mutex_unlock(&tport->mutex); } -- -2.45.2 +2.47.1 -From 42e5a7eb488557ac2859b9700825bc1fa0696aab Mon Sep 17 00:00:00 2001 +From d2a06c616e3191674dc96577557d8d348659d291 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:31 +0206 -Subject: [PATCH 040/200] serial: altera_jtaguart: Use port lock wrappers +Subject: [PATCH 040/208] serial: altera_jtaguart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -4134,12 +4134,12 @@ index 5fab4c978891..7090b251dd4d 100644 #endif -- -2.45.2 +2.47.1 -From 5d770ede444d189adb4a6d958845ea18806f5c1d Mon Sep 17 00:00:00 2001 +From ce0ca45cab1d76f3b46953e0c447bf8ab46e0a00 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:32 +0206 -Subject: [PATCH 041/200] serial: altera_uart: Use port lock wrappers +Subject: [PATCH 041/208] serial: altera_uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -4255,12 +4255,12 @@ index a9c41942190c..77835ac68df2 100644 if (port->irq) free_irq(port->irq, port); -- -2.45.2 +2.47.1 -From 30e8000f988f780c233dda43feb29d47c6a398cd Mon Sep 17 00:00:00 2001 +From a58ae67b6cb6192640088c2db59c0ed114a2d1e5 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:33 +0206 -Subject: [PATCH 042/200] serial: amba-pl010: Use port lock wrappers +Subject: [PATCH 042/208] serial: amba-pl010: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -4372,12 +4372,12 @@ index b5a7404cbacb..eabbf8afc9b5 100644 } } -- -2.45.2 +2.47.1 -From b7f2ca09de1493231eb95b80e69d90112c70dd21 Mon Sep 17 00:00:00 2001 +From 6ff90bab5e0d5850d086c682586c7c1b846ea9f5 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:34 +0206 -Subject: [PATCH 043/200] serial: amba-pl011: Use port lock wrappers +Subject: [PATCH 043/208] serial: amba-pl011: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -4704,12 +4704,12 @@ index 362bbcdece0d..16c770311069 100644 clk_disable(uap->clk); -- -2.45.2 +2.47.1 -From e20d1732179f80b9884d1487de0665b693e1da13 Mon Sep 17 00:00:00 2001 +From d19d5ffd1817a32b5f98ee550c99a62c03af6d42 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:35 +0206 -Subject: [PATCH 044/200] serial: apb: Use port lock wrappers +Subject: [PATCH 044/208] serial: apb: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -4785,12 +4785,12 @@ index d3cb341f2c55..364599f256db 100644 static const char *apbuart_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From a8ec3d1c3b1e39276d58d612211e05a02ff0490f Mon Sep 17 00:00:00 2001 +From 4da8d29a45cc298452f85032cb4829e7f36e5b87 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:36 +0206 -Subject: [PATCH 045/200] serial: ar933x: Use port lock wrappers +Subject: [PATCH 045/208] serial: ar933x: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -4934,12 +4934,12 @@ index 924c1a89347c..ffd234673177 100644 local_irq_restore(flags); } -- -2.45.2 +2.47.1 -From b1a800ad483c7561bc9fb462d0ccdb57c65ac5ad Mon Sep 17 00:00:00 2001 +From 51f363b4bfe90fe30e6bac27f9f7e55053252167 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:37 +0206 -Subject: [PATCH 046/200] serial: arc_uart: Use port lock wrappers +Subject: [PATCH 046/208] serial: arc_uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5036,12 +5036,12 @@ index ad4ae19b6ce3..1aa5b2b49c26 100644 static struct console arc_console = { -- -2.45.2 +2.47.1 -From ac45992a88e13249acde64b0ac9de187761a0d01 Mon Sep 17 00:00:00 2001 +From 66b5ee00830e947bd67e78d92fc5e94096e96346 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:38 +0206 -Subject: [PATCH 047/200] serial: atmel: Use port lock wrappers +Subject: [PATCH 047/208] serial: atmel: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5077,7 +5077,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c -index 88cdafa5ac54..1946fafc3f3e 100644 +index bcca5627afac..5a3f2fc476f9 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -861,7 +861,7 @@ static void atmel_complete_tx_dma(void *arg) @@ -5160,12 +5160,12 @@ index 88cdafa5ac54..1946fafc3f3e 100644 } } -- -2.45.2 +2.47.1 -From 1eb0468843659f1f21000733fc4c62d642625111 Mon Sep 17 00:00:00 2001 +From e300155d6686e0f823c438d2018e35e45d87a136 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:39 +0206 -Subject: [PATCH 048/200] serial: bcm63xx-uart: Use port lock wrappers +Subject: [PATCH 048/208] serial: bcm63xx-uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5293,12 +5293,12 @@ index 44c27e5cefbc..b104c36ce5c0 100644 } -- -2.45.2 +2.47.1 -From d816749abf87690b8b20743c6984a4d1137e27ba Mon Sep 17 00:00:00 2001 +From e7f32706475dd021097afa8c98f49059e40c7477 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:40 +0206 -Subject: [PATCH 049/200] serial: cpm_uart: Use port lock wrappers +Subject: [PATCH 049/208] serial: cpm_uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5368,12 +5368,12 @@ index 626423022d62..be4af6eda4c2 100644 } -- -2.45.2 +2.47.1 -From 39904d1806d20a7aadc74d6797d28e95b2787ab2 Mon Sep 17 00:00:00 2001 +From 20873a791797262cbbe1ea4c186db94f11b29753 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:41 +0206 -Subject: [PATCH 050/200] serial: digicolor: Use port lock wrappers +Subject: [PATCH 050/208] serial: digicolor: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5486,12 +5486,12 @@ index 128b5479e813..5004125f3045 100644 /* Wait for transmitter to become empty */ do { -- -2.45.2 +2.47.1 -From 5a8503bc22339f64c1c53f8e6c461685d5ad7137 Mon Sep 17 00:00:00 2001 +From e585df9e7f125ed1d8a678d04d737bc0af2e722a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:42 +0206 -Subject: [PATCH 051/200] serial: dz: Use port lock wrappers +Subject: [PATCH 051/208] serial: dz: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5652,12 +5652,12 @@ index 667f52e83277..6df7af9edc1c 100644 do { trdy = dz_in(dport, DZ_CSR); -- -2.45.2 +2.47.1 -From 988cd7c9d13381daba433d0b0ae01cafe08f4798 Mon Sep 17 00:00:00 2001 +From 6eab2aa073bc40adbf34274b30f4632c3edc3bf4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:43 +0206 -Subject: [PATCH 052/200] serial: linflexuart: Use port lock wrappers +Subject: [PATCH 052/208] serial: linflexuart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5800,12 +5800,12 @@ index 249cb380c3c6..7fa809a405e8 100644 /* -- -2.45.2 +2.47.1 -From 563ebb00c3ca6553f80f3fd3068977e277b25515 Mon Sep 17 00:00:00 2001 +From 42073c35eb140ec28c7d62d841b7a68cfa31d0e5 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:44 +0206 -Subject: [PATCH 053/200] serial: fsl_lpuart: Use port lock wrappers +Subject: [PATCH 053/208] serial: fsl_lpuart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -5841,7 +5841,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c -index 385b41275e8b..71d0cbd74807 100644 +index 8bd0f8e45b14..58c2c460ccd8 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -532,9 +532,9 @@ static void lpuart_dma_tx_complete(void *arg) @@ -6143,7 +6143,7 @@ index 385b41275e8b..71d0cbd74807 100644 } /* -@@ -3092,7 +3092,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3093,7 +3093,7 @@ static int lpuart_suspend(struct device *dev) uart_suspend_port(&lpuart_reg, &sport->port); if (lpuart_uport_is_active(sport)) { @@ -6152,7 +6152,7 @@ index 385b41275e8b..71d0cbd74807 100644 if (lpuart_is_32(sport)) { /* disable Rx/Tx and interrupts */ temp = lpuart32_read(&sport->port, UARTCTRL); -@@ -3104,7 +3104,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3105,7 +3105,7 @@ static int lpuart_suspend(struct device *dev) temp &= ~(UARTCR2_TE | UARTCR2_TIE | UARTCR2_TCIE); writeb(temp, sport->port.membase + UARTCR2); } @@ -6161,7 +6161,7 @@ index 385b41275e8b..71d0cbd74807 100644 if (sport->lpuart_dma_rx_use) { /* -@@ -3117,7 +3117,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3118,7 +3118,7 @@ static int lpuart_suspend(struct device *dev) lpuart_dma_rx_free(&sport->port); /* Disable Rx DMA to use UART port as wakeup source */ @@ -6170,7 +6170,7 @@ index 385b41275e8b..71d0cbd74807 100644 if (lpuart_is_32(sport)) { temp = lpuart32_read(&sport->port, UARTBAUD); lpuart32_write(&sport->port, temp & ~UARTBAUD_RDMAE, -@@ -3126,11 +3126,11 @@ static int lpuart_suspend(struct device *dev) +@@ -3127,11 +3127,11 @@ static int lpuart_suspend(struct device *dev) writeb(readb(sport->port.membase + UARTCR5) & ~UARTCR5_RDMAS, sport->port.membase + UARTCR5); } @@ -6184,7 +6184,7 @@ index 385b41275e8b..71d0cbd74807 100644 if (lpuart_is_32(sport)) { temp = lpuart32_read(&sport->port, UARTBAUD); temp &= ~UARTBAUD_TDMAE; -@@ -3140,7 +3140,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3141,7 +3141,7 @@ static int lpuart_suspend(struct device *dev) temp &= ~UARTCR5_TDMAS; writeb(temp, sport->port.membase + UARTCR5); } @@ -6194,12 +6194,12 @@ index 385b41275e8b..71d0cbd74807 100644 dmaengine_terminate_sync(sport->dma_tx_chan); } -- -2.45.2 +2.47.1 -From 0f3ab0dac8b067770206dec4b92873e7095131c6 Mon Sep 17 00:00:00 2001 +From 7db13a33e9601c53f71f6df2597e42f0139fe23b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:45 +0206 -Subject: [PATCH 054/200] serial: icom: Use port lock wrappers +Subject: [PATCH 054/208] serial: icom: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -6350,12 +6350,12 @@ index 819f957b6b84..a75eafbcbea3 100644 static const char *icom_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From c4a77c8c6b8486697fbed0702ee80e8e49d03124 Mon Sep 17 00:00:00 2001 +From 4056f9cbcece86b17dd1c30a7bfed0cf3a1d6f1a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:46 +0206 -Subject: [PATCH 055/200] serial: imx: Use port lock wrappers +Subject: [PATCH 055/208] serial: imx: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -6391,7 +6391,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c -index a5d0df2ba5c5..267c9af4bd53 100644 +index 349d4849ba5e..3934ab8fef14 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -586,7 +586,7 @@ static void imx_uart_dma_tx_callback(void *data) @@ -6412,7 +6412,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 } /* called with port.lock taken and irqs off */ -@@ -782,11 +782,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) +@@ -797,11 +797,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -6426,7 +6426,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return ret; } -@@ -795,9 +795,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) +@@ -810,9 +810,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) { struct imx_port *sport = dev_id; @@ -6438,7 +6438,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return IRQ_HANDLED; } -@@ -911,11 +911,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) +@@ -926,11 +926,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -6452,7 +6452,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return ret; } -@@ -978,7 +978,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -993,7 +993,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) unsigned int usr1, usr2, ucr1, ucr2, ucr3, ucr4; irqreturn_t ret = IRQ_NONE; @@ -6461,7 +6461,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 usr1 = imx_uart_readl(sport, USR1); usr2 = imx_uart_readl(sport, USR2); -@@ -1048,7 +1048,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -1063,7 +1063,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) ret = IRQ_HANDLED; } @@ -6470,7 +6470,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return ret; } -@@ -1131,7 +1131,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1146,7 +1146,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) unsigned long flags; u32 ucr1; @@ -6479,7 +6479,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 ucr1 = imx_uart_readl(sport, UCR1) & ~UCR1_SNDBRK; -@@ -1140,7 +1140,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1155,7 +1155,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) imx_uart_writel(sport, ucr1, UCR1); @@ -6488,7 +6488,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 } /* -@@ -1153,9 +1153,9 @@ static void imx_uart_timeout(struct timer_list *t) +@@ -1168,9 +1168,9 @@ static void imx_uart_timeout(struct timer_list *t) unsigned long flags; if (sport->port.state) { @@ -6500,7 +6500,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); } -@@ -1185,9 +1185,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1200,9 +1200,9 @@ static void imx_uart_dma_rx_callback(void *data) status = dmaengine_tx_status(chan, sport->rx_cookie, &state); if (status == DMA_ERROR) { @@ -6512,7 +6512,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return; } -@@ -1216,9 +1216,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1231,9 +1231,9 @@ static void imx_uart_dma_rx_callback(void *data) r_bytes = rx_ring->head - rx_ring->tail; /* If we received something, check for 0xff flood */ @@ -6524,7 +6524,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 if (!(sport->port.ignore_status_mask & URXD_DUMMY_READ)) { -@@ -1476,7 +1476,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1491,7 +1491,7 @@ static int imx_uart_startup(struct uart_port *port) if (!uart_console(port) && imx_uart_dma_init(sport) == 0) dma_is_inited = 1; @@ -6533,7 +6533,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 /* Reset fifo's and state machines */ imx_uart_soft_reset(sport); -@@ -1549,7 +1549,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1564,7 +1564,7 @@ static int imx_uart_startup(struct uart_port *port) imx_uart_disable_loopback_rs485(sport); @@ -6542,7 +6542,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return 0; } -@@ -1574,21 +1574,21 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1589,21 +1589,21 @@ static void imx_uart_shutdown(struct uart_port *port) sport->dma_is_rxing = 0; } @@ -6568,7 +6568,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 /* * Stop our timer. -@@ -1599,7 +1599,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1614,7 +1614,7 @@ static void imx_uart_shutdown(struct uart_port *port) * Disable all interrupts, port and break condition. */ @@ -6577,7 +6577,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 ucr1 = imx_uart_readl(sport, UCR1); ucr1 &= ~(UCR1_TRDYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_RXDMAEN | -@@ -1621,7 +1621,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1636,7 +1636,7 @@ static void imx_uart_shutdown(struct uart_port *port) ucr4 &= ~UCR4_TCEN; imx_uart_writel(sport, ucr4, UCR4); @@ -6586,7 +6586,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 clk_disable_unprepare(sport->clk_per); clk_disable_unprepare(sport->clk_ipg); -@@ -1684,7 +1684,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1699,7 +1699,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16); quot = uart_get_divisor(port, baud); @@ -6595,7 +6595,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 /* * Read current UCR2 and save it for future use, then clear all the bits -@@ -1812,7 +1812,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1827,7 +1827,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) imx_uart_enable_ms(&sport->port); @@ -6604,7 +6604,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 } static const char *imx_uart_type(struct uart_port *port) -@@ -1874,7 +1874,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1889,7 +1889,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); @@ -6613,7 +6613,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 /* * Be careful about the order of enabling bits here. First enable the -@@ -1902,7 +1902,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1917,7 +1917,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_writel(sport, ucr1 | UCR1_RRDYEN, UCR1); imx_uart_writel(sport, ucr2 | UCR2_ATEN, UCR2); @@ -6622,7 +6622,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return 0; } -@@ -2022,9 +2022,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2037,9 +2037,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) if (sport->port.sysrq) locked = 0; else if (oops_in_progress) @@ -6634,7 +6634,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 /* * First, save UCR1/2/3 and then disable interrupts -@@ -2052,7 +2052,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2067,7 +2067,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) imx_uart_ucrs_restore(sport, &old_ucr); if (locked) @@ -6643,7 +6643,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 } /* -@@ -2210,10 +2210,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) +@@ -2225,10 +2225,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) struct imx_port *sport = container_of(t, struct imx_port, trigger_start_tx); unsigned long flags; @@ -6656,7 +6656,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return HRTIMER_NORESTART; } -@@ -2223,10 +2223,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) +@@ -2238,10 +2238,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) struct imx_port *sport = container_of(t, struct imx_port, trigger_stop_tx); unsigned long flags; @@ -6669,7 +6669,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return HRTIMER_NORESTART; } -@@ -2493,9 +2493,9 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2508,9 +2508,9 @@ static void imx_uart_restore_context(struct imx_port *sport) { unsigned long flags; @@ -6681,7 +6681,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 return; } -@@ -2510,7 +2510,7 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2525,7 +2525,7 @@ static void imx_uart_restore_context(struct imx_port *sport) imx_uart_writel(sport, sport->saved_reg[2], UCR3); imx_uart_writel(sport, sport->saved_reg[3], UCR4); sport->context_saved = false; @@ -6690,7 +6690,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 } static void imx_uart_save_context(struct imx_port *sport) -@@ -2518,7 +2518,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2533,7 +2533,7 @@ static void imx_uart_save_context(struct imx_port *sport) unsigned long flags; /* Save necessary regs */ @@ -6699,7 +6699,7 @@ index a5d0df2ba5c5..267c9af4bd53 100644 sport->saved_reg[0] = imx_uart_readl(sport, UCR1); sport->saved_reg[1] = imx_uart_readl(sport, UCR2); sport->saved_reg[2] = imx_uart_readl(sport, UCR3); -@@ -2530,7 +2530,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2545,7 +2545,7 @@ static void imx_uart_save_context(struct imx_port *sport) sport->saved_reg[8] = imx_uart_readl(sport, UBMR); sport->saved_reg[9] = imx_uart_readl(sport, IMX21_UTS); sport->context_saved = true; @@ -6709,12 +6709,12 @@ index a5d0df2ba5c5..267c9af4bd53 100644 static void imx_uart_enable_wakeup(struct imx_port *sport, bool on) -- -2.45.2 +2.47.1 -From d0590362c06b701fb827e819a69e90df87a6fd52 Mon Sep 17 00:00:00 2001 +From 4b95e23608ee64c94b4d8f10e5adfc7ca6b0b0af Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:47 +0206 -Subject: [PATCH 056/200] serial: ip22zilog: Use port lock wrappers +Subject: [PATCH 056/208] serial: ip22zilog: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -6899,12 +6899,12 @@ index 845ff706bc59..320b29cd4683 100644 if (options) uart_parse_options(options, &baud, &parity, &bits, &flow); -- -2.45.2 +2.47.1 -From 803d740abf601e7338425818456ca4364bafefa1 Mon Sep 17 00:00:00 2001 +From 6e65c5b7f3070c3a3b30ee3e2d2b793e37677799 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:48 +0206 -Subject: [PATCH 057/200] serial: jsm: Use port lock wrappers +Subject: [PATCH 057/208] serial: jsm: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7030,12 +7030,12 @@ index 222afc270c88..ce0fef7e2c66 100644 static const char *jsm_tty_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From 87ea771fb92e18a46a76b14f773b7d14b39b541f Mon Sep 17 00:00:00 2001 +From 9e23eeb1bd03dbd099a550a1ec7979f394043b01 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:49 +0206 -Subject: [PATCH 058/200] serial: liteuart: Use port lock wrappers +Subject: [PATCH 058/208] serial: liteuart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7145,12 +7145,12 @@ index d881cdd2a58f..a25ab1efe38f 100644 static int liteuart_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From e71a29106098d034f72fbfd9f305b39d1061656c Mon Sep 17 00:00:00 2001 +From 4bcc8fd30b5b3fc2b11bef65e748a0f9d5fd7b29 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:50 +0206 -Subject: [PATCH 059/200] serial: lpc32xx_hs: Use port lock wrappers +Subject: [PATCH 059/208] serial: lpc32xx_hs: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7298,12 +7298,12 @@ index b38fe4728c26..5149a947b7fe 100644 /* Don't rewrite B0 */ if (tty_termios_baud_rate(termios)) -- -2.45.2 +2.47.1 -From b78d6c9bff8c679c381526ff529e8e9b19f7b59f Mon Sep 17 00:00:00 2001 +From be7afb125a2f84b0f2bd993e75ea351cc2d3af27 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:51 +0206 -Subject: [PATCH 060/200] serial: ma35d1: Use port lock wrappers +Subject: [PATCH 060/208] serial: ma35d1: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7420,12 +7420,12 @@ index 99225f1e02ac..faccd772c68c 100644 static int __init ma35d1serial_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From d7cf2bde4b3aa96ec719e3494e97013ef453b54a Mon Sep 17 00:00:00 2001 +From d0abc97ff920eb21d3bacf00f463cf27f09c305f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:52 +0206 -Subject: [PATCH 061/200] serial: mcf: Use port lock wrappers +Subject: [PATCH 061/208] serial: mcf: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7552,12 +7552,12 @@ index aea29b4e6567..ee40af20a08f 100644 return ret; } -- -2.45.2 +2.47.1 -From 1ff623adf2fe448750b673413099670ae19e8e8f Mon Sep 17 00:00:00 2001 +From b66e4fdfd6b45dc640fd0c236dc3bcd7a035ba85 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:53 +0206 -Subject: [PATCH 062/200] serial: men_z135_uart: Use port lock wrappers +Subject: [PATCH 062/208] serial: men_z135_uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7633,12 +7633,12 @@ index d2502aaa3e8c..8048fa542fc4 100644 static const char *men_z135_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From 15a6b799e3c4ebdcaec51a530c58a747e3948ccd Mon Sep 17 00:00:00 2001 +From 330ba686e7d0296184f558ea436efe76778fa4f7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:54 +0206 -Subject: [PATCH 063/200] serial: meson: Use port lock wrappers +Subject: [PATCH 063/208] serial: meson: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7806,12 +7806,12 @@ index 9388b9ddea3b..4c1d2089a0bb 100644 } -- -2.45.2 +2.47.1 -From ba7be5d2c8fd68ef39507d76b4075875c944f0cf Mon Sep 17 00:00:00 2001 +From db4919273f991bde2350e369211bfcc0d7dfe15c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:55 +0206 -Subject: [PATCH 064/200] serial: milbeaut_usio: Use port lock wrappers +Subject: [PATCH 064/208] serial: milbeaut_usio: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -7912,12 +7912,12 @@ index 70a910085e93..db3b81f2aa57 100644 static const char *mlb_usio_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From 69b4c829c70cb28fc9756bbee6988c64eebcf881 Mon Sep 17 00:00:00 2001 +From 4a13c98fcfa5af160372adb0a98a48d7caa23eb2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:56 +0206 -Subject: [PATCH 065/200] serial: mpc52xx: Use port lock wrappers +Subject: [PATCH 065/208] serial: mpc52xx: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8006,12 +8006,12 @@ index 916507b8f31d..a252465e745f 100644 return ret; } -- -2.45.2 +2.47.1 -From 522d4cf4fd7570e943aace69bd519c33bbcf3187 Mon Sep 17 00:00:00 2001 +From 9d15971774e96562e1fba23f60fa57b7fcbe1d7f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:57 +0206 -Subject: [PATCH 066/200] serial: mps2-uart: Use port lock wrappers +Subject: [PATCH 066/208] serial: mps2-uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8114,12 +8114,12 @@ index ea5a7911cb15..2a4c09f3a834 100644 if (tty_termios_baud_rate(termios)) tty_termios_encode_baud_rate(termios, baud, baud); -- -2.45.2 +2.47.1 -From 16f935db44f676cef53c42f1e892d4d04c0a8029 Mon Sep 17 00:00:00 2001 +From c40d2abd5fbb1de4b0193f530ba243d8fe81175b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:58 +0206 -Subject: [PATCH 067/200] serial: msm: Use port lock wrappers +Subject: [PATCH 067/208] serial: msm: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8304,12 +8304,12 @@ index 90953e679e38..597264b546fd 100644 local_irq_restore(flags); } -- -2.45.2 +2.47.1 -From a66fb666a8f6237453a5617d664da08a6398f9df Mon Sep 17 00:00:00 2001 +From 7e63648d74fbd3bd9884601f215372ef14010089 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:43:59 +0206 -Subject: [PATCH 068/200] serial: mvebu-uart: Use port lock wrappers +Subject: [PATCH 068/208] serial: mvebu-uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8417,12 +8417,12 @@ index ea924e9b913b..0255646bc175 100644 static int mvebu_uart_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From 4ffa7508d4399b2d555306c60e19dc61f565366a Mon Sep 17 00:00:00 2001 +From 231f713e6b8bc4676499d5ab892dea9be3666b1d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:00 +0206 -Subject: [PATCH 069/200] serial: omap: Use port lock wrappers +Subject: [PATCH 069/208] serial: omap: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8602,12 +8602,12 @@ index 135a838f517a..f4c6ff806465 100644 } -- -2.45.2 +2.47.1 -From 9630af7ff10cc55d6e0858045d11f9d0825e7ded Mon Sep 17 00:00:00 2001 +From 831ab9da380b9041cb1951a78df92f72709b8b39 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:01 +0206 -Subject: [PATCH 070/200] serial: owl: Use port lock wrappers +Subject: [PATCH 070/208] serial: owl: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8754,12 +8754,12 @@ index e99970a9437f..919f5e5aa0f1 100644 local_irq_restore(flags); } -- -2.45.2 +2.47.1 -From e6a14428f084ac31998f206353bb23e6e1bdb46e Mon Sep 17 00:00:00 2001 +From c4d95d6f87d02580f0e9f3b268b03343ff60a4d6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:02 +0206 -Subject: [PATCH 071/200] serial: pch: Use port lock wrappers +Subject: [PATCH 071/208] serial: pch: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8839,12 +8839,12 @@ index cc83b772b7ca..436cc6d52a11 100644 spin_unlock(&priv->lock); local_irq_restore(flags); -- -2.45.2 +2.47.1 -From d23f03c0e7171f2eee1c1d48fa96b7aa987a396e Mon Sep 17 00:00:00 2001 +From 3432b6908fc2ee04021562dafac6c94fee97561d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:03 +0206 -Subject: [PATCH 072/200] serial: pic32: Use port lock wrappers +Subject: [PATCH 072/208] serial: pic32: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -8962,12 +8962,12 @@ index e308d5022b3f..3a95bf5d55d3 100644 /* serial core request to claim uart iomem */ -- -2.45.2 +2.47.1 -From 19e7a91c43af31661bd8a489bdf4afebf3f32b3a Mon Sep 17 00:00:00 2001 +From c275ec5a5cfb2cecad8c377499d672d88d0e849e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:04 +0206 -Subject: [PATCH 073/200] serial: pmac_zilog: Use port lock wrappers +Subject: [PATCH 073/208] serial: pmac_zilog: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -9199,12 +9199,12 @@ index 29bc80d39e8b..77691fbbf779 100644 /* -- -2.45.2 +2.47.1 -From b8c3a70617575cb2af23756598252c8c32bcd963 Mon Sep 17 00:00:00 2001 +From 258ac53789b22d3c8785c77b054f7e6639b849d9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:05 +0206 -Subject: [PATCH 074/200] serial: pxa: Use port lock wrappers +Subject: [PATCH 074/208] serial: pxa: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -9354,12 +9354,12 @@ index 73c60f5ea027..46e70e155aab 100644 clk_disable(up->clk); -- -2.45.2 +2.47.1 -From b44dfb541c91e86c799d9dbaa894ba78ce0ef3f4 Mon Sep 17 00:00:00 2001 +From 7cd97217de35de7a7c5470a9efd2f197bfceb34b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:06 +0206 -Subject: [PATCH 075/200] serial: qcom-geni: Use port lock wrappers +Subject: [PATCH 075/208] serial: qcom-geni: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -9396,10 +9396,10 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c -index 2e1b1c827dfe..549909644011 100644 +index f820a09cb5c3..a7db08431ef3 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c -@@ -482,9 +482,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -492,9 +492,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, uport = &port->uport; if (oops_in_progress) @@ -9411,7 +9411,7 @@ index 2e1b1c827dfe..549909644011 100644 geni_status = readl(uport->membase + SE_GENI_STATUS); -@@ -520,7 +520,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -530,7 +530,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, qcom_geni_serial_setup_tx(uport, port->tx_remaining); if (locked) @@ -9420,7 +9420,7 @@ index 2e1b1c827dfe..549909644011 100644 } static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop) -@@ -972,7 +972,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) +@@ -992,7 +992,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) if (uport->suspended) return IRQ_NONE; @@ -9430,12 +9430,12 @@ index 2e1b1c827dfe..549909644011 100644 m_irq_status = readl(uport->membase + SE_GENI_M_IRQ_STATUS); s_irq_status = readl(uport->membase + SE_GENI_S_IRQ_STATUS); -- -2.45.2 +2.47.1 -From e6264d9a7b7c1601bd9e4060d57d061a7e139ebd Mon Sep 17 00:00:00 2001 +From 3cf36ce0f7a1e1b9ecc388851898fc33bc8de3f7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:07 +0206 -Subject: [PATCH 076/200] serial: rda: Use port lock wrappers +Subject: [PATCH 076/208] serial: rda: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -9612,12 +9612,12 @@ index be5c842b5ba9..d824c8318f33 100644 local_irq_restore(flags); } -- -2.45.2 +2.47.1 -From 9207d4797a8d766b4b58e0b569fd9f948528ee1b Mon Sep 17 00:00:00 2001 +From 0c6d4b0030f9fe798d37e442e20d11f5463d497e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:08 +0206 -Subject: [PATCH 077/200] serial: rp2: Use port lock wrappers +Subject: [PATCH 077/208] serial: rp2: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -9653,7 +9653,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c -index de220ac8ca54..d46a81cddfcd 100644 +index 5a1de6044b38..45be2b88168e 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -276,9 +276,9 @@ static unsigned int rp2_uart_tx_empty(struct uart_port *port) @@ -9731,12 +9731,12 @@ index de220ac8ca54..d46a81cddfcd 100644 static const char *rp2_uart_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From 8808aaf47fd6a44edcbedbeff2893b9db7e2dbfc Mon Sep 17 00:00:00 2001 +From 19e784ad458e8cb1fd58f71a1fb6b4f1b8d0f9fd Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:09 +0206 -Subject: [PATCH 078/200] serial: sa1100: Use port lock wrappers +Subject: [PATCH 078/208] serial: sa1100: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -9853,12 +9853,12 @@ index ad011f1e2f4d..be7bcd75d9f4 100644 static const char *sa1100_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From 4fd995130780452e1048a7076b985e98108ed162 Mon Sep 17 00:00:00 2001 +From 2f0392a806e64eb0a2256411d8053e368d45d545 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:10 +0206 -Subject: [PATCH 079/200] serial: samsung_tty: Use port lock wrappers +Subject: [PATCH 079/208] serial: samsung_tty: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -10103,12 +10103,12 @@ index 5a4d88e13471..a82b65155f6e 100644 /* Shouldn't be __init, as it can be instantiated from other module */ -- -2.45.2 +2.47.1 -From f5019cd64ad069f4fea2e33bbe0cb830f95c90b2 Mon Sep 17 00:00:00 2001 +From 234845d25ec1a9c6b69c7b1f8e14dd89a7695fe4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:11 +0206 -Subject: [PATCH 080/200] serial: sb1250-duart: Use port lock wrappers +Subject: [PATCH 080/208] serial: sb1250-duart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -10193,12 +10193,12 @@ index f3cd69346482..dbec29d9a6c3 100644 static int __init sbd_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From b5cc3f79e02cfd3b64ada374fc5ef957ed54c598 Mon Sep 17 00:00:00 2001 +From 76a1be004b9de1cb4866690ebaa319a887ae631f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:12 +0206 -Subject: [PATCH 081/200] serial: sc16is7xx: Use port lock wrappers +Subject: [PATCH 081/208] serial: sc16is7xx: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -10234,10 +10234,10 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c -index 7a9924d9b294..be9ae5cdd1b8 100644 +index f290fbe21d63..6f43440810f5 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -817,6 +817,7 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) +@@ -821,6 +821,7 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) { struct uart_port *port = &(to_sc16is7xx_one(ws, tx_work)->port); struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); @@ -10245,7 +10245,7 @@ index 7a9924d9b294..be9ae5cdd1b8 100644 if ((port->rs485.flags & SER_RS485_ENABLED) && (port->rs485.delay_rts_before_send > 0)) -@@ -825,6 +826,10 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) +@@ -829,6 +830,10 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) mutex_lock(&one->efr_lock); sc16is7xx_handle_tx(port); mutex_unlock(&one->efr_lock); @@ -10257,12 +10257,12 @@ index 7a9924d9b294..be9ae5cdd1b8 100644 static void sc16is7xx_reconf_rs485(struct uart_port *port) -- -2.45.2 +2.47.1 -From 218e0456d267a57fdd8b9f187c714131d7b74aeb Mon Sep 17 00:00:00 2001 +From 7c5311bbea1ef691d95c0fb4ffa08cff5dbe672f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:13 +0206 -Subject: [PATCH 082/200] serial: tegra: Use port lock wrappers +Subject: [PATCH 082/208] serial: tegra: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -10438,12 +10438,12 @@ index d4ec943cb8e9..6d4006b41975 100644 static const char *tegra_uart_type(struct uart_port *u) -- -2.45.2 +2.47.1 -From ffc8ac5c464f07c9a1a84ce2a116b051c0cdc88f Mon Sep 17 00:00:00 2001 +From d868db9a25c4f2c4efccb52d0f728d0d1fe2c3ec Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:14 +0206 -Subject: [PATCH 083/200] serial: core: Use port lock wrappers +Subject: [PATCH 083/208] serial: core: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -10480,7 +10480,7 @@ Signed-off-by: Sebastian Andrzej Siewior 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c -index 2eceef54e0b3..6cd64ccc2035 100644 +index 8ff0efac6aa0..398104760fbc 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -79,7 +79,7 @@ static inline void uart_port_deref(struct uart_port *uport) @@ -10534,7 +10534,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 } /* -@@ -715,11 +715,11 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) +@@ -717,11 +717,11 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) if (port->ops->send_xchar) port->ops->send_xchar(port, ch); else { @@ -10548,7 +10548,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 } uart_port_deref(port); } -@@ -1098,9 +1098,9 @@ static int uart_tiocmget(struct tty_struct *tty) +@@ -1108,9 +1108,9 @@ static int uart_tiocmget(struct tty_struct *tty) if (!tty_io_error(tty)) { result = uport->mctrl; @@ -10560,7 +10560,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 } out: mutex_unlock(&port->mutex); -@@ -1236,16 +1236,16 @@ static int uart_wait_modem_status(struct uart_state *state, unsigned long arg) +@@ -1246,16 +1246,16 @@ static int uart_wait_modem_status(struct uart_state *state, unsigned long arg) uport = uart_port_ref(state); if (!uport) return -EIO; @@ -10581,7 +10581,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 set_current_state(TASK_INTERRUPTIBLE); -@@ -1290,9 +1290,9 @@ static int uart_get_icount(struct tty_struct *tty, +@@ -1300,9 +1300,9 @@ static int uart_get_icount(struct tty_struct *tty, uport = uart_port_ref(state); if (!uport) return -EIO; @@ -10593,7 +10593,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 uart_port_deref(uport); icount->cts = cnow.cts; -@@ -1445,9 +1445,9 @@ static int uart_rs485_config(struct uart_port *port) +@@ -1455,9 +1455,9 @@ static int uart_rs485_config(struct uart_port *port) uart_set_rs485_termination(port, rs485); uart_set_rs485_rx_during_tx(port, rs485); @@ -10605,7 +10605,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 if (ret) { memset(rs485, 0, sizeof(*rs485)); /* unset GPIOs */ -@@ -1464,9 +1464,9 @@ static int uart_get_rs485_config(struct uart_port *port, +@@ -1474,9 +1474,9 @@ static int uart_get_rs485_config(struct uart_port *port, unsigned long flags; struct serial_rs485 aux; @@ -10617,7 +10617,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 if (copy_to_user(rs485, &aux, sizeof(aux))) return -EFAULT; -@@ -1494,7 +1494,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, +@@ -1504,7 +1504,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, uart_set_rs485_termination(port, &rs485); uart_set_rs485_rx_during_tx(port, &rs485); @@ -10626,7 +10626,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 ret = port->rs485_config(port, &tty->termios, &rs485); if (!ret) { port->rs485 = rs485; -@@ -1503,7 +1503,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, +@@ -1513,7 +1513,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, if (!(rs485.flags & SER_RS485_ENABLED)) port->ops->set_mctrl(port, port->mctrl); } @@ -10635,7 +10635,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 if (ret) { /* restore old GPIO settings */ gpiod_set_value_cansleep(port->rs485_term_gpio, -@@ -1528,9 +1528,9 @@ static int uart_get_iso7816_config(struct uart_port *port, +@@ -1538,9 +1538,9 @@ static int uart_get_iso7816_config(struct uart_port *port, if (!port->iso7816_config) return -ENOTTY; @@ -10647,7 +10647,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 if (copy_to_user(iso7816, &aux, sizeof(aux))) return -EFAULT; -@@ -1559,9 +1559,9 @@ static int uart_set_iso7816_config(struct uart_port *port, +@@ -1569,9 +1569,9 @@ static int uart_set_iso7816_config(struct uart_port *port, if (iso7816.reserved[i]) return -EINVAL; @@ -10659,7 +10659,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 if (ret) return ret; -@@ -1778,9 +1778,9 @@ static void uart_tty_port_shutdown(struct tty_port *port) +@@ -1788,9 +1788,9 @@ static void uart_tty_port_shutdown(struct tty_port *port) if (WARN(!uport, "detached port still initialized!\n")) return; @@ -10671,7 +10671,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 serial_base_port_shutdown(uport); uart_port_shutdown(port); -@@ -1795,11 +1795,11 @@ static void uart_tty_port_shutdown(struct tty_port *port) +@@ -1805,11 +1805,11 @@ static void uart_tty_port_shutdown(struct tty_port *port) /* * Free the transmit buffer. */ @@ -10685,7 +10685,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 free_page((unsigned long)buf); -@@ -1942,10 +1942,10 @@ static bool uart_carrier_raised(struct tty_port *port) +@@ -1952,10 +1952,10 @@ static bool uart_carrier_raised(struct tty_port *port) */ if (WARN_ON(!uport)) return true; @@ -10698,7 +10698,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 uart_port_deref(uport); return mctrl & TIOCM_CAR; -@@ -2062,9 +2062,9 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) +@@ -2072,9 +2072,9 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) pm_state = state->pm_state; if (pm_state != UART_PM_STATE_ON) uart_change_pm(state, UART_PM_STATE_ON); @@ -10710,7 +10710,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 if (pm_state != UART_PM_STATE_ON) uart_change_pm(state, pm_state); -@@ -2403,9 +2403,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2413,9 +2413,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) */ if (!console_suspend_enabled && uart_console(uport)) { if (uport->ops->start_rx) { @@ -10722,7 +10722,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 } goto unlock; } -@@ -2420,7 +2420,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2430,7 +2430,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) tty_port_set_suspended(port, true); tty_port_set_initialized(port, false); @@ -10731,7 +10731,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 ops->stop_tx(uport); if (!(uport->rs485.flags & SER_RS485_ENABLED)) ops->set_mctrl(uport, 0); -@@ -2428,7 +2428,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2438,7 +2438,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) mctrl = uport->mctrl; uport->mctrl = 0; ops->stop_rx(uport); @@ -10740,7 +10740,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 /* * Wait for the transmitter to empty. -@@ -2500,9 +2500,9 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2510,9 +2510,9 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) uart_change_pm(state, UART_PM_STATE_ON); uport->ops->set_termios(uport, &termios, NULL); if (!console_suspend_enabled && uport->ops->start_rx) { @@ -10752,7 +10752,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 } if (console_suspend_enabled) console_start(uport->cons); -@@ -2513,10 +2513,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2523,10 +2523,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) int ret; uart_change_pm(state, UART_PM_STATE_ON); @@ -10765,7 +10765,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 if (console_suspend_enabled || !uart_console(uport)) { /* Protected by port mutex for now */ struct tty_struct *tty = port->tty; -@@ -2526,11 +2526,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2536,11 +2536,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) if (tty) uart_change_line_settings(tty, state, NULL); uart_rs485_config(uport); @@ -10779,7 +10779,7 @@ index 2eceef54e0b3..6cd64ccc2035 100644 tty_port_set_initialized(port, true); } else { /* -@@ -2642,11 +2642,11 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, +@@ -2652,11 +2652,11 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, * keep the DTR setting that is set in uart_set_options() * We probably don't need a spinlock around this, but */ @@ -10815,12 +10815,12 @@ index 469ad26cde48..66fd117d8aea 100644 out: pm_runtime_mark_last_busy(dev); -- -2.45.2 +2.47.1 -From 2c0cc57ae4876f3df16985b86f28d59cd6debfa1 Mon Sep 17 00:00:00 2001 +From e3e93043cacbff762336ac9655e74c3e7cc8b0a3 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:15 +0206 -Subject: [PATCH 084/200] serial: mctrl_gpio: Use port lock wrappers +Subject: [PATCH 084/208] serial: mctrl_gpio: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -10878,12 +10878,12 @@ index 7d5aaa8d422b..e51ca593ab86 100644 return IRQ_HANDLED; } -- -2.45.2 +2.47.1 -From b5642ee52fdd93a6e173a0dabfcf97d9a8ba4dde Mon Sep 17 00:00:00 2001 +From 897089afb57170c68cdfad247a45bf94e5534aa8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:16 +0206 -Subject: [PATCH 085/200] serial: txx9: Use port lock wrappers +Subject: [PATCH 085/208] serial: txx9: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -11017,12 +11017,12 @@ index be08fb6f749c..eaa980722455 100644 static void -- -2.45.2 +2.47.1 -From 020380b4581e4187bff0017090c72ba499cbfa38 Mon Sep 17 00:00:00 2001 +From a2ba5308c07f787ab8c088178339d95f1065cc57 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:17 +0206 -Subject: [PATCH 086/200] serial: sh-sci: Use port lock wrappers +Subject: [PATCH 086/208] serial: sh-sci: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -11324,12 +11324,12 @@ index f793624fd501..2559c97812fa 100644 static int serial_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From e6b65d1896362ed26dfbea30987d73f5fd86caa0 Mon Sep 17 00:00:00 2001 +From 3d0952ac8ed2642a7d5dee644277c04268441f30 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:18 +0206 -Subject: [PATCH 087/200] serial: sifive: Use port lock wrappers +Subject: [PATCH 087/208] serial: sifive: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -11431,12 +11431,12 @@ index d195c5de52e7..b296e57a9dee 100644 } -- -2.45.2 +2.47.1 -From a1a589e37b39856371330f63a20174551a353690 Mon Sep 17 00:00:00 2001 +From 05e415815381dc07e0b8c096602a769ebb958115 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:19 +0206 -Subject: [PATCH 088/200] serial: sprd: Use port lock wrappers +Subject: [PATCH 088/208] serial: sprd: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -11598,12 +11598,12 @@ index f328fa57231f..f257525f9299 100644 static int sprd_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From d4f04d84765da040038e860c3a96e1bdfe6ca8fa Mon Sep 17 00:00:00 2001 +From 1d2eb24e236ad3cb341204815c7d24f8bc9beef2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:20 +0206 -Subject: [PATCH 089/200] serial: st-asc: Use port lock wrappers +Subject: [PATCH 089/208] serial: st-asc: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -11713,12 +11713,12 @@ index 92b9f6894006..a821f5d76a26 100644 static int asc_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From 84fda6abeb7a2e37782a18bae510087671cdc2ce Mon Sep 17 00:00:00 2001 +From 48916b45f3662e7aab61670b0b643acf925743b8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:21 +0206 -Subject: [PATCH 090/200] serial: stm32: Use port lock wrappers +Subject: [PATCH 090/208] serial: stm32: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -11903,12 +11903,12 @@ index 9ef90bb30a47..b963f9ccb070 100644 if (!stm32_usart_rx_dma_pause(stm32_port)) size += stm32_usart_receive_chars(port, true); -- -2.45.2 +2.47.1 -From 9a5e83c5d454e487c6d6e325b794fcffa0a77023 Mon Sep 17 00:00:00 2001 +From 2e895bde5cf3014d7b565ad2c59da2d1982e34b0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:22 +0206 -Subject: [PATCH 091/200] serial: sunhv: Use port lock wrappers +Subject: [PATCH 091/208] serial: sunhv: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -12057,12 +12057,12 @@ index c671d674bce4..5bfc0040f17b 100644 static struct console sunhv_console = { -- -2.45.2 +2.47.1 -From d9343dc401de8427e23aa17f0604eadb46ef7be0 Mon Sep 17 00:00:00 2001 +From 04521cde5ed84ad8e99000f2deb0484846d8395f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:23 +0206 -Subject: [PATCH 092/200] serial: sunplus-uart: Use port lock wrappers +Subject: [PATCH 092/208] serial: sunplus-uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -12208,12 +12208,12 @@ index 3aacd5eb414c..4251f4e1ba99 100644 local_irq_restore(flags); } -- -2.45.2 +2.47.1 -From 95a1aa19ffc2b58bd4746574c2c29a9250db5010 Mon Sep 17 00:00:00 2001 +From 9ea929a07f56c3ca3b2e7b46c8e637a02f32530a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:24 +0206 -Subject: [PATCH 093/200] serial: sunsab: Use port lock wrappers +Subject: [PATCH 093/208] serial: sunsab: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -12389,12 +12389,12 @@ index 40eeaf835bba..6aa51a6f8063 100644 return 0; } -- -2.45.2 +2.47.1 -From 8a9705c95c0cc2bdf434e8ffc655f93b009d7ab2 Mon Sep 17 00:00:00 2001 +From 42d36a928379f576ee08db6487488e48669291d0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:25 +0206 -Subject: [PATCH 094/200] serial: sunsu: Use port lock wrappers +Subject: [PATCH 094/208] serial: sunsu: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -12613,12 +12613,12 @@ index 58a4342ad0f9..1e051cc2591c 100644 /* -- -2.45.2 +2.47.1 -From c38a5b5750b08e7f2c72ddf1a4ccd188ca60102c Mon Sep 17 00:00:00 2001 +From 7b42e210abebf1734f4c3ced92477ffbb1a2b988 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:26 +0206 -Subject: [PATCH 095/200] serial: sunzilog: Use port lock wrappers +Subject: [PATCH 095/208] serial: sunzilog: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -12829,12 +12829,12 @@ index c8c71c56264c..d3b5e864b727 100644 #ifdef CONFIG_SERIO if (up->flags & (SUNZILOG_FLAG_CONS_KEYB | -- -2.45.2 +2.47.1 -From 9fe33b7343a0088ba246a91d31b9ec6de40826c2 Mon Sep 17 00:00:00 2001 +From d9a2c8857913524b951e69dd89a7c94d28308aad Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:27 +0206 -Subject: [PATCH 096/200] serial: timbuart: Use port lock wrappers +Subject: [PATCH 096/208] serial: timbuart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -12905,12 +12905,12 @@ index 0859394a78cd..0cc6524f5e8b 100644 static const char *timbuart_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From e42612494d67b1b00e5e000c27e81f8eb6cae77b Mon Sep 17 00:00:00 2001 +From 9c847eebd82201b8b70cdbdcda793172240a6284 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:28 +0206 -Subject: [PATCH 097/200] serial: uartlite: Use port lock wrappers +Subject: [PATCH 097/208] serial: uartlite: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -13015,12 +13015,12 @@ index b225a78f6175..404c14acafa5 100644 static int ulite_console_setup(struct console *co, char *options) -- -2.45.2 +2.47.1 -From ffdb3fbe18c229e62da57542c2cb36f32529f3d7 Mon Sep 17 00:00:00 2001 +From 955f88371a8bc46effb48e86e30a09b513c33868 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:29 +0206 -Subject: [PATCH 098/200] serial: ucc_uart: Use port lock wrappers +Subject: [PATCH 098/208] serial: ucc_uart: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -13079,12 +13079,12 @@ index b06661b80f41..ed7a6bb5596a 100644 /* -- -2.45.2 +2.47.1 -From 7827b25208699ac01465966ec407a0f808564be0 Mon Sep 17 00:00:00 2001 +From d72cc9e4e41630471fbb66f321cc0a38d502756e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:30 +0206 -Subject: [PATCH 099/200] serial: vt8500: Use port lock wrappers +Subject: [PATCH 099/208] serial: vt8500: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -13160,12 +13160,12 @@ index c5d5c2765119..78a1c1eea11b 100644 static const char *vt8500_type(struct uart_port *port) -- -2.45.2 +2.47.1 -From e7ba1177c632219975da0c8a2acd26008ad93158 Mon Sep 17 00:00:00 2001 +From bf3a423a61dc5c961040603b488be20231ebe9d0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Sep 2023 20:44:31 +0206 -Subject: [PATCH 100/200] serial: xilinx_uartps: Use port lock wrappers +Subject: [PATCH 100/208] serial: xilinx_uartps: Use port lock wrappers When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, @@ -13441,12 +13441,12 @@ index 2e5e86a00a77..9c13dac1d4d1 100644 return uart_resume_port(cdns_uart->cdns_uart_driver, port); -- -2.45.2 +2.47.1 -From 4bc6621e9d84a9ec71c156043473f733b3fedddb Mon Sep 17 00:00:00 2001 +From 8697d4b4268c0eaeb082cae7c303d26c22449775 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 16 Sep 2023 21:26:00 +0206 -Subject: [PATCH 101/200] printk: Add non-BKL (nbcon) console basic +Subject: [PATCH 101/208] printk: Add non-BKL (nbcon) console basic infrastructure The current console/printk subsystem is protected by a Big Kernel Lock, @@ -13715,12 +13715,12 @@ index 0fca282c0a25..b2c65b991e1e 100644 if (console->exit) -- -2.45.2 +2.47.1 -From 96e85303396861e216017a33f06b5d8a340d2c7b Mon Sep 17 00:00:00 2001 +From a12603a076c1869b6dc5b41f53ea276cd50f4549 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 16 Sep 2023 21:26:01 +0206 -Subject: [PATCH 102/200] printk: nbcon: Add acquire/release logic +Subject: [PATCH 102/208] printk: nbcon: Add acquire/release logic Add per console acquire/release functionality. @@ -14427,12 +14427,12 @@ index 63d24ca62ac5..a2a354f859f9 100644 * nbcon_init - Initialize the nbcon console specific data * @con: Console to initialize -- -2.45.2 +2.47.1 -From 7c95cefee1f190cc26dbbf2f7a00773d96f2c05f Mon Sep 17 00:00:00 2001 +From 7b3d594b5bdb540b6dca10c54bb7564c0df01491 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Sat, 16 Sep 2023 21:26:02 +0206 -Subject: [PATCH 103/200] printk: Make static printk buffers available to nbcon +Subject: [PATCH 103/208] printk: Make static printk buffers available to nbcon The nbcon boot consoles also need printk buffers that are available very early. Since the nbcon boot consoles will also be serialized @@ -14499,12 +14499,12 @@ index b2c65b991e1e..dd68135cb371 100644 unsigned long flags; -- -2.45.2 +2.47.1 -From fbd8ed0a565d74d254ffb3f6fbd929d13f2d06f3 Mon Sep 17 00:00:00 2001 +From c8369d33991369d69067a7a30fe03c8ae61ec704 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 16 Sep 2023 21:26:03 +0206 -Subject: [PATCH 104/200] printk: nbcon: Add buffer management +Subject: [PATCH 104/208] printk: nbcon: Add buffer management In case of hostile takeovers it must be ensured that the previous owner cannot scribble over the output buffer of the emergency/panic @@ -14821,12 +14821,12 @@ index dd68135cb371..58b57deb0cbe 100644 console_sysfs_notify(); -- -2.45.2 +2.47.1 -From 335bb4eca225a1b996da6542952f77903d8aa071 Mon Sep 17 00:00:00 2001 +From d614fab843f0fadce557defbe9041c7cde8c6b07 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 16 Sep 2023 21:26:04 +0206 -Subject: [PATCH 105/200] printk: nbcon: Add ownership state functions +Subject: [PATCH 105/208] printk: nbcon: Add ownership state functions Provide functions that are related to the safe handover mechanism and allow console drivers to dynamically specify unsafe regions: @@ -15005,12 +15005,12 @@ index ba1febf15db6..98e4be5429f0 100644 * nbcon_alloc - Allocate buffers needed by the nbcon console * @con: Console to allocate buffers for -- -2.45.2 +2.47.1 -From 30a97741fd8343d2a76bfdecc966180ab16e72ce Mon Sep 17 00:00:00 2001 +From 7ef242e92b9005b2fb2ed65bf34d5056ac1b2b63 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 16 Sep 2023 21:26:05 +0206 -Subject: [PATCH 106/200] printk: nbcon: Add sequence handling +Subject: [PATCH 106/208] printk: nbcon: Add sequence handling Add an atomic_long_t field @nbcon_seq to the console struct to store the sequence number for nbcon consoles. For nbcon consoles @@ -15327,12 +15327,12 @@ index 58b57deb0cbe..a1ab4760f807 100644 diff += seq - printk_seq; } -- -2.45.2 +2.47.1 -From b1adce1bf70071760c47a7ea5a04d7c8dce31b11 Mon Sep 17 00:00:00 2001 +From 399e3c7d6cf5929d93219113d60879cd5719cd0d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 16 Sep 2023 21:26:06 +0206 -Subject: [PATCH 107/200] printk: nbcon: Add emit function and callback +Subject: [PATCH 107/208] printk: nbcon: Add emit function and callback function for atomic printing Implement an emit function for nbcon consoles to output printk @@ -15599,12 +15599,12 @@ index a1ab4760f807..70f793b392e5 100644 static int panic_console_dropped; -- -2.45.2 +2.47.1 -From 159433cf4a30cbfbaa5dcaf494b85e9fb3b82604 Mon Sep 17 00:00:00 2001 +From e3acc06a142f7578047fd3e8196607c718eea834 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 16 Sep 2023 21:26:07 +0206 -Subject: [PATCH 108/200] printk: nbcon: Allow drivers to mark unsafe regions +Subject: [PATCH 108/208] printk: nbcon: Allow drivers to mark unsafe regions and check state For the write_atomic callback, the console driver may have unsafe @@ -15742,12 +15742,12 @@ index 6e05d263fd22..b96077152f49 100644 * nbcon_emit_next_record - Emit a record in the acquired context * @wctxt: The write context that will be handed to the write function -- -2.45.2 +2.47.1 -From 36b2fa76862f79b7a59f2cfd2f9911755d9a1df3 Mon Sep 17 00:00:00 2001 +From f11e162aa625977f3fef2cd8bc3bc9f7603e75d5 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 20 Sep 2023 17:58:38 +0206 -Subject: [PATCH 109/200] printk: fix illegal pbufs access for !CONFIG_PRINTK +Subject: [PATCH 109/208] printk: fix illegal pbufs access for !CONFIG_PRINTK When CONFIG_PRINTK is not set, PRINTK_MESSAGE_MAX is 0. This leads to a zero-sized array @outbuf in @printk_shared_pbufs. In @@ -15881,12 +15881,12 @@ index 70f793b392e5..3bf517ae8262 100644 * Print out all remaining records to all consoles. * -- -2.45.2 +2.47.1 -From eb0eb4077d3a7bcd1a3de51668787a4b8a0a58f0 Mon Sep 17 00:00:00 2001 +From ff9a305c4465333042e66d1d2a27d5b2b0b8db8c Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Fri, 6 Oct 2023 10:21:51 +0200 -Subject: [PATCH 110/200] printk: Reduce pr_flush() pooling time +Subject: [PATCH 110/208] printk: Reduce pr_flush() pooling time pr_flush() does not guarantee that all messages would really get flushed to the console. The best it could do is to wait with a given timeout.[*] @@ -15988,12 +15988,12 @@ index 3bf517ae8262..a30338aca084 100644 last_diff = diff; } -- -2.45.2 +2.47.1 -From cc4e3316dd0a48aa5f68b37854cbda3c13023086 Mon Sep 17 00:00:00 2001 +From 43eea4cde661405858d91f013df9d040f00d9ab3 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 6 Dec 2023 12:01:56 +0000 -Subject: [PATCH 111/200] printk: nbcon: Relocate 32bit seq macros +Subject: [PATCH 111/208] printk: nbcon: Relocate 32bit seq macros The macros __seq_to_nbcon_seq() and __nbcon_seq_to_seq() are used to provide support for atomic handling of sequence numbers @@ -16136,12 +16136,12 @@ index 18cd25e489b8..b82a96dc2ea2 100644 + #endif /* _KERNEL_PRINTK_RINGBUFFER_H */ -- -2.45.2 +2.47.1 -From fbd2ede7785729e68cab93411ba74fd14b0e2f02 Mon Sep 17 00:00:00 2001 +From 888c62aa7dbbd83cd7ffd55d30ba2f46debe2413 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 7 Dec 2023 14:15:15 +0000 -Subject: [PATCH 112/200] printk: Adjust mapping for 32bit seq macros +Subject: [PATCH 112/208] printk: Adjust mapping for 32bit seq macros Note: This change only applies to 32bit architectures. On 64bit architectures the macros are NOPs. @@ -16212,12 +16212,12 @@ index b82a96dc2ea2..12f60c782e46 100644 return seq; } -- -2.45.2 +2.47.1 -From bc804bae7f0ce67ccb4049508618650e73c0cdd4 Mon Sep 17 00:00:00 2001 +From f9826406f017346d04ebfc12a2483abe34f91708 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 22 Nov 2023 16:13:37 +0000 -Subject: [PATCH 113/200] printk: Use prb_first_seq() as base for 32bit seq +Subject: [PATCH 113/208] printk: Use prb_first_seq() as base for 32bit seq macros Note: This change only applies to 32bit architectures. On 64bit @@ -16290,12 +16290,12 @@ index 12f60c782e46..ee294aaf4aeb 100644 return seq; } -- -2.45.2 +2.47.1 -From 753c836fb2148489d5f5060fc8ab1d3edfdd7297 Mon Sep 17 00:00:00 2001 +From 029a55cb0f12c1f8210506e8f4ec56157d8ee6f1 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Thu, 19 Oct 2023 10:32:05 +0000 -Subject: [PATCH 114/200] printk: ringbuffer: Do not skip non-finalized records +Subject: [PATCH 114/208] printk: ringbuffer: Do not skip non-finalized records with prb_next_seq() Commit f244b4dc53e5 ("printk: ringbuffer: Improve @@ -16602,12 +16602,12 @@ index ee294aaf4aeb..2d948cc82b5b 100644 .text_data_ring = { \ .size_bits = (avgtextbits) + (descbits), \ -- -2.45.2 +2.47.1 -From 3dcec0371cd447f5a292e6abbce9e833b4d6b439 Mon Sep 17 00:00:00 2001 +From 0d5ef71ff2167285e7a883d8f4d21235e9869575 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 23 Oct 2023 11:11:05 +0000 -Subject: [PATCH 115/200] printk: ringbuffer: Clarify special lpos values +Subject: [PATCH 115/208] printk: ringbuffer: Clarify special lpos values For empty line records, no data blocks are created. Instead, these valid records are identified by special logical position @@ -16701,12 +16701,12 @@ index 2d948cc82b5b..d49460f7578e 100644 #define FAILED_BLK_LPOS \ { \ -- -2.45.2 +2.47.1 -From 5874c61bff77e90b46874ef15d95966f7c34023f Mon Sep 17 00:00:00 2001 +From 4851c2b7089b374d6dbd3a47ec91deb87c80b9fd Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 13 Oct 2023 14:30:49 +0000 -Subject: [PATCH 116/200] printk: Add this_cpu_in_panic() +Subject: [PATCH 116/208] printk: Add this_cpu_in_panic() There is already panic_in_progress() and other_cpu_in_panic(), but checking if the current CPU is the panic CPU must still be @@ -16796,12 +16796,12 @@ index a30338aca084..2bb393009d4e 100644 * console_lock - block the console subsystem from printing * -- -2.45.2 +2.47.1 -From 7f17488e64800f23fa6118e5569cdfcc18aa7f04 Mon Sep 17 00:00:00 2001 +From 6942cd7e7b61fa3daa3f25caf30f55a2f58ffe80 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 6 Nov 2023 15:01:58 +0000 -Subject: [PATCH 117/200] printk: ringbuffer: Cleanup reader terminology +Subject: [PATCH 117/208] printk: ringbuffer: Cleanup reader terminology With the lockless ringbuffer, it is allowed that multiple CPUs/contexts write simultaneously into the buffer. This creates @@ -16868,12 +16868,12 @@ index 244d991ffd73..67ee1c62fcd6 100644 bool prb_read_valid_info(struct printk_ringbuffer *rb, u64 seq, struct printk_info *info, unsigned int *line_count) -- -2.45.2 +2.47.1 -From 861fd9d2154564fb9772045af0b3ca2ba629e7e7 Mon Sep 17 00:00:00 2001 +From 2169483599ef943827682fe77c42fc51399119a4 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 6 Nov 2023 14:59:55 +0000 -Subject: [PATCH 118/200] printk: Wait for all reserved records with pr_flush() +Subject: [PATCH 118/208] printk: Wait for all reserved records with pr_flush() Currently pr_flush() will only wait for records that were available to readers at the time of the call (using @@ -17047,12 +17047,12 @@ index d49460f7578e..52626d0f1fa3 100644 #ifdef CONFIG_64BIT -- -2.45.2 +2.47.1 -From ab28207bf8cca851de3071c2ef5986d7dacd6dae Mon Sep 17 00:00:00 2001 +From e8ceb27b1c2d07abc2246af11ccbfe24879d660d Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 13 Oct 2023 10:23:11 +0000 -Subject: [PATCH 119/200] printk: ringbuffer: Skip non-finalized records in +Subject: [PATCH 119/208] printk: ringbuffer: Skip non-finalized records in panic Normally a reader will stop once reaching a non-finalized @@ -17120,12 +17120,12 @@ index b7748d7c44c1..d6ed33683b8b 100644 } -- -2.45.2 +2.47.1 -From 134e8c795f7a63708a6e9fb1268f83030a2f8d14 Mon Sep 17 00:00:00 2001 +From 30ce3a367e92b90ca742f21d444f65dbf8a4e3d8 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 20 Nov 2023 12:46:35 +0100 -Subject: [PATCH 120/200] printk: ringbuffer: Consider committed as finalized +Subject: [PATCH 120/208] printk: ringbuffer: Consider committed as finalized in panic A descriptor in the committed state means the record does not yet @@ -17186,12 +17186,12 @@ index d6ed33683b8b..e7b808b829a0 100644 * A descriptor in the reusable state may no longer have its data * available; report it as existing but with lost data. Or the record -- -2.45.2 +2.47.1 -From e5e906ec18a5725e185adac5412e6927ac795f67 Mon Sep 17 00:00:00 2001 +From 07f3ab3003fe1eba64266997a3cefb8ebc255ac3 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 20 Oct 2023 09:37:05 +0000 -Subject: [PATCH 121/200] printk: Avoid non-panic CPUs writing to ringbuffer +Subject: [PATCH 121/208] printk: Avoid non-panic CPUs writing to ringbuffer Commit 13fb0f74d702 ("printk: Avoid livelock with heavy printk during panic") introduced a mechanism to silence non-panic CPUs @@ -17269,12 +17269,12 @@ index 807692fd386a..7c5ab5c01abb 100644 if (may_suppress && suppress_message_printing(r.info->level)) goto out; -- -2.45.2 +2.47.1 -From 64eddcf7eaca7a39528875bea161dd21e3f13059 Mon Sep 17 00:00:00 2001 +From 3d44c67d0cb6c90fbf2e5e312e3b247e20b28781 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 22 Nov 2023 11:23:43 +0000 -Subject: [PATCH 122/200] printk: Consider nbcon boot consoles on seq init +Subject: [PATCH 122/208] printk: Consider nbcon boot consoles on seq init If a non-boot console is registering and boot consoles exist, the consoles are flushed before being unregistered. This allows the @@ -17325,12 +17325,12 @@ index 7c5ab5c01abb..ae3bf0cf215a 100644 } -- -2.45.2 +2.47.1 -From 811b435ebb4bbfec1176f98b89ae3890574e8e93 Mon Sep 17 00:00:00 2001 +From 70fc2759638d1083c1634543b6d54bc06b17ec95 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 9 Oct 2023 13:55:19 +0000 -Subject: [PATCH 123/200] printk: Add sparse notation to console_srcu locking +Subject: [PATCH 123/208] printk: Add sparse notation to console_srcu locking kernel/printk/printk.c:284:5: sparse: sparse: context imbalance in 'console_srcu_read_lock' - wrong count at exit @@ -17366,12 +17366,12 @@ index ae3bf0cf215a..ea13c808c282 100644 srcu_read_unlock_nmisafe(&console_srcu, cookie); } -- -2.45.2 +2.47.1 -From 48560f34bf90e00b03fc707cf39754c8c8dbaf77 Mon Sep 17 00:00:00 2001 +From 43de39ce614a9a3a16b12238cf2cf2f38c95d9c9 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 20 Oct 2023 09:52:59 +0000 -Subject: [PATCH 124/200] printk: nbcon: Ensure ownership release on failed +Subject: [PATCH 124/208] printk: nbcon: Ensure ownership release on failed emit Until now it was assumed that ownership has been lost when the @@ -17429,12 +17429,12 @@ index c8093bcc01fe..8ecd76aa22e6 100644 /* * Since any dropped message was successfully output, reset the -- -2.45.2 +2.47.1 -From 16b4c119770c1a318c76b0304519dae00799dae6 Mon Sep 17 00:00:00 2001 +From b09b3dbcac17090d8d4e7f3e5db4a3ca6e0e4eeb Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 22 Sep 2023 14:58:18 +0000 -Subject: [PATCH 125/200] printk: Check printk_deferred_enter()/_exit() usage +Subject: [PATCH 125/208] printk: Check printk_deferred_enter()/_exit() usage Add validation that printk_deferred_enter()/_exit() are called in non-migration contexts. @@ -17494,12 +17494,12 @@ index 6d10927a07d8..8d9408d653de 100644 { #ifdef CONFIG_KGDB_KDB -- -2.45.2 +2.47.1 -From 362c2198c3365b9bcbe7c9c4b848cdaf90f8ae0d Mon Sep 17 00:00:00 2001 +From bde1795ba85b7f86a30c44c24952bb8b179dab3f Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 13 Sep 2023 08:35:23 +0000 -Subject: [PATCH 126/200] printk: nbcon: Implement processing in port->lock +Subject: [PATCH 126/208] printk: nbcon: Implement processing in port->lock wrapper Currently the port->lock wrappers uart_port_lock(), @@ -17749,12 +17749,12 @@ index 8ecd76aa22e6..a5707fe1e95e 100644 +} +EXPORT_SYMBOL_GPL(nbcon_release); -- -2.45.2 +2.47.1 -From 11acea9573254934d45de1e71d2e69494cc1f30d Mon Sep 17 00:00:00 2001 +From 09adb1e9f00f0258ead5b6315572ac88c6ff358f Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 8 Dec 2023 15:54:27 +0000 -Subject: [PATCH 127/200] printk: nbcon: Add driver_enter/driver_exit console +Subject: [PATCH 127/208] printk: nbcon: Add driver_enter/driver_exit console callbacks Console drivers need some mechanism to synchronize between "normal @@ -17796,12 +17796,12 @@ index c27bd5189660..73515c324347 100644 atomic_long_t __private nbcon_seq; struct printk_buffers *pbufs; -- -2.45.2 +2.47.1 -From a137c4460a3f2fd6a8c109f014d981374c34b8bf Mon Sep 17 00:00:00 2001 +From 2880322bbbab5b7c116156ecbcd7c523186eb2ea Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 12 Sep 2023 13:25:41 +0000 -Subject: [PATCH 128/200] printk: Make console_is_usable() available to nbcon +Subject: [PATCH 128/208] printk: Make console_is_usable() available to nbcon Move console_is_usable() as-is into internal.h so that it can be used by nbcon printing functions as well. @@ -17906,12 +17906,12 @@ index ea13c808c282..d959be5c4102 100644 { console_locked = 0; -- -2.45.2 +2.47.1 -From c79fae60ccbabeb5b3c400f670967f75353bedd0 Mon Sep 17 00:00:00 2001 +From 394752ad43a811ad378442c888d3148ef0837ffc Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 12 Sep 2023 13:53:21 +0000 -Subject: [PATCH 129/200] printk: Let console_is_usable() handle nbcon +Subject: [PATCH 129/208] printk: Let console_is_usable() handle nbcon The nbcon consoles use a different printing callback. For nbcon consoles, check for the write_atomic() callback instead of @@ -17954,12 +17954,12 @@ index 378ccca007ca..d741d19bb9db 100644 /* * Console drivers may assume that per-cpu resources have been -- -2.45.2 +2.47.1 -From 4e7c124cd3d4ca32792c10297612a60e3f3145c0 Mon Sep 17 00:00:00 2001 +From 2dc66803613b6e9b63b3596cf468d7636e92a1e5 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 12 Sep 2023 13:45:33 +0000 -Subject: [PATCH 130/200] printk: Add @flags argument for console_is_usable() +Subject: [PATCH 130/208] printk: Add @flags argument for console_is_usable() The caller of console_is_usable() usually needs @console->flags for its own checks. Rather than having console_is_usable() read @@ -18028,12 +18028,12 @@ index d959be5c4102..bdd3d7e40e63 100644 if (flags & CON_NBCON) { -- -2.45.2 +2.47.1 -From 49232f099f1b0a45f758eb79538e678c28de42f5 Mon Sep 17 00:00:00 2001 +From b268ba37c7c7734fd6b5d4a134acda52143c6ee7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 12 Sep 2023 12:00:08 +0000 -Subject: [PATCH 131/200] printk: nbcon: Provide function to flush using +Subject: [PATCH 131/208] printk: nbcon: Provide function to flush using write_atomic() Provide nbcon_atomic_flush_all() to perform flushing of all @@ -18223,12 +18223,12 @@ index bdd3d7e40e63..271865952a4d 100644 } -- -2.45.2 +2.47.1 -From 33123b535b9e978d09c04debde1b7e65c00ac82f Mon Sep 17 00:00:00 2001 +From 084c0bd1b2da7bf130f878d5f835d3e49903fdbe Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 24 Oct 2023 14:13:14 +0000 -Subject: [PATCH 132/200] printk: Track registered boot consoles +Subject: [PATCH 132/208] printk: Track registered boot consoles Unfortunately it is not known if a boot console and a regular (legacy or nbcon) console use the same hardware. For this reason @@ -18306,12 +18306,12 @@ index 271865952a4d..4185c58f7915 100644 } -- -2.45.2 +2.47.1 -From 2e09f008dc17a4f0a4dbb8f0cd0ba0932b172a04 Mon Sep 17 00:00:00 2001 +From 32dc21a7953889ba603bcd6c7bc2b88ab6d11422 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 19 Sep 2023 14:33:27 +0000 -Subject: [PATCH 133/200] printk: nbcon: Use nbcon consoles in +Subject: [PATCH 133/208] printk: nbcon: Use nbcon consoles in console_flush_all() Allow nbcon consoles to print messages in the printk() caller @@ -18488,12 +18488,12 @@ index 4185c58f7915..d6173575ea03 100644 if (!progress) continue; -- -2.45.2 +2.47.1 -From dbed4f27af14cc43b8a0f645c9b18702ce19c1f5 Mon Sep 17 00:00:00 2001 +From 268e83cc23f5179b5318a9c9d9d5c068458c9f7c Mon Sep 17 00:00:00 2001 From: John Ogness Date: Thu, 14 Dec 2023 14:38:42 +0000 -Subject: [PATCH 134/200] printk: nbcon: Assign priority based on CPU state +Subject: [PATCH 134/208] printk: nbcon: Assign priority based on CPU state Use the current state of the CPU to determine which priority to assign to the printing context. @@ -18608,12 +18608,12 @@ index c17cf3ea6153..3e999784ba5c 100644 void nbcon_release(struct uart_port *up) { -- -2.45.2 +2.47.1 -From b96326b72a3df7d0b6028707326d56f156bffffe Mon Sep 17 00:00:00 2001 +From d383875690531b79150779ef1943cf7b2e76ead7 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 20 Oct 2023 10:03:42 +0000 -Subject: [PATCH 135/200] printk: nbcon: Add unsafe flushing on panic +Subject: [PATCH 135/208] printk: nbcon: Add unsafe flushing on panic Add nbcon_atomic_flush_unsafe() to flush all nbcon consoles using the write_atomic() callback and allowing unsafe hostile @@ -18713,12 +18713,12 @@ index 3e999784ba5c..1c01f88d596d 100644 /** -- -2.45.2 +2.47.1 -From 1dc3486d1b55b454cf36b8ebf8c53ebfcea9f936 Mon Sep 17 00:00:00 2001 +From e5606498065141df46f536ac26c9877778f7569d Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 26 Sep 2023 12:44:07 +0000 -Subject: [PATCH 136/200] printk: Avoid console_lock dance if no legacy or boot +Subject: [PATCH 136/208] printk: Avoid console_lock dance if no legacy or boot consoles Currently the console lock is used to attempt legacy-type @@ -18931,12 +18931,12 @@ index d6173575ea03..e92da55b8e9f 100644 void printk_trigger_flush(void) -- -2.45.2 +2.47.1 -From c776e58c8df743a106fa2cb407cda44a182a4498 Mon Sep 17 00:00:00 2001 +From 3165c74b3de28e521f915eee1abf18003b82289b Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 11 Dec 2023 09:36:52 +0000 -Subject: [PATCH 137/200] printk: Track nbcon consoles +Subject: [PATCH 137/208] printk: Track nbcon consoles Add a global flag @have_nbcon_console to identify if any nbcon consoles are registered. This will be used in follow-up commits @@ -19003,12 +19003,12 @@ index e92da55b8e9f..977a97f0396b 100644 return res; } -- -2.45.2 +2.47.1 -From e5c811c4e055218dce49c0f7cfcf9c9e2b6b1050 Mon Sep 17 00:00:00 2001 +From 8548edf1d4975fd2a7ea3df62c91873691b38108 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 22 Nov 2023 11:56:58 +0000 -Subject: [PATCH 138/200] printk: Coordinate direct printing in panic +Subject: [PATCH 138/208] printk: Coordinate direct printing in panic Perform printing by nbcon consoles on the panic CPU from the printk() caller context in order to get panic messages printed @@ -19146,12 +19146,12 @@ index 977a97f0396b..e8d60e29c17f 100644 return printed_len; } -- -2.45.2 +2.47.1 -From 2416a470cee743dfb9f6c27619d854b6fb6c2498 Mon Sep 17 00:00:00 2001 +From a33da3168ec1a76d294845ae332087cc2f111aca Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 11 Sep 2023 15:21:57 +0000 -Subject: [PATCH 139/200] printk: nbcon: Implement emergency sections +Subject: [PATCH 139/208] printk: nbcon: Implement emergency sections In emergency situations (something has gone wrong but the system continues to operate), usually important information @@ -19389,12 +19389,12 @@ index e8d60e29c17f..4a0df41d32b8 100644 } -- -2.45.2 +2.47.1 -From 348a34e37c1d2645f63358a81e1baac16e866037 Mon Sep 17 00:00:00 2001 +From 8b0a04bc1a30ddb61e11d4acbf2bbc560f25b6d7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 11 Sep 2023 15:53:04 +0000 -Subject: [PATCH 140/200] panic: Mark emergency section in warn +Subject: [PATCH 140/208] panic: Mark emergency section in warn Mark the full contents of __warn() as an emergency section. In this section, the CPU will not perform console output for the @@ -19432,12 +19432,12 @@ index f0e91a0c4001..147803c3a402 100644 #ifdef CONFIG_BUG -- -2.45.2 +2.47.1 -From c50afd6369a6c7bdf39cfb5caaac8a0ebcc25fdf Mon Sep 17 00:00:00 2001 +From cc3533d72c01d7a1a756c5c3c94e2c9cc32694d4 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 19 Sep 2023 17:07:34 +0000 -Subject: [PATCH 141/200] panic: Mark emergency section in oops +Subject: [PATCH 141/208] panic: Mark emergency section in oops Mark an emergency section beginning with oops_enter() until the end of oops_exit(). In this section, the CPU will not perform @@ -19476,12 +19476,12 @@ index 147803c3a402..9215df21d8c2 100644 } -- -2.45.2 +2.47.1 -From 69da3439e08fed6c879c95eef545198dbf57f15e Mon Sep 17 00:00:00 2001 +From 9f0a193802b213850656ea29e1b0f4731dae8683 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 11 Sep 2023 15:53:39 +0000 -Subject: [PATCH 142/200] rcu: Mark emergency section in rcu stalls +Subject: [PATCH 142/208] rcu: Mark emergency section in rcu stalls Mark an emergency section within print_other_cpu_stall(), where RCU stall information is printed. In this section, the CPU will @@ -19526,12 +19526,12 @@ index 11a1fac3a589..6f085a159fca 100644 static void print_cpu_stall(unsigned long gps) -- -2.45.2 +2.47.1 -From 924d2a3a21677de19e46f6ed2eab612066274dce Mon Sep 17 00:00:00 2001 +From 416e07128e8fad6919adc57f7bd345c4420c6e20 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 18 Sep 2023 20:27:41 +0000 -Subject: [PATCH 143/200] lockdep: Mark emergency section in lockdep splats +Subject: [PATCH 143/208] lockdep: Mark emergency section in lockdep splats Mark an emergency section within print_usage_bug(), where lockdep bugs are printed. In this section, the CPU will not @@ -19546,7 +19546,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 5 insertions(+) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 151bd3de5936..5c21ba41e308 100644 +index 3468d8230e5f..6eef8527e654 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -56,6 +56,7 @@ @@ -19576,12 +19576,12 @@ index 151bd3de5936..5c21ba41e308 100644 /* -- -2.45.2 +2.47.1 -From e1a16b64bf24f4a909eb3bc25c0b70935d03d2e4 Mon Sep 17 00:00:00 2001 +From 25a1648640bbc8a745ea52cd45fb40d0995873f4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 22 Sep 2023 14:12:21 +0000 -Subject: [PATCH 144/200] printk: nbcon: Introduce printing kthreads +Subject: [PATCH 144/208] printk: nbcon: Introduce printing kthreads Provide the main implementation for running a printer kthread per nbcon console that is takeover/handover aware. @@ -20028,12 +20028,12 @@ index 4a0df41d32b8..3e307d475d23 100644 } EXPORT_SYMBOL(console_start); -- -2.45.2 +2.47.1 -From 8075e61875d6c982f0825a0a15423c3f75c737fd Mon Sep 17 00:00:00 2001 +From 7ea26616169bae2ae08c4fc7537d6747ad0492e9 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 23 Oct 2023 17:43:48 +0000 -Subject: [PATCH 145/200] printk: Atomic print in printk context on shutdown +Subject: [PATCH 145/208] printk: Atomic print in printk context on shutdown For nbcon consoles, normally the printing is handled by the dedicated console printing threads. However, on shutdown the @@ -20074,12 +20074,12 @@ index 3e307d475d23..2a77a4ad5619 100644 if (do_trylock_unlock) { -- -2.45.2 +2.47.1 -From c24387d27880e1e1d9f3cc569dbd58cebcc85aa5 Mon Sep 17 00:00:00 2001 +From c9b067d654acb0b15b477980b0031b402039bc8e Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 26 Sep 2023 14:43:30 +0000 -Subject: [PATCH 146/200] printk: nbcon: Add context to console_is_usable() +Subject: [PATCH 146/208] printk: nbcon: Add context to console_is_usable() The nbcon consoles have two callbacks to be used for different contexts. In order to determine if an nbcon console is usable, @@ -20194,12 +20194,12 @@ index 2a77a4ad5619..3863e3dc3816 100644 if (flags & CON_NBCON) { printk_seq = nbcon_seq_read(c); -- -2.45.2 +2.47.1 -From df86179351eceb90629fcc29db92c17c3e3f5b96 Mon Sep 17 00:00:00 2001 +From 6aeb130630ae81de21a1b0bfe76f6e3cb7ed82e3 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 26 Sep 2023 13:03:52 +0000 -Subject: [PATCH 147/200] printk: nbcon: Add printer thread wakeups +Subject: [PATCH 147/208] printk: nbcon: Add printer thread wakeups Add a function to wakeup the printer threads. Use the new function when: @@ -20369,12 +20369,12 @@ index 3863e3dc3816..3cdda6dd8941 100644 } -- -2.45.2 +2.47.1 -From 378fb0e72ecd67cbc6a7ec311422bdb82b3cf04b Mon Sep 17 00:00:00 2001 +From 7190e3d38366b7adefd08e0811063873b5af5fdf Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 26 Sep 2023 13:04:15 +0000 -Subject: [PATCH 148/200] printk: nbcon: Stop threads on shutdown/reboot +Subject: [PATCH 148/208] printk: nbcon: Stop threads on shutdown/reboot Register a syscore_ops shutdown function to stop all threaded printers on shutdown/reboot. This allows printk to transition back @@ -20434,12 +20434,12 @@ index 337ec7a10095..57ed4968a653 100644 +} +device_initcall(printk_init_ops); -- -2.45.2 +2.47.1 -From 43af883ddf1b35861838614356ad67bfb44ba70c Mon Sep 17 00:00:00 2001 +From cf206b0d2dba3b77cb863d228c6ce28497985509 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 5 Dec 2023 14:09:31 +0000 -Subject: [PATCH 149/200] printk: nbcon: Start printing threads +Subject: [PATCH 149/208] printk: nbcon: Start printing threads If there are no boot consoles, the printing threads are started in early_initcall. @@ -20578,12 +20578,12 @@ index 3cdda6dd8941..3722f1a66357 100644 } -- -2.45.2 +2.47.1 -From d2b2b276ef8461066e31e2a9d0e440b33d3098f7 Mon Sep 17 00:00:00 2001 +From 26b8d6e854f654f2212b45a6074a1f74a35b502e Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 26 Sep 2023 13:31:00 +0000 -Subject: [PATCH 150/200] proc: Add nbcon support for /proc/consoles +Subject: [PATCH 150/208] proc: Add nbcon support for /proc/consoles Update /proc/consoles output to show 'W' if an nbcon write callback is implemented (write_atomic or write_thread). @@ -20636,12 +20636,12 @@ index e0758fe7936d..2703676549f5 100644 seq_printf(m, " %4d:%d", MAJOR(dev), MINOR(dev)); -- -2.45.2 +2.47.1 -From 4e3621466bc8ff5008683c3092f986d12c2e4830 Mon Sep 17 00:00:00 2001 +From 1130dc56405fda6713c18793379109c870430300 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 22 Sep 2023 14:31:09 +0000 -Subject: [PATCH 151/200] tty: sysfs: Add nbcon support for 'active' +Subject: [PATCH 151/208] tty: sysfs: Add nbcon support for 'active' Allow the 'active' attribute to list nbcon consoles. @@ -20652,7 +20652,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c -index 493fc4742895..afa52883c498 100644 +index 117abcf366d9..03e2eaf24fa5 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3543,8 +3543,15 @@ static ssize_t show_cons_active(struct device *dev, @@ -20674,12 +20674,12 @@ index 493fc4742895..afa52883c498 100644 continue; cs[i++] = c; -- -2.45.2 +2.47.1 -From d7bb4ca00319f2911e030ef6e377824e0d1a7d64 Mon Sep 17 00:00:00 2001 +From edc337def8fe952f88159a14572d4afdde52296a Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 20 Oct 2023 10:01:58 +0000 -Subject: [PATCH 152/200] printk: nbcon: Provide function to reacquire +Subject: [PATCH 152/208] printk: nbcon: Provide function to reacquire ownership Contexts may become nbcon owners for various reasons, not just @@ -20773,12 +20773,12 @@ index b866d0138fe0..f843df54ee82 100644 * nbcon_emit_next_record - Emit a record in the acquired context * @wctxt: The write context that will be handed to the write function -- -2.45.2 +2.47.1 -From 66892b5a990b37dc9c2c2c86ab7ca105e322bd08 Mon Sep 17 00:00:00 2001 +From aadc675eb54895fd48fe26b434d714040cf2dc3b Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 11 Dec 2023 09:19:18 +0000 -Subject: [PATCH 153/200] serial: core: Provide low-level functions to port +Subject: [PATCH 153/208] serial: core: Provide low-level functions to port lock The nbcon console's driver_enter() and driver_exit() callbacks need @@ -20821,12 +20821,12 @@ index 6fc2003767a9..7c861b4606aa 100644 { return up->serial_in(up, offset); -- -2.45.2 +2.47.1 -From f8bc4464b5e38f029a55b891309bd6ac36453cc7 Mon Sep 17 00:00:00 2001 +From a932500f400aacd1bfb097dfe36222dd4b89250d Mon Sep 17 00:00:00 2001 From: John Ogness Date: Wed, 13 Sep 2023 15:30:36 +0000 -Subject: [PATCH 154/200] serial: 8250: Switch to nbcon console +Subject: [PATCH 154/208] serial: 8250: Switch to nbcon console Implement the necessary callbacks to switch the 8250 console driver to perform as an nbcon console. @@ -21165,12 +21165,12 @@ index be65de65fe61..ec46e3b49ee9 100644 int serial8250_console_exit(struct uart_port *port); -- -2.45.2 +2.47.1 -From 62fab477292a68aba7c0150225c2c9135ce5750e Mon Sep 17 00:00:00 2001 +From 6f72df4b127537c99d153497d9e0bbc152241ad5 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Fri, 22 Sep 2023 17:35:04 +0000 -Subject: [PATCH 155/200] printk: Add kthread for all legacy consoles +Subject: [PATCH 155/208] printk: Add kthread for all legacy consoles The write callback of legacy consoles make use of spinlocks. This is not permitted with PREEMPT_RT in atomic contexts. @@ -21596,12 +21596,12 @@ index 3722f1a66357..4f1ca9931ddb 100644 if (pending & PRINTK_PENDING_WAKEUP) -- -2.45.2 +2.47.1 -From 9b1a4bb75dae029d59a2d203eee8b9cacf461f14 Mon Sep 17 00:00:00 2001 +From 120d199eb2bfe0efee009157a97365d077beffbc Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 2 Oct 2023 15:30:43 +0000 -Subject: [PATCH 156/200] serial: 8250: revert "drop lockdep annotation from +Subject: [PATCH 156/208] serial: 8250: revert "drop lockdep annotation from serial8250_clear_IER()" The 8250 driver no longer depends on @oops_in_progress and @@ -21630,12 +21630,12 @@ index bc3ab612aec5..2d4e775cd7cb 100644 } -- -2.45.2 +2.47.1 -From 25e776eb6eb155b104451f87dbbeb05ac3ab7677 Mon Sep 17 00:00:00 2001 +From fe2c834f6f6fab8ec527795140ae662ed707f839 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Mon, 11 Dec 2023 09:34:16 +0000 -Subject: [PATCH 157/200] printk: Avoid false positive lockdep report for +Subject: [PATCH 157/208] printk: Avoid false positive lockdep report for legacy driver. printk may invoke the legacy console driver from atomic context. This leads to @@ -21699,12 +21699,12 @@ index 4f1ca9931ddb..249576a8c351 100644 printk_seq = nbcon_seq_read(con); } else { -- -2.45.2 +2.47.1 -From 7c9f87b242a7d6237fc4e6dfbd055786274c7de7 Mon Sep 17 00:00:00 2001 +From e6ece50af53e93c8a2dea39cdff54860a7d26a78 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sat, 27 Feb 2016 08:09:11 +0100 -Subject: [PATCH 158/200] drm/i915: Use preempt_disable/enable_rt() where +Subject: [PATCH 158/208] drm/i915: Use preempt_disable/enable_rt() where recommended Mario Kleiner suggest in commit @@ -21760,12 +21760,12 @@ index f5659ebd08eb..5b6d2f55528d 100644 spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); -- -2.45.2 +2.47.1 -From 3235518cd24ebb7fa1c33873b2c8f520b5787606 Mon Sep 17 00:00:00 2001 +From 3ebc38d0f01a2fd7311fffc40650c3d40244b3be Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sat, 27 Feb 2016 09:01:42 +0100 -Subject: [PATCH 159/200] drm/i915: Don't disable interrupts on PREEMPT_RT +Subject: [PATCH 159/208] drm/i915: Don't disable interrupts on PREEMPT_RT during atomic updates Commit @@ -21850,12 +21850,12 @@ index cfbfbfed3f5e..da2becfbc86c 100644 if (intel_vgpu_active(dev_priv)) return; -- -2.45.2 +2.47.1 -From 3fe34f3023f9b22efd04685fb3f0330138d08c2d Mon Sep 17 00:00:00 2001 +From e771ca9d1902f0cfc69815321cc68f49b71fdfa3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 25 Oct 2021 15:05:18 +0200 -Subject: [PATCH 160/200] drm/i915: Don't check for atomic context on +Subject: [PATCH 160/208] drm/i915: Don't check for atomic context on PREEMPT_RT The !in_atomic() check in _wait_for_atomic() triggers on PREEMPT_RT @@ -21886,12 +21886,12 @@ index c61066498bf2..48e19e55d6b0 100644 #else # define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) do { } while (0) -- -2.45.2 +2.47.1 -From ae9c8375d1775c29e0da15dab036b2e1328db94f Mon Sep 17 00:00:00 2001 +From 314aa29d19cfa104759a648cd7868562e3484cc2 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 6 Dec 2018 09:52:20 +0100 -Subject: [PATCH 161/200] drm/i915: Disable tracing points on PREEMPT_RT +Subject: [PATCH 161/208] drm/i915: Disable tracing points on PREEMPT_RT Luca Abeni reported this: | BUG: scheduling while atomic: kworker/u8:2/15203/0x00000003 @@ -21936,12 +21936,12 @@ index ce1cbee1b39d..c54653cf72c9 100644 #include #include -- -2.45.2 +2.47.1 -From ea5ef610350d0e531b308e4ff49a28d093cb6e4e Mon Sep 17 00:00:00 2001 +From ea4f58ff53d3691a71d93248cb5e48b6ad2b5810 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 19 Dec 2018 10:47:02 +0100 -Subject: [PATCH 162/200] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with +Subject: [PATCH 162/208] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with NOTRACE The order of the header files is important. If this header file is @@ -21970,12 +21970,12 @@ index c54653cf72c9..3c51620d011b 100644 TP_PROTO(struct i915_request *rq), TP_ARGS(rq) -- -2.45.2 +2.47.1 -From 32f1485b7137d29b522c8e74672cd78933cedae3 Mon Sep 17 00:00:00 2001 +From f4105377165644eb4f52022fd926c31ce18c58cf Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 8 Sep 2021 17:18:00 +0200 -Subject: [PATCH 163/200] drm/i915/gt: Queue and wait for the irq_work item. +Subject: [PATCH 163/208] drm/i915/gt: Queue and wait for the irq_work item. Disabling interrupts and invoking the irq_work function directly breaks on PREEMPT_RT. @@ -22018,12 +22018,12 @@ index f2973cd1a8aa..aa77f8601b8a 100644 void intel_breadcrumbs_free(struct kref *kref) -- -2.45.2 +2.47.1 -From 167c5db49060816ad61e39d58047655acc46e0fc Mon Sep 17 00:00:00 2001 +From 00e4d47eb44b819d6e67e1cacdfc931a0f74eb0b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 8 Sep 2021 19:03:41 +0200 -Subject: [PATCH 164/200] drm/i915/gt: Use spin_lock_irq() instead of +Subject: [PATCH 164/208] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock() execlists_dequeue() is invoked from a function which uses @@ -22112,12 +22112,12 @@ index 2065be5a196b..73d815fc514b 100644 } -- -2.45.2 +2.47.1 -From dd328d707db4264bc8d6b191bc3ef05232552a51 Mon Sep 17 00:00:00 2001 +From 3ef075c695d0559ecba7ee829076e009fe6ad946 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 1 Oct 2021 20:01:03 +0200 -Subject: [PATCH 165/200] drm/i915: Drop the irqs_disabled() check +Subject: [PATCH 165/208] drm/i915: Drop the irqs_disabled() check The !irqs_disabled() check triggers on PREEMPT_RT even with i915_sched_engine::lock acquired. The reason is the lock is transformed @@ -22156,12 +22156,12 @@ index f59081066a19..014d02029a41 100644 /* -- -2.45.2 +2.47.1 -From 1051a1738a9ea6ee51262268a035f57be4bac777 Mon Sep 17 00:00:00 2001 +From e0400eb2c1441aff0edfc7f161bd4f26e29166ba Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Wed, 5 Jul 2023 10:30:25 +0100 -Subject: [PATCH 166/200] drm/i915: Do not disable preemption for resets +Subject: [PATCH 166/208] drm/i915: Do not disable preemption for resets Commit ade8a0f59844 ("drm/i915: Make all GPU resets atomic") added a preempt disable section over the hardware reset callback to prepare the @@ -22260,12 +22260,12 @@ index 13fb8e5042c5..b51fb0c97772 100644 wa_14015076503_end(gt, reset_mask); } -- -2.45.2 +2.47.1 -From 83b39907e6f7a0185cdf76443627b34377d80bab Mon Sep 17 00:00:00 2001 +From f37c992660cecdb9cc9fd5687c123fc9bbaeaf6c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 3 Oct 2023 21:37:21 +0200 -Subject: [PATCH 167/200] drm/i915/guc: Consider also RCU depth in busy loop. +Subject: [PATCH 167/208] drm/i915/guc: Consider also RCU depth in busy loop. intel_guc_send_busy_loop() looks at in_atomic() and irqs_disabled() to decide if it should busy-spin while waiting or if it may sleep. @@ -22294,12 +22294,12 @@ index 8dc291ff0093..5b8d084c9c58 100644 /* * FIXME: Have caller pass in if we are in an atomic context to avoid -- -2.45.2 +2.47.1 -From 18321a9c9a22bd98ac388125352f34b98c954071 Mon Sep 17 00:00:00 2001 +From 5bf29e9ce5cd8b2c81a7d586c9633392124517c6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 21 Feb 2022 17:59:14 +0100 -Subject: [PATCH 168/200] Revert "drm/i915: Depend on !PREEMPT_RT." +Subject: [PATCH 168/208] Revert "drm/i915: Depend on !PREEMPT_RT." Once the known issues are addressed, it should be safe to enable the driver. @@ -22322,12 +22322,12 @@ index ce397a8797f7..98c3f532822d 100644 select INTERVAL_TREE # we need shmfs for the swappable backing store, and in particular -- -2.45.2 +2.47.1 -From b0271319d6f5dbc9d3eeafc4d4024aa621b34a94 Mon Sep 17 00:00:00 2001 +From 153afa952302d5ba106afa706636237f0cf07bd8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 23 Sep 2023 03:11:05 +0200 -Subject: [PATCH 169/200] sched: define TIF_ALLOW_RESCHED +Subject: [PATCH 169/208] sched: define TIF_ALLOW_RESCHED On Fri, Sep 22 2023 at 00:55, Thomas Gleixner wrote: > On Thu, Sep 21 2023 at 09:00, Linus Torvalds wrote: @@ -22447,7 +22447,7 @@ Signed-off-by: Sebastian Andrzej Siewior 20 files changed, 171 insertions(+), 56 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index fe340c07ddbf..7bbf835fe725 100644 +index 261188e66e78..a29075276e1e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -273,6 +273,7 @@ config X86 @@ -22522,10 +22522,10 @@ index 6813171afccb..674a622c91be 100644 struct kvm_vcpu; diff --git a/include/linux/sched.h b/include/linux/sched.h -index eab173e5d09b..c02fd12b49dc 100644 +index d3b18c00d765..99c2e637591c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2050,17 +2050,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, +@@ -2052,17 +2052,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, update_ti_thread_flag(task_thread_info(tsk), flag, value); } @@ -22546,7 +22546,7 @@ index eab173e5d09b..c02fd12b49dc 100644 { return test_ti_thread_flag(task_thread_info(tsk), flag); } -@@ -2073,9 +2073,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) +@@ -2075,9 +2075,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) static inline void clear_tsk_need_resched(struct task_struct *tsk) { clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); @@ -22559,7 +22559,7 @@ index eab173e5d09b..c02fd12b49dc 100644 { return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } -@@ -2256,7 +2258,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) +@@ -2258,7 +2260,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) static __always_inline bool need_resched(void) { @@ -22654,7 +22654,7 @@ index 9ea0b28068f4..5ded1450ac1a 100644 #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h -index 696f8dc4aa53..e44b47305235 100644 +index 9d799777c333..a5e9a533559c 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -178,8 +178,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); @@ -22763,7 +22763,7 @@ index 2e0f75bcb7fd..d952fa5ee880 100644 if (ti_work & _TIF_NOTIFY_RESUME) diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index fb30aad3c1b6..f8ae421b2fed 100644 +index c6b0b04a3d37..a88f6276950a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -897,14 +897,15 @@ static inline void hrtick_rq_init(struct rq *rq) @@ -22909,7 +22909,7 @@ index 4c3d0d9f3db6..63e19b89c8c3 100644 } late_initcall(sched_init_debug); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index b2e1009e5706..e7e5569fd505 100644 +index db59bf549c64..f6e3fc3c20e4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1022,8 +1022,10 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se); @@ -22977,7 +22977,7 @@ index b2e1009e5706..e7e5569fd505 100644 static void update_curr_fair(struct rq *rq) { update_curr(cfs_rq_of(&rq->curr->se)); -@@ -5403,7 +5419,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5479,7 +5495,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) /* * Update run-time statistics of the 'current'. */ @@ -22986,7 +22986,7 @@ index b2e1009e5706..e7e5569fd505 100644 /* * Ensure that runnable average is periodically updated. -@@ -5417,7 +5433,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5493,7 +5509,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) * validating it and just reschedule. */ if (queued) { @@ -22995,7 +22995,7 @@ index b2e1009e5706..e7e5569fd505 100644 return; } /* -@@ -5563,7 +5579,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) +@@ -5639,7 +5655,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -23004,7 +23004,7 @@ index b2e1009e5706..e7e5569fd505 100644 } static __always_inline -@@ -5823,7 +5839,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) +@@ -5899,7 +5915,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) /* Determine whether we need to wake up potentially idle CPU: */ if (rq->curr == rq->idle && rq->cfs.nr_running) @@ -23013,7 +23013,7 @@ index b2e1009e5706..e7e5569fd505 100644 } #ifdef CONFIG_SMP -@@ -6528,7 +6544,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) +@@ -6604,7 +6620,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) if (delta < 0) { if (task_current(rq, p)) @@ -23022,7 +23022,7 @@ index b2e1009e5706..e7e5569fd505 100644 return; } hrtick_start(rq, delta); -@@ -8206,7 +8222,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -8282,7 +8298,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ * prevents us from potentially nominating it as a false LAST_BUDDY * below. */ @@ -23030,8 +23030,8 @@ index b2e1009e5706..e7e5569fd505 100644 + if (need_resched()) return; - /* Idle tasks are by definition preempted by non-idle tasks. */ -@@ -8248,7 +8264,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ + if (!sched_feat(WAKEUP_PREEMPTION)) +@@ -8320,7 +8336,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ return; preempt: @@ -23040,7 +23040,7 @@ index b2e1009e5706..e7e5569fd505 100644 } #ifdef CONFIG_SMP -@@ -12394,7 +12410,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) +@@ -12466,7 +12482,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) */ if (rq->core->core_forceidle_count && rq->cfs.nr_running == 1 && __entity_slice_used(&curr->se, MIN_NR_TASKS_DURING_FORCEIDLE)) @@ -23049,7 +23049,7 @@ index b2e1009e5706..e7e5569fd505 100644 } /* -@@ -12559,7 +12575,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) +@@ -12631,7 +12647,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) */ if (task_current(rq, p)) { if (p->prio > oldprio) @@ -23095,10 +23095,10 @@ index 8cbbbea7fdbb..00cdf0db8732 100644 extern struct rt_bandwidth def_rt_bandwidth; diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index fd398af792b4..03653fcb3ee3 100644 +index ecd869ed2767..c2684d3c5b2d 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c -@@ -2708,6 +2708,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) +@@ -2706,6 +2706,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) if (tif_need_resched()) trace_flags |= TRACE_FLAG_NEED_RESCHED; @@ -23108,7 +23108,7 @@ index fd398af792b4..03653fcb3ee3 100644 trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c -index 3b7d3e9eb6ea..5a4fefbc0856 100644 +index db575094c498..c251a44ad8ac 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c @@ -460,17 +460,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) @@ -23144,12 +23144,12 @@ index 3b7d3e9eb6ea..5a4fefbc0856 100644 need_resched = 'p'; break; -- -2.45.2 +2.47.1 -From 8c7eb81022a6d981fd35666afb4cb3c713fc72fd Mon Sep 17 00:00:00 2001 +From 67ce5e768dc42734e832c58b3830b84191df6e6c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 8 Jul 2015 17:14:48 +0200 -Subject: [PATCH 170/200] arm: Disable jump-label on PREEMPT_RT. +Subject: [PATCH 170/208] arm: Disable jump-label on PREEMPT_RT. jump-labels are used to efficiently switch between two possible code paths. To achieve this, stop_machine() is used to keep the CPU in a @@ -23185,12 +23185,12 @@ index 57c0448d017a..dea47ba6576b 100644 select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL -- -2.45.2 +2.47.1 -From 3fcbe46fbc2b3de05938bd97b6f3788ea35f9c61 Mon Sep 17 00:00:00 2001 +From 3ea83eac21b972c91226808a11355f160f0aadef Mon Sep 17 00:00:00 2001 From: "Yadi.hu" Date: Wed, 10 Dec 2014 10:32:09 +0800 -Subject: [PATCH 171/200] ARM: enable irq in translation/section permission +Subject: [PATCH 171/208] ARM: enable irq in translation/section permission fault handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -23281,12 +23281,12 @@ index fef62e4a9edd..622a30243f4a 100644 return 0; } -- -2.45.2 +2.47.1 -From da90c1ec4875b9c4d7ac666f0d794ac2e3354281 Mon Sep 17 00:00:00 2001 +From 39e262bc8bf805218f825bf1918b391cfeacaf38 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 28 Jul 2011 13:32:57 +0200 -Subject: [PATCH 172/200] tty/serial/omap: Make the locking RT aware +Subject: [PATCH 172/208] tty/serial/omap: Make the locking RT aware 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 @@ -23329,12 +23329,12 @@ index f4c6ff806465..1097fca22307 100644 static int __init -- -2.45.2 +2.47.1 -From 52945309b6536c556f6656536457215588042478 Mon Sep 17 00:00:00 2001 +From ae5fb3cf2f10c007a1085cd45bd6549c373b314e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 8 Jan 2013 21:36:51 +0100 -Subject: [PATCH 173/200] tty/serial/pl011: Make the locking work on RT +Subject: [PATCH 173/208] tty/serial/pl011: Make the locking work on RT 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. @@ -23376,12 +23376,12 @@ index 16c770311069..9cd660edb165 100644 clk_disable(uap->clk); } -- -2.45.2 +2.47.1 -From 31bc803789eaa693e39dc7c91ae1c314723085f7 Mon Sep 17 00:00:00 2001 +From dd2fc37bc3c2efe0f20b16e2f10bd59fc279759f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 19 May 2023 16:57:29 +0200 -Subject: [PATCH 174/200] ARM: vfp: Provide vfp_lock() for VFP locking. +Subject: [PATCH 174/208] ARM: vfp: Provide vfp_lock() for VFP locking. kernel_neon_begin() uses local_bh_disable() to ensure exclusive access to the VFP unit. This is broken on PREEMPT_RT because a BH disabled @@ -23456,12 +23456,12 @@ index 7e8773a2d99d..8d321cdb7ac5 100644 EXPORT_SYMBOL(kernel_neon_end); -- -2.45.2 +2.47.1 -From a2eb8e492682a634310eba3f3830e75b70367d52 Mon Sep 17 00:00:00 2001 +From e57faf5d2a7bf6db57274509ceef91a5e68eb316 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 19 May 2023 16:57:30 +0200 -Subject: [PATCH 175/200] ARM: vfp: Use vfp_lock() in vfp_sync_hwstate(). +Subject: [PATCH 175/208] ARM: vfp: Use vfp_lock() in vfp_sync_hwstate(). vfp_sync_hwstate() uses preempt_disable() followed by local_bh_disable() to ensure that it won't get interrupted while checking the VFP state. @@ -23505,12 +23505,12 @@ index 8d321cdb7ac5..3b9360bfc508 100644 /* Ensure that the thread reloads the hardware VFP state on the next use. */ -- -2.45.2 +2.47.1 -From 3baa84fe6cb61bda3caff48bfdf6184d268ebfbc Mon Sep 17 00:00:00 2001 +From 3c2dbe78e52f96e2cc3070eae0ccb860458342d4 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 28 Jun 2023 09:36:10 +0200 -Subject: [PATCH 176/200] ARM: vfp: Use vfp_lock() in vfp_support_entry(). +Subject: [PATCH 176/208] ARM: vfp: Use vfp_lock() in vfp_support_entry(). vfp_entry() is invoked from exception handler and is fully preemptible. It uses local_bh_disable() to remain uninterrupted while checking the @@ -23558,12 +23558,12 @@ index 3b9360bfc508..9543f011d0ed 100644 } -- -2.45.2 +2.47.1 -From 3ae0a70861ed7d8d75b4c54ab773322e44acecd9 Mon Sep 17 00:00:00 2001 +From bfef2fe58b4d9f8f219e8bdb62c9af62ba0201d5 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 28 Jun 2023 09:39:33 +0200 -Subject: [PATCH 177/200] ARM: vfp: Move sending signals outside of +Subject: [PATCH 177/208] ARM: vfp: Move sending signals outside of vfp_lock()ed section. VFP_bounce() is invoked from within vfp_support_entry() and may send a @@ -23684,12 +23684,12 @@ index 9543f011d0ed..9fde36fcb80c 100644 } -- -2.45.2 +2.47.1 -From fc0a49e37055effd8a80d99ca51fb9e91ac53b82 Mon Sep 17 00:00:00 2001 +From 3a8becbad9f2182224894a368f634df3aca28bf1 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 11 Oct 2019 13:14:29 +0200 -Subject: [PATCH 178/200] ARM: Allow to enable RT +Subject: [PATCH 178/208] ARM: Allow to enable RT Allow to select RT. @@ -23720,12 +23720,12 @@ index dea47ba6576b..a154ecd2d3c3 100644 select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RSEQ -- -2.45.2 +2.47.1 -From a7b8f883a99ec7c07816571b125001eae98495f8 Mon Sep 17 00:00:00 2001 +From 3b242707910552a7cbf0d94625317513eebc346d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 11 Oct 2019 13:14:35 +0200 -Subject: [PATCH 179/200] ARM64: Allow to enable RT +Subject: [PATCH 179/208] ARM64: Allow to enable RT Allow to select RT. @@ -23736,7 +23736,7 @@ Signed-off-by: Thomas Gleixner 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index f9777ce2ccb2..9717c564daac 100644 +index 658c6a61ab6f..f5d5c265f438 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -97,6 +97,7 @@ config ARM64 @@ -23748,12 +23748,12 @@ index f9777ce2ccb2..9717c564daac 100644 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT select ARCH_WANT_DEFAULT_BPF_JIT -- -2.45.2 +2.47.1 -From 6f76d8b829e4350f8f42def01cb26467095c6896 Mon Sep 17 00:00:00 2001 +From c6be49a259ace620a0a315edb5d22705c62f12dd Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 26 Jul 2019 11:30:49 +0200 -Subject: [PATCH 180/200] powerpc: traps: Use PREEMPT_RT +Subject: [PATCH 180/208] powerpc: traps: Use PREEMPT_RT Add PREEMPT_RT to the backtrace if enabled. @@ -23787,12 +23787,12 @@ index 2de7f6dcd32b..739f5b179a7f 100644 IS_ENABLED(CONFIG_SMP) ? (" NR_CPUS=" __stringify(NR_CPUS)) : "", debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "", -- -2.45.2 +2.47.1 -From 0d276945c8ce6aa0016bbec90e20ab00f2f46001 Mon Sep 17 00:00:00 2001 +From 4227464884c6ef9c2e0bcf6b31f52712ebb8978b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 26 Mar 2019 18:31:54 +0100 -Subject: [PATCH 181/200] powerpc/pseries/iommu: Use a locallock instead +Subject: [PATCH 181/208] powerpc/pseries/iommu: Use a locallock instead local_irq_save() The locallock protects the per-CPU variable tce_page. The function @@ -23904,12 +23904,12 @@ index b1e6d275cda9..9a8d3970da3c 100644 } -- -2.45.2 +2.47.1 -From 9ae50b2f3a9898f44e3518e6291effe072146961 Mon Sep 17 00:00:00 2001 +From ce2a98d6743fdfa2ce083425795010dcaead5f4a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 9 Mar 2023 09:13:52 +0100 -Subject: [PATCH 182/200] powerpc/pseries: Select the generic memory allocator. +Subject: [PATCH 182/208] powerpc/pseries: Select the generic memory allocator. The RTAS work area allocator is using the generic memory allocator and as such it must select it. @@ -23936,12 +23936,12 @@ index 4ebf2ef2845d..381c3be3bec1 100644 select MPIC select OF_DYNAMIC -- -2.45.2 +2.47.1 -From d12f74dc169aaa3661ed54e616e3e98c1e23ad2e Mon Sep 17 00:00:00 2001 +From 5b6b2bea3ca2a02dacee8e20333cab889409193a Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata Date: Fri, 24 Apr 2015 15:53:13 +0000 -Subject: [PATCH 183/200] powerpc/kvm: Disable in-kernel MPIC emulation for +Subject: [PATCH 183/208] powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT While converting the openpic emulation code to use a raw_spinlock_t enables @@ -23981,12 +23981,12 @@ index 902611954200..2f188137f830 100644 select HAVE_KVM_IRQFD select HAVE_KVM_IRQ_ROUTING -- -2.45.2 +2.47.1 -From f3c9904e5c191e737726498ec089842a242c3614 Mon Sep 17 00:00:00 2001 +From bf383b8e905c91f6fca038a0b6b78003529821df Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 26 Mar 2019 18:31:29 +0100 -Subject: [PATCH 184/200] powerpc/stackprotector: work around stack-guard init +Subject: [PATCH 184/208] powerpc/stackprotector: work around stack-guard init from atomic This is invoked from the secondary CPU in atomic context. On x86 we use @@ -24020,12 +24020,12 @@ index 283c34647856..4727f40052dd 100644 #ifdef CONFIG_PPC64 get_paca()->canary = canary; -- -2.45.2 +2.47.1 -From 0df0a0d051dfaed7ae0f3a03f3f2f990e5072308 Mon Sep 17 00:00:00 2001 +From 7d77e4323019bc245fac791b4c6c48457247f5f2 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 11 Oct 2019 13:14:41 +0200 -Subject: [PATCH 185/200] POWERPC: Allow to enable RT +Subject: [PATCH 185/208] POWERPC: Allow to enable RT Allow to select RT. @@ -24036,7 +24036,7 @@ Signed-off-by: Thomas Gleixner 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index 2fe51e0ad637..116444551038 100644 +index 6baa8b85601a..cca3f7ca6f10 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -166,6 +166,7 @@ config PPC @@ -24056,12 +24056,12 @@ index 2fe51e0ad637..116444551038 100644 select HAVE_SETUP_PER_CPU_AREA if PPC64 select HAVE_SOFTIRQ_ON_OWN_STACK -- -2.45.2 +2.47.1 -From 1eca1d3468c701a89e28e59735189ac66ad6d2c7 Mon Sep 17 00:00:00 2001 +From 786ed6fd0e70874203cd22136dfa7dfe633220d0 Mon Sep 17 00:00:00 2001 From: Evan Green Date: Mon, 6 Nov 2023 14:58:55 -0800 -Subject: [PATCH 186/200] RISC-V: Probe misaligned access speed in parallel +Subject: [PATCH 186/208] RISC-V: Probe misaligned access speed in parallel Probing for misaligned access speed takes about 0.06 seconds. On a system with 64 cores, doing this in smp_callin() means it's done @@ -24104,7 +24104,7 @@ index d0345bd659c9..23fed53b8815 100644 - #endif diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c -index e39a905aca24..9d8b6b463592 100644 +index bb5fb2b820a2..01dc099bfcdf 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -8,6 +8,7 @@ @@ -24123,7 +24123,7 @@ index e39a905aca24..9d8b6b463592 100644 #define MISALIGNED_COPY_SIZE ((MISALIGNED_BUFFER_SIZE / 2) - 0x80) unsigned long elf_hwcap __read_mostly; -@@ -571,14 +573,15 @@ unsigned long riscv_get_elf_hwcap(void) +@@ -575,14 +577,15 @@ unsigned long riscv_get_elf_hwcap(void) return hwcap; } @@ -24141,7 +24141,7 @@ index e39a905aca24..9d8b6b463592 100644 void *dst; void *src; long speed = RISCV_HWPROBE_MISALIGNED_SLOW; -@@ -645,7 +648,7 @@ void check_unaligned_access(int cpu) +@@ -649,7 +652,7 @@ void check_unaligned_access(int cpu) pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned access speed\n", cpu); @@ -24150,7 +24150,7 @@ index e39a905aca24..9d8b6b463592 100644 } if (word_cycles < byte_cycles) -@@ -659,18 +662,83 @@ void check_unaligned_access(int cpu) +@@ -663,18 +666,83 @@ void check_unaligned_access(int cpu) (speed == RISCV_HWPROBE_MISALIGNED_FAST) ? "fast" : "slow"); per_cpu(misaligned_access_speed, cpu) = speed; @@ -24252,12 +24252,12 @@ index 1b8da4e40a4d..2cb5e651412c 100644 if (has_vector()) { if (riscv_v_setup_vsize()) -- -2.45.2 +2.47.1 -From e051b53809f795682c5608dccbfa7b41b8313fdc Mon Sep 17 00:00:00 2001 +From 7952ec7a8b04276c12d486e2b2431e413e540b4d Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Tue, 31 Oct 2023 22:35:20 +0800 -Subject: [PATCH 187/200] riscv: add PREEMPT_AUTO support +Subject: [PATCH 187/208] riscv: add PREEMPT_AUTO support riscv has switched to GENERIC_ENTRY, so adding PREEMPT_AUTO is as simple as adding TIF_ARCH_RESCHED_LAZY related definitions and enabling @@ -24271,10 +24271,10 @@ Signed-off-by: Sebastian Andrzej Siewior 2 files changed, 3 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig -index c785a0200573..ea01aa411e2c 100644 +index 1304992232ad..f05883adb5f7 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig -@@ -135,6 +135,7 @@ config RISCV +@@ -136,6 +136,7 @@ config RISCV select HAVE_PERF_USER_STACK_DUMP select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_PREEMPT_DYNAMIC_KEY if !XIP_KERNEL @@ -24283,10 +24283,10 @@ index c785a0200573..ea01aa411e2c 100644 select HAVE_RETHOOK if !XIP_KERNEL select HAVE_RSEQ diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h -index d18ce0113ca1..e18710fe51f0 100644 +index 8c72d1bcdf14..c59ad9b7af11 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h -@@ -82,6 +82,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -86,6 +86,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); * - pending work-to-be-done flags are in lowest half-word * - other flags in upper half-word(s) */ @@ -24294,7 +24294,7 @@ index d18ce0113ca1..e18710fe51f0 100644 #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ -@@ -96,6 +97,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -100,6 +101,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) #define _TIF_UPROBE (1 << TIF_UPROBE) @@ -24303,12 +24303,12 @@ index d18ce0113ca1..e18710fe51f0 100644 #define _TIF_WORK_MASK \ (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED | \ -- -2.45.2 +2.47.1 -From 585420a814687313a96fe2f48820d53b6c0810a5 Mon Sep 17 00:00:00 2001 +From e97d73a9ea0b571254d00205debed3c8644262fa Mon Sep 17 00:00:00 2001 From: Jisheng Zhang Date: Tue, 31 Oct 2023 22:35:21 +0800 -Subject: [PATCH 188/200] riscv: allow to enable RT +Subject: [PATCH 188/208] riscv: allow to enable RT Now, it's ready to enable RT on riscv. @@ -24319,10 +24319,10 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 1 insertion(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig -index ea01aa411e2c..e05c170781c6 100644 +index f05883adb5f7..391adf8ffc8d 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig -@@ -48,6 +48,7 @@ config RISCV +@@ -49,6 +49,7 @@ config RISCV select ARCH_SUPPORTS_HUGETLBFS if MMU select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU select ARCH_SUPPORTS_PER_VMA_LOCK if MMU @@ -24331,12 +24331,12 @@ index ea01aa411e2c..e05c170781c6 100644 select ARCH_USE_QUEUED_RWLOCKS select ARCH_USES_CFI_TRAPS if CFI_CLANG -- -2.45.2 +2.47.1 -From 83df018e7cc966e1e46443d3073340ce16206ddc Mon Sep 17 00:00:00 2001 +From 602bdbddfa5a1f8ef337bdf6ad99c6d9c54a41a6 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Sat, 30 Jul 2011 21:55:53 -0500 -Subject: [PATCH 189/200] sysfs: Add /sys/kernel/realtime entry +Subject: [PATCH 189/208] sysfs: Add /sys/kernel/realtime entry Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. @@ -24385,12 +24385,12 @@ index 1d4bc493b2f4..486c68c11bbe 100644 NULL }; -- -2.45.2 +2.47.1 -From 4ab189a9e35edbb3d87000a96f48c81934cf790f Mon Sep 17 00:00:00 2001 +From 770920ce5f61675d41f1f3ebf3ca8663dd5aaa96 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Mon, 5 Feb 2024 14:04:38 -0600 -Subject: [PATCH 190/200] arch/riscv: check_unaligned_acces(): don't alloc page +Subject: [PATCH 190/208] arch/riscv: check_unaligned_acces(): don't alloc page for check Drop the alloc_pages() call since the page is passed in as @@ -24403,10 +24403,10 @@ Signed-off-by: Clark Williams 1 file changed, 6 deletions(-) diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c -index 9d8b6b463592..dd118773e717 100644 +index 01dc099bfcdf..25b6819b66a3 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c -@@ -590,12 +590,6 @@ static int check_unaligned_access(void *param) +@@ -594,12 +594,6 @@ static int check_unaligned_access(void *param) if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN) return; @@ -24420,12 +24420,12 @@ index 9d8b6b463592..dd118773e717 100644 dst = (void *)((unsigned long)page_address(page) | 0x1); /* Unalign src as well, but differently (off by 1 + 2 = 3). */ -- -2.45.2 +2.47.1 -From 69bf5b5f3dd79e298acc2a4b6b22140c472a6321 Mon Sep 17 00:00:00 2001 +From 9d9504d267557df686147f3cbeb9bb272ac19a67 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Tue, 6 Feb 2024 12:17:19 -0600 -Subject: [PATCH 191/200] Revert "preempt: Put preempt_enable() within an +Subject: [PATCH 191/208] Revert "preempt: Put preempt_enable() within an instrumentation*() section." This reverts commit cc3d27d9fdeddcb82db3ea176a44a5509e70eb1c. @@ -24467,12 +24467,12 @@ index cd16f0330fba..9aa6358a1a16 100644 #define preempt_check_resched() \ -- -2.45.2 +2.47.1 -From 77dbb0def582e5d2d9f82185289e2fc74196ab35 Mon Sep 17 00:00:00 2001 +From 43c438d63cc5352246f316c45d280107f6bb566e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 8 Jul 2011 20:25:16 +0200 -Subject: [PATCH 192/200] Add localversion for -RT release +Subject: [PATCH 192/208] Add localversion for -RT release Signed-off-by: Thomas Gleixner --- @@ -24488,12 +24488,12 @@ index 000000000000..483ad771f201 @@ -0,0 +1 @@ +-rt19 -- -2.45.2 +2.47.1 -From a879175afc8b430c8456afedbe47e3689bb9febc Mon Sep 17 00:00:00 2001 +From 44266000ae6b9b08825e3ccc6cf1d8fe51521e92 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Tue, 27 Feb 2024 17:13:28 -0600 -Subject: [PATCH 193/200] Linux 6.6.18-rt23 REBASE +Subject: [PATCH 193/208] Linux 6.6.18-rt23 REBASE Signed-off-by: Clark Williams --- @@ -24508,12 +24508,12 @@ index 483ad771f201..9a218ca23053 100644 --rt19 +-rt23 -- -2.45.2 +2.47.1 -From 7d4540446deab8fbe3db82b11920b40f6e35948b Mon Sep 17 00:00:00 2001 +From 239700dac371a2c43922fb74d750d98dc50c53fe Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 23 Jan 2024 12:56:21 +0100 -Subject: [PATCH 194/200] arm: Disable FAST_GUP on PREEMPT_RT if HIGHPTE is +Subject: [PATCH 194/208] arm: Disable FAST_GUP on PREEMPT_RT if HIGHPTE is also enabled. gup_pgd_range() is invoked with disabled interrupts and invokes @@ -24550,12 +24550,12 @@ index a154ecd2d3c3..e5a283851c02 100644 select HAVE_FUNCTION_ERROR_INJECTION select HAVE_FUNCTION_GRAPH_TRACER -- -2.45.2 +2.47.1 -From 3259e01628d422b8949cf293be11999aaa9f101b Mon Sep 17 00:00:00 2001 +From e35b4bb5939a44bd3b3dbbcb436c667da0cd7822 Mon Sep 17 00:00:00 2001 From: Junxiao Chang Date: Tue, 23 Jan 2024 13:40:32 +0800 -Subject: [PATCH 195/200] printk: nbcon: move locked_port flag to struct +Subject: [PATCH 195/208] printk: nbcon: move locked_port flag to struct uart_port Console pointer in uart_port might be shared among multiple uart @@ -24646,12 +24646,12 @@ index 1b1b585b1675..b53d93585ee7 100644 EXPORT_SYMBOL_GPL(nbcon_release); -- -2.45.2 +2.47.1 -From 7e85381d11952023d44d5fbd03b96f4c0b33c5d2 Mon Sep 17 00:00:00 2001 +From 96c24b9bd1085e66af9ffd267bf76be6c5821678 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Tue, 25 Jun 2024 17:08:39 -0500 -Subject: [PATCH 196/200] Linux 6.6.35-rt34 REBASE +Subject: [PATCH 196/208] Linux 6.6.35-rt34 REBASE Signed-off-by: Clark Williams --- @@ -24666,12 +24666,12 @@ index 9a218ca23053..21988f9ad53f 100644 --rt23 +-rt34 -- -2.45.2 +2.47.1 -From 3838d2044a0bee77d9ed551e7484c710014e398e Mon Sep 17 00:00:00 2001 +From 92e10adf55ab164649443239a88b4a4c2c515758 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 20 Jun 2024 11:21:13 +0200 -Subject: [PATCH 197/200] prinkt/nbcon: Add a scheduling point to +Subject: [PATCH 197/208] prinkt/nbcon: Add a scheduling point to nbcon_kthread_func(). Constant printing can lead to a CPU hog in nbcon_kthread_func(). The @@ -24707,12 +24707,12 @@ index b53d93585ee7..b941039ee7d2 100644 } while (backlog); -- -2.45.2 +2.47.1 -From 9d488acbe8b345ff1f04789043498a3a9d928a08 Mon Sep 17 00:00:00 2001 +From 8b9221c9412ab1f1cb811528cf5ad94583fb5d7e Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Sun, 28 Jul 2024 15:53:21 -0500 -Subject: [PATCH 198/200] Linux 6.6.43-rt38 REBASE +Subject: [PATCH 198/208] Linux 6.6.43-rt38 REBASE Signed-off-by: Clark Williams --- @@ -24727,12 +24727,12 @@ index 21988f9ad53f..49bae8d6aa67 100644 --rt34 +-rt38 -- -2.45.2 +2.47.1 -From cea05c7dc6b60be3377cb435d00464ebb1e58d3c Mon Sep 17 00:00:00 2001 +From e122213f4e7ec23e27528545f5f7038f9c8c32ed Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 5 Aug 2024 09:48:12 -0500 -Subject: [PATCH 199/200] riscv: Add return value to check_unaligned_access(). +Subject: [PATCH 199/208] riscv: Add return value to check_unaligned_access(). The stable backport of commit c20d36cc2a207 ("riscv: don't probe unaligned access speed if already done") added a `return' stament to @@ -24750,10 +24750,10 @@ Signed-off-by: Clark Williams 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c -index dd118773e717..347cdf56f3a1 100644 +index 25b6819b66a3..3f2767c9b01f 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c -@@ -588,7 +588,7 @@ static int check_unaligned_access(void *param) +@@ -592,7 +592,7 @@ static int check_unaligned_access(void *param) /* We are already set since the last check */ if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN) @@ -24763,12 +24763,12 @@ index dd118773e717..347cdf56f3a1 100644 /* Make an unaligned destination buffer. */ dst = (void *)((unsigned long)page_address(page) | 0x1); -- -2.45.2 +2.47.1 -From 1f943bc825265e0213a171e0b60e696817796d24 Mon Sep 17 00:00:00 2001 +From 5af358559c40f856e237af1eb6bae6a9f6e8721c Mon Sep 17 00:00:00 2001 From: Clark Williams -Date: Tue, 6 Aug 2024 13:36:02 -0500 -Subject: [PATCH 200/200] Linux 6.6.44-rt39 REBASE +Date: Thu, 24 Oct 2024 13:54:42 -0500 +Subject: [PATCH 200/208] Linux 6.6.58-rt45 REBASE Signed-off-by: Clark Williams --- @@ -24776,12 +24776,838 @@ Signed-off-by: Clark Williams 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localversion-rt b/localversion-rt -index 49bae8d6aa67..5498386d0d0c 100644 +index 49bae8d6aa67..38c40b21a885 100644 --- a/localversion-rt +++ b/localversion-rt @@ -1 +1 @@ --rt38 -+-rt39 ++-rt45 +-- +2.47.1 + +From 59022c36e7c43c268e3c52ee489885c25daba2e8 Mon Sep 17 00:00:00 2001 +From: Jan Stancek +Date: Fri, 12 Jul 2024 09:11:14 +0200 +Subject: [PATCH 201/208] sign-file,extract-cert: move common SSL helper + functions to a header + +Couple error handling helpers are repeated in both tools, so +move them to a common header. + +Signed-off-by: Jan Stancek +Reviewed-by: Jarkko Sakkinen +Tested-by: R Nageswara Sastry +Reviewed-by: Neal Gompa +Signed-off-by: Jarkko Sakkinen +Signed-off-by: Clark Williams +--- + MAINTAINERS | 1 + + certs/Makefile | 2 +- + certs/extract-cert.c | 37 ++----------------------------------- + scripts/sign-file.c | 37 ++----------------------------------- + scripts/ssl-common.h | 39 +++++++++++++++++++++++++++++++++++++++ + 5 files changed, 45 insertions(+), 71 deletions(-) + create mode 100644 scripts/ssl-common.h + +diff --git a/MAINTAINERS b/MAINTAINERS +index ae4c0cec5073..294d2ce29b73 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -4784,6 +4784,7 @@ S: Maintained + F: Documentation/admin-guide/module-signing.rst + F: certs/ + F: scripts/sign-file.c ++F: scripts/ssl-common.h + F: tools/certs/ + + CFAG12864B LCD DRIVER +diff --git a/certs/Makefile b/certs/Makefile +index 799ad7b9e68a..67e1f2707c2f 100644 +--- a/certs/Makefile ++++ b/certs/Makefile +@@ -84,5 +84,5 @@ targets += x509_revocation_list + + hostprogs := extract-cert + +-HOSTCFLAGS_extract-cert.o = $(shell $(HOSTPKG_CONFIG) --cflags libcrypto 2> /dev/null) ++HOSTCFLAGS_extract-cert.o = $(shell $(HOSTPKG_CONFIG) --cflags libcrypto 2> /dev/null) -I$(srctree)/scripts + HOSTLDLIBS_extract-cert = $(shell $(HOSTPKG_CONFIG) --libs libcrypto 2> /dev/null || echo -lcrypto) +diff --git a/certs/extract-cert.c b/certs/extract-cert.c +index 70e9ec89d87d..8e7ba9974a1f 100644 +--- a/certs/extract-cert.c ++++ b/certs/extract-cert.c +@@ -23,6 +23,8 @@ + #include + #include + ++#include "ssl-common.h" ++ + /* + * OpenSSL 3.0 deprecates the OpenSSL's ENGINE API. + * +@@ -40,41 +42,6 @@ void format(void) + exit(2); + } + +-static void display_openssl_errors(int l) +-{ +- const char *file; +- char buf[120]; +- int e, line; +- +- if (ERR_peek_error() == 0) +- return; +- fprintf(stderr, "At main.c:%d:\n", l); +- +- while ((e = ERR_get_error_line(&file, &line))) { +- ERR_error_string(e, buf); +- fprintf(stderr, "- SSL %s: %s:%d\n", buf, file, line); +- } +-} +- +-static void drain_openssl_errors(void) +-{ +- const char *file; +- int line; +- +- if (ERR_peek_error() == 0) +- return; +- while (ERR_get_error_line(&file, &line)) {} +-} +- +-#define ERR(cond, fmt, ...) \ +- do { \ +- bool __cond = (cond); \ +- display_openssl_errors(__LINE__); \ +- if (__cond) { \ +- err(1, fmt, ## __VA_ARGS__); \ +- } \ +- } while(0) +- + static const char *key_pass; + static BIO *wb; + static char *cert_dst; +diff --git a/scripts/sign-file.c b/scripts/sign-file.c +index 3edb156ae52c..39ba58db5d4e 100644 +--- a/scripts/sign-file.c ++++ b/scripts/sign-file.c +@@ -29,6 +29,8 @@ + #include + #include + ++#include "ssl-common.h" ++ + /* + * OpenSSL 3.0 deprecates the OpenSSL's ENGINE API. + * +@@ -83,41 +85,6 @@ void format(void) + exit(2); + } + +-static void display_openssl_errors(int l) +-{ +- const char *file; +- char buf[120]; +- int e, line; +- +- if (ERR_peek_error() == 0) +- return; +- fprintf(stderr, "At main.c:%d:\n", l); +- +- while ((e = ERR_get_error_line(&file, &line))) { +- ERR_error_string(e, buf); +- fprintf(stderr, "- SSL %s: %s:%d\n", buf, file, line); +- } +-} +- +-static void drain_openssl_errors(void) +-{ +- const char *file; +- int line; +- +- if (ERR_peek_error() == 0) +- return; +- while (ERR_get_error_line(&file, &line)) {} +-} +- +-#define ERR(cond, fmt, ...) \ +- do { \ +- bool __cond = (cond); \ +- display_openssl_errors(__LINE__); \ +- if (__cond) { \ +- errx(1, fmt, ## __VA_ARGS__); \ +- } \ +- } while(0) +- + static const char *key_pass; + + static int pem_pw_cb(char *buf, int len, int w, void *v) +diff --git a/scripts/ssl-common.h b/scripts/ssl-common.h +new file mode 100644 +index 000000000000..e6711c75ed91 +--- /dev/null ++++ b/scripts/ssl-common.h +@@ -0,0 +1,39 @@ ++/* SPDX-License-Identifier: LGPL-2.1+ */ ++/* ++ * SSL helper functions shared by sign-file and extract-cert. ++ */ ++ ++static void display_openssl_errors(int l) ++{ ++ const char *file; ++ char buf[120]; ++ int e, line; ++ ++ if (ERR_peek_error() == 0) ++ return; ++ fprintf(stderr, "At main.c:%d:\n", l); ++ ++ while ((e = ERR_get_error_line(&file, &line))) { ++ ERR_error_string(e, buf); ++ fprintf(stderr, "- SSL %s: %s:%d\n", buf, file, line); ++ } ++} ++ ++static void drain_openssl_errors(void) ++{ ++ const char *file; ++ int line; ++ ++ if (ERR_peek_error() == 0) ++ return; ++ while (ERR_get_error_line(&file, &line)) {} ++} ++ ++#define ERR(cond, fmt, ...) \ ++ do { \ ++ bool __cond = (cond); \ ++ display_openssl_errors(__LINE__); \ ++ if (__cond) { \ ++ errx(1, fmt, ## __VA_ARGS__); \ ++ } \ ++ } while (0) +-- +2.47.1 + +From 22bf8110771a85f5d070c2da584d264c18469eeb Mon Sep 17 00:00:00 2001 +From: Jan Stancek +Date: Fri, 12 Jul 2024 09:11:15 +0200 +Subject: [PATCH 202/208] sign-file,extract-cert: avoid using deprecated + ERR_get_error_line() + +ERR_get_error_line() is deprecated since OpenSSL 3.0. + +Use ERR_peek_error_line() instead, and combine display_openssl_errors() +and drain_openssl_errors() to a single function where parameter decides +if it should consume errors silently. + +Signed-off-by: Jan Stancek +Reviewed-by: Jarkko Sakkinen +Tested-by: R Nageswara Sastry +Reviewed-by: Neal Gompa +Signed-off-by: Jarkko Sakkinen +Signed-off-by: Clark Williams +--- + certs/extract-cert.c | 4 ++-- + scripts/sign-file.c | 6 +++--- + scripts/ssl-common.h | 23 ++++++++--------------- + 3 files changed, 13 insertions(+), 20 deletions(-) + +diff --git a/certs/extract-cert.c b/certs/extract-cert.c +index 8e7ba9974a1f..61bbe0085671 100644 +--- a/certs/extract-cert.c ++++ b/certs/extract-cert.c +@@ -99,11 +99,11 @@ int main(int argc, char **argv) + parms.cert = NULL; + + ENGINE_load_builtin_engines(); +- drain_openssl_errors(); ++ drain_openssl_errors(__LINE__, 1); + e = ENGINE_by_id("pkcs11"); + ERR(!e, "Load PKCS#11 ENGINE"); + if (ENGINE_init(e)) +- drain_openssl_errors(); ++ drain_openssl_errors(__LINE__, 1); + else + ERR(1, "ENGINE_init"); + if (key_pass) +diff --git a/scripts/sign-file.c b/scripts/sign-file.c +index 39ba58db5d4e..bb3fdf1a617c 100644 +--- a/scripts/sign-file.c ++++ b/scripts/sign-file.c +@@ -114,11 +114,11 @@ static EVP_PKEY *read_private_key(const char *private_key_name) + ENGINE *e; + + ENGINE_load_builtin_engines(); +- drain_openssl_errors(); ++ drain_openssl_errors(__LINE__, 1); + e = ENGINE_by_id("pkcs11"); + ERR(!e, "Load PKCS#11 ENGINE"); + if (ENGINE_init(e)) +- drain_openssl_errors(); ++ drain_openssl_errors(__LINE__, 1); + else + ERR(1, "ENGINE_init"); + if (key_pass) +@@ -273,7 +273,7 @@ int main(int argc, char **argv) + + /* Digest the module data. */ + OpenSSL_add_all_digests(); +- display_openssl_errors(__LINE__); ++ drain_openssl_errors(__LINE__, 0); + digest_algo = EVP_get_digestbyname(hash_algo); + ERR(!digest_algo, "EVP_get_digestbyname"); + +diff --git a/scripts/ssl-common.h b/scripts/ssl-common.h +index e6711c75ed91..2db0e181143c 100644 +--- a/scripts/ssl-common.h ++++ b/scripts/ssl-common.h +@@ -3,7 +3,7 @@ + * SSL helper functions shared by sign-file and extract-cert. + */ + +-static void display_openssl_errors(int l) ++static void drain_openssl_errors(int l, int silent) + { + const char *file; + char buf[120]; +@@ -11,28 +11,21 @@ static void display_openssl_errors(int l) + + if (ERR_peek_error() == 0) + return; +- fprintf(stderr, "At main.c:%d:\n", l); ++ if (!silent) ++ fprintf(stderr, "At main.c:%d:\n", l); + +- while ((e = ERR_get_error_line(&file, &line))) { ++ while ((e = ERR_peek_error_line(&file, &line))) { + ERR_error_string(e, buf); +- fprintf(stderr, "- SSL %s: %s:%d\n", buf, file, line); ++ if (!silent) ++ fprintf(stderr, "- SSL %s: %s:%d\n", buf, file, line); ++ ERR_get_error(); + } + } + +-static void drain_openssl_errors(void) +-{ +- const char *file; +- int line; +- +- if (ERR_peek_error() == 0) +- return; +- while (ERR_get_error_line(&file, &line)) {} +-} +- + #define ERR(cond, fmt, ...) \ + do { \ + bool __cond = (cond); \ +- display_openssl_errors(__LINE__); \ ++ drain_openssl_errors(__LINE__, 0); \ + if (__cond) { \ + errx(1, fmt, ## __VA_ARGS__); \ + } \ +-- +2.47.1 + +From 713cf2c40c9dc84b78dc33b935f552b6e101a56b Mon Sep 17 00:00:00 2001 +From: Jan Stancek +Date: Fri, 20 Sep 2024 19:52:48 +0300 +Subject: [PATCH 203/208] sign-file,extract-cert: use pkcs11 provider for + OPENSSL MAJOR >= 3 + +ENGINE API has been deprecated since OpenSSL version 3.0 [1]. +Distros have started dropping support from headers and in future +it will likely disappear also from library. + +It has been superseded by the PROVIDER API, so use it instead +for OPENSSL MAJOR >= 3. + +[1] https://github.com/openssl/openssl/blob/master/README-ENGINES.md + +[jarkko: fixed up alignment issues reported by checkpatch.pl --strict] + +Signed-off-by: Jan Stancek +Reviewed-by: Jarkko Sakkinen +Tested-by: R Nageswara Sastry +Reviewed-by: Neal Gompa +Signed-off-by: Jarkko Sakkinen +Signed-off-by: Clark Williams +--- + certs/extract-cert.c | 103 ++++++++++++++++++++++++++++++------------- + scripts/sign-file.c | 93 ++++++++++++++++++++++++++------------ + 2 files changed, 138 insertions(+), 58 deletions(-) + +diff --git a/certs/extract-cert.c b/certs/extract-cert.c +index 61bbe0085671..7d6d468ed612 100644 +--- a/certs/extract-cert.c ++++ b/certs/extract-cert.c +@@ -21,17 +21,18 @@ + #include + #include + #include +-#include +- ++#if OPENSSL_VERSION_MAJOR >= 3 ++# define USE_PKCS11_PROVIDER ++# include ++# include ++#else ++# if !defined(OPENSSL_NO_ENGINE) && !defined(OPENSSL_NO_DEPRECATED_3_0) ++# define USE_PKCS11_ENGINE ++# include ++# endif ++#endif + #include "ssl-common.h" + +-/* +- * OpenSSL 3.0 deprecates the OpenSSL's ENGINE API. +- * +- * Remove this if/when that API is no longer used +- */ +-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- + #define PKEY_ID_PKCS7 2 + + static __attribute__((noreturn)) +@@ -61,6 +62,66 @@ static void write_cert(X509 *x509) + fprintf(stderr, "Extracted cert: %s\n", buf); + } + ++static X509 *load_cert_pkcs11(const char *cert_src) ++{ ++ X509 *cert = NULL; ++#ifdef USE_PKCS11_PROVIDER ++ OSSL_STORE_CTX *store; ++ ++ if (!OSSL_PROVIDER_try_load(NULL, "pkcs11", true)) ++ ERR(1, "OSSL_PROVIDER_try_load(pkcs11)"); ++ if (!OSSL_PROVIDER_try_load(NULL, "default", true)) ++ ERR(1, "OSSL_PROVIDER_try_load(default)"); ++ ++ store = OSSL_STORE_open(cert_src, NULL, NULL, NULL, NULL); ++ ERR(!store, "OSSL_STORE_open"); ++ ++ while (!OSSL_STORE_eof(store)) { ++ OSSL_STORE_INFO *info = OSSL_STORE_load(store); ++ ++ if (!info) { ++ drain_openssl_errors(__LINE__, 0); ++ continue; ++ } ++ if (OSSL_STORE_INFO_get_type(info) == OSSL_STORE_INFO_CERT) { ++ cert = OSSL_STORE_INFO_get1_CERT(info); ++ ERR(!cert, "OSSL_STORE_INFO_get1_CERT"); ++ } ++ OSSL_STORE_INFO_free(info); ++ if (cert) ++ break; ++ } ++ OSSL_STORE_close(store); ++#elif defined(USE_PKCS11_ENGINE) ++ ENGINE *e; ++ struct { ++ const char *cert_id; ++ X509 *cert; ++ } parms; ++ ++ parms.cert_id = cert_src; ++ parms.cert = NULL; ++ ++ ENGINE_load_builtin_engines(); ++ drain_openssl_errors(__LINE__, 1); ++ e = ENGINE_by_id("pkcs11"); ++ ERR(!e, "Load PKCS#11 ENGINE"); ++ if (ENGINE_init(e)) ++ drain_openssl_errors(__LINE__, 1); ++ else ++ ERR(1, "ENGINE_init"); ++ if (key_pass) ++ ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0), "Set PKCS#11 PIN"); ++ ENGINE_ctrl_cmd(e, "LOAD_CERT_CTRL", 0, &parms, NULL, 1); ++ ERR(!parms.cert, "Get X.509 from PKCS#11"); ++ cert = parms.cert; ++#else ++ fprintf(stderr, "no pkcs11 engine/provider available\n"); ++ exit(1); ++#endif ++ return cert; ++} ++ + int main(int argc, char **argv) + { + char *cert_src; +@@ -89,28 +150,10 @@ int main(int argc, char **argv) + fclose(f); + exit(0); + } else if (!strncmp(cert_src, "pkcs11:", 7)) { +- ENGINE *e; +- struct { +- const char *cert_id; +- X509 *cert; +- } parms; ++ X509 *cert = load_cert_pkcs11(cert_src); + +- parms.cert_id = cert_src; +- parms.cert = NULL; +- +- ENGINE_load_builtin_engines(); +- drain_openssl_errors(__LINE__, 1); +- e = ENGINE_by_id("pkcs11"); +- ERR(!e, "Load PKCS#11 ENGINE"); +- if (ENGINE_init(e)) +- drain_openssl_errors(__LINE__, 1); +- else +- ERR(1, "ENGINE_init"); +- if (key_pass) +- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0), "Set PKCS#11 PIN"); +- ENGINE_ctrl_cmd(e, "LOAD_CERT_CTRL", 0, &parms, NULL, 1); +- ERR(!parms.cert, "Get X.509 from PKCS#11"); +- write_cert(parms.cert); ++ ERR(!cert, "load_cert_pkcs11 failed"); ++ write_cert(cert); + } else { + BIO *b; + X509 *x509; +diff --git a/scripts/sign-file.c b/scripts/sign-file.c +index bb3fdf1a617c..7070245edfc1 100644 +--- a/scripts/sign-file.c ++++ b/scripts/sign-file.c +@@ -27,17 +27,18 @@ + #include + #include + #include +-#include +- ++#if OPENSSL_VERSION_MAJOR >= 3 ++# define USE_PKCS11_PROVIDER ++# include ++# include ++#else ++# if !defined(OPENSSL_NO_ENGINE) && !defined(OPENSSL_NO_DEPRECATED_3_0) ++# define USE_PKCS11_ENGINE ++# include ++# endif ++#endif + #include "ssl-common.h" + +-/* +- * OpenSSL 3.0 deprecates the OpenSSL's ENGINE API. +- * +- * Remove this if/when that API is no longer used +- */ +-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- + /* + * Use CMS if we have openssl-1.0.0 or newer available - otherwise we have to + * assume that it's not available and its header file is missing and that we +@@ -106,28 +107,64 @@ static int pem_pw_cb(char *buf, int len, int w, void *v) + return pwlen; + } + +-static EVP_PKEY *read_private_key(const char *private_key_name) ++static EVP_PKEY *read_private_key_pkcs11(const char *private_key_name) + { +- EVP_PKEY *private_key; ++ EVP_PKEY *private_key = NULL; ++#ifdef USE_PKCS11_PROVIDER ++ OSSL_STORE_CTX *store; + +- if (!strncmp(private_key_name, "pkcs11:", 7)) { +- ENGINE *e; ++ if (!OSSL_PROVIDER_try_load(NULL, "pkcs11", true)) ++ ERR(1, "OSSL_PROVIDER_try_load(pkcs11)"); ++ if (!OSSL_PROVIDER_try_load(NULL, "default", true)) ++ ERR(1, "OSSL_PROVIDER_try_load(default)"); ++ ++ store = OSSL_STORE_open(private_key_name, NULL, NULL, NULL, NULL); ++ ERR(!store, "OSSL_STORE_open"); + +- ENGINE_load_builtin_engines(); ++ while (!OSSL_STORE_eof(store)) { ++ OSSL_STORE_INFO *info = OSSL_STORE_load(store); ++ ++ if (!info) { ++ drain_openssl_errors(__LINE__, 0); ++ continue; ++ } ++ if (OSSL_STORE_INFO_get_type(info) == OSSL_STORE_INFO_PKEY) { ++ private_key = OSSL_STORE_INFO_get1_PKEY(info); ++ ERR(!private_key, "OSSL_STORE_INFO_get1_PKEY"); ++ } ++ OSSL_STORE_INFO_free(info); ++ if (private_key) ++ break; ++ } ++ OSSL_STORE_close(store); ++#elif defined(USE_PKCS11_ENGINE) ++ ENGINE *e; ++ ++ ENGINE_load_builtin_engines(); ++ drain_openssl_errors(__LINE__, 1); ++ e = ENGINE_by_id("pkcs11"); ++ ERR(!e, "Load PKCS#11 ENGINE"); ++ if (ENGINE_init(e)) + drain_openssl_errors(__LINE__, 1); +- e = ENGINE_by_id("pkcs11"); +- ERR(!e, "Load PKCS#11 ENGINE"); +- if (ENGINE_init(e)) +- drain_openssl_errors(__LINE__, 1); +- else +- ERR(1, "ENGINE_init"); +- if (key_pass) +- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0), +- "Set PKCS#11 PIN"); +- private_key = ENGINE_load_private_key(e, private_key_name, +- NULL, NULL); +- ERR(!private_key, "%s", private_key_name); ++ else ++ ERR(1, "ENGINE_init"); ++ if (key_pass) ++ ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0), "Set PKCS#11 PIN"); ++ private_key = ENGINE_load_private_key(e, private_key_name, NULL, NULL); ++ ERR(!private_key, "%s", private_key_name); ++#else ++ fprintf(stderr, "no pkcs11 engine/provider available\n"); ++ exit(1); ++#endif ++ return private_key; ++} ++ ++static EVP_PKEY *read_private_key(const char *private_key_name) ++{ ++ if (!strncmp(private_key_name, "pkcs11:", 7)) { ++ return read_private_key_pkcs11(private_key_name); + } else { ++ EVP_PKEY *private_key; + BIO *b; + + b = BIO_new_file(private_key_name, "rb"); +@@ -136,9 +173,9 @@ static EVP_PKEY *read_private_key(const char *private_key_name) + NULL); + ERR(!private_key, "%s", private_key_name); + BIO_free(b); +- } + +- return private_key; ++ return private_key; ++ } + } + + static X509 *read_x509(const char *x509_name) +-- +2.47.1 + +From 30771a63da49440680a8ddd17017bb38d1f9827c Mon Sep 17 00:00:00 2001 +From: Clark Williams +Date: Tue, 26 Nov 2024 08:37:58 -0600 +Subject: [PATCH 204/208] Linux 6.6.63-rt46 REBASE + +Signed-off-by: Clark Williams +--- + localversion-rt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/localversion-rt b/localversion-rt +index 38c40b21a885..272158183778 100644 +--- a/localversion-rt ++++ b/localversion-rt +@@ -1 +1 @@ +--rt45 ++-rt46 +-- +2.47.1 + +From ca07838bdae6f81d229e64467cf5d6046934745e Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Mon, 28 Oct 2024 01:07:26 +0000 +Subject: [PATCH 205/208] Fwd: [PATCH v6.6-RT] kvm: Use the proper mask to + check for the LAZY bit. + +kvm: Use the proper mask to check for the LAZY bit. + +To check for the LAZY bit in ti_work, it is needed to use +_TIF_NEED_RESCHED_LAZY which contains the shifted bit (the mask) instead +of TIF_NEED_RESCHED_LAZY which contains the bit number. + +This broke while switch from the old PREEMPT_LAZY code to PREEMPT_AUTO. + +Use _TIF_NEED_RESCHED_LAZY instead of TIF_NEED_RESCHED_LAZY. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Clark Williams +--- + kernel/entry/kvm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/entry/kvm.c b/kernel/entry/kvm.c +index d952fa5ee880..5253d3d2d013 100644 +--- a/kernel/entry/kvm.c ++++ b/kernel/entry/kvm.c +@@ -13,7 +13,7 @@ static int xfer_to_guest_mode_work(struct kvm_vcpu *vcpu, unsigned long ti_work) + return -EINTR; + } + +- if (ti_work & (_TIF_NEED_RESCHED | TIF_NEED_RESCHED_LAZY)) ++ if (ti_work & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY)) + schedule(); + + if (ti_work & _TIF_NOTIFY_RESUME) +-- +2.47.1 + +From b936806aed79d5104575ac726e08ad93dd8c35a6 Mon Sep 17 00:00:00 2001 +From: Derek Barbosa +Date: Mon, 4 Nov 2024 09:29:34 -0500 +Subject: [PATCH 206/208] printk: nbcon: Fix illegal RCU usage on thread wakeup + +In debug kernels, printk'ing during the SMP startup of a secondary CPU +results in a splat on boot that details illegal RCU usage from +offline CPUs. + +This patch aligns rcuwait_has_sleeper() with what currently exists in +Torvalds' tree, at commit 76f258bf3f2aa, and will avoid the +aforementioned splat. + +Furthermore, this patch makes it so that we avoid the use of hacky +rcu_derefrencing through the waiter's task struct,and instead leverages +the correct RCU API with the rcuwait_active() function. + +Reported-by: Andrew Halaney +Closes: https://lore.kernel.org/linux-rt-users/5x4nejpojrtny37k7l6loewqwuaituq77zc3tkkojvawcuvmml@thwg65fdb3vn +Reviewed-by: Sebastian Andrzej Siewior +Reviewed-by: John Ogness +Signed-off-by: Derek Barbosa +--- + kernel/printk/nbcon.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c +index b941039ee7d2..b4278854eeb9 100644 +--- a/kernel/printk/nbcon.c ++++ b/kernel/printk/nbcon.c +@@ -1101,9 +1101,6 @@ static void nbcon_irq_work(struct irq_work *irq_work) + + static inline bool rcuwait_has_sleeper(struct rcuwait *w) + { +- bool has_sleeper; +- +- rcu_read_lock(); + /* + * Guarantee any new records can be seen by tasks preparing to wait + * before this context checks if the rcuwait is empty. +@@ -1116,10 +1113,7 @@ static inline bool rcuwait_has_sleeper(struct rcuwait *w) + * This pairs with nbcon_kthread_func:A. + */ + smp_mb(); /* LMM(rcuwait_has_sleeper:A) */ +- has_sleeper = !!rcu_dereference(w->task); +- rcu_read_unlock(); +- +- return has_sleeper; ++ return rcuwait_active(w); + } + + /** +-- +2.47.1 + +From 4bf72178be9067483350ff6f85f340d3929f54a7 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Fri, 1 Mar 2024 22:45:25 +0100 +Subject: [PATCH 207/208] serial: sifive: Use uart_prepare_sysrq_char() to + handle sysrq. + +The port lock is a spinlock_t which is becomes a sleeping lock on PREEMPT_RT. +The driver splits the locking function into two parts: local_irq_save() and +uart_port_lock() and this breaks PREEMPT_RT. + +Handle sysrq requests sysrq once the port lock is dropped. +Remove the special case in the console write routine an always use the +complete locking function. + +Cc: Palmer Dabbelt +Cc: Paul Walmsley +Cc: linux-riscv@lists.infradead.org +Signed-off-by: Sebastian Andrzej Siewior +Link: https://lore.kernel.org/r/20240301215246.891055-13-bigeasy@linutronix.de +Signed-off-by: Greg Kroah-Hartman +(cherry picked from commit 32c694ec3efc2b7cdf921da50371297ba70e7d50) +Signed-off-by: Clark Williams +--- + drivers/tty/serial/sifive.c | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) + +diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c +index b296e57a9dee..d420bed4a3a7 100644 +--- a/drivers/tty/serial/sifive.c ++++ b/drivers/tty/serial/sifive.c +@@ -412,7 +412,8 @@ static void __ssp_receive_chars(struct sifive_serial_port *ssp) + break; + + ssp->port.icount.rx++; +- uart_insert_char(&ssp->port, 0, 0, ch, TTY_NORMAL); ++ if (!uart_prepare_sysrq_char(&ssp->port, ch)) ++ uart_insert_char(&ssp->port, 0, 0, ch, TTY_NORMAL); + } + + tty_flip_buffer_push(&ssp->port.state->port); +@@ -534,7 +535,7 @@ static irqreturn_t sifive_serial_irq(int irq, void *dev_id) + if (ip & SIFIVE_SERIAL_IP_TXWM_MASK) + __ssp_transmit_chars(ssp); + +- uart_port_unlock(&ssp->port); ++ uart_unlock_and_check_sysrq(&ssp->port); + + return IRQ_HANDLED; + } +@@ -791,13 +792,10 @@ static void sifive_serial_console_write(struct console *co, const char *s, + if (!ssp) + return; + +- local_irq_save(flags); +- if (ssp->port.sysrq) +- locked = 0; +- else if (oops_in_progress) +- locked = uart_port_trylock(&ssp->port); ++ if (oops_in_progress) ++ locked = uart_port_trylock_irqsave(&ssp->port, &flags); + else +- uart_port_lock(&ssp->port); ++ uart_port_lock_irqsave(&ssp->port, &flags); + + ier = __ssp_readl(ssp, SIFIVE_SERIAL_IE_OFFS); + __ssp_writel(0, SIFIVE_SERIAL_IE_OFFS, ssp); +@@ -807,8 +805,7 @@ static void sifive_serial_console_write(struct console *co, const char *s, + __ssp_writel(ier, SIFIVE_SERIAL_IE_OFFS, ssp); + + if (locked) +- uart_port_unlock(&ssp->port); +- local_irq_restore(flags); ++ uart_port_unlock_irqrestore(&ssp->port, flags); + } + + static int sifive_serial_console_setup(struct console *co, char *options) +-- +2.47.1 + +From 64596a31678f9c2e4d2cc68be3b9a6b557992c67 Mon Sep 17 00:00:00 2001 +From: Clark Williams +Date: Tue, 17 Dec 2024 08:04:45 -0600 +Subject: [PATCH 208/208] Linux 6.6.65-rt47 REBASE + +Signed-off-by: Clark Williams +--- + localversion-rt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/localversion-rt b/localversion-rt +index 272158183778..8a777ac42aab 100644 +--- a/localversion-rt ++++ b/localversion-rt +@@ -1 +1 @@ +--rt46 ++-rt47 -- -2.45.2 +2.47.1 diff --git a/cgmanifest.json b/cgmanifest.json index fa111a8732a..0369264457b 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -8211,8 +8211,8 @@ "type": "other", "other": { "name": "kernel-rt", - "version": "6.6.44.1", - "downloadUrl": "https://github.com/microsoft/CBL-Mariner-Linux-Kernel/archive/rolling-lts/mariner-3/6.6.44.1.tar.gz" + "version": "6.6.65.1", + "downloadUrl": "https://github.com/microsoft/CBL-Mariner-Linux-Kernel/archive/rolling-lts/mariner-3/6.6.65.1.tar.gz" } } }, From bece5174f0345d923959a8b437ec9d46acd1edd4 Mon Sep 17 00:00:00 2001 From: CBL-Mariner Servicing Account Date: Thu, 30 Jan 2025 20:21:09 +0000 Subject: [PATCH 2/2] Apply config changes to AMD64 --- SPECS-EXTENDED/kernel-rt/config | 18 +++++++----------- .../kernel-rt/kernel-rt.signatures.json | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/SPECS-EXTENDED/kernel-rt/config b/SPECS-EXTENDED/kernel-rt/config index 019d287ebbd..ad172f9eb79 100644 --- a/SPECS-EXTENDED/kernel-rt/config +++ b/SPECS-EXTENDED/kernel-rt/config @@ -512,7 +512,6 @@ CONFIG_PHYSICAL_ALIGN=0x1000000 CONFIG_DYNAMIC_MEMORY_LAYOUT=y CONFIG_RANDOMIZE_MEMORY=y CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa -# CONFIG_ADDRESS_MASKING is not set CONFIG_HOTPLUG_CPU=y # CONFIG_COMPAT_VDSO is not set # CONFIG_LEGACY_VSYSCALL_XONLY is not set @@ -1067,6 +1066,7 @@ CONFIG_MIGRATION=y CONFIG_DEVICE_MIGRATION=y CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y CONFIG_CONTIG_ALLOC=y +CONFIG_PCP_BATCH_SCALE_MAX=5 CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_MMU_NOTIFIER=y CONFIG_KSM=y @@ -2452,16 +2452,6 @@ CONFIG_DM_VERITY_FEC=y # CONFIG_DM_LOG_WRITES is not set # CONFIG_DM_INTEGRITY is not set # CONFIG_DM_AUDIT is not set -CONFIG_DM_IMA_MEASURE_CACHE=y -CONFIG_DM_IMA_MEASURE_CRYPT=y -CONFIG_DM_IMA_MEASURE_INTEGRITY=y -CONFIG_DM_IMA_MEASURE_LINEAR=y -CONFIG_DM_IMA_MEASURE_MIRROR=y -CONFIG_DM_IMA_MEASURE_MULTIPATH=y -CONFIG_DM_IMA_MEASURE_RAID=y -CONFIG_DM_IMA_MEASURE_SNAPSHOT=y -CONFIG_DM_IMA_MEASURE_STRIPED=y -CONFIG_DM_IMA_MEASURE_VERITY=y # CONFIG_TARGET_CORE is not set CONFIG_FUSION=y CONFIG_FUSION_SPI=y @@ -4579,6 +4569,7 @@ CONFIG_DVB_SP2=m # Graphics support # CONFIG_APERTURE_HELPERS=y +CONFIG_SCREEN_INFO=y CONFIG_VIDEO_CMDLINE=y CONFIG_VIDEO_NOMODESET=y # CONFIG_AUXDISPLAY is not set @@ -5361,6 +5352,7 @@ CONFIG_HID_HYPERV_MOUSE=m # CONFIG_HID_ZYDACRON is not set # CONFIG_HID_SENSOR_HUB is not set # CONFIG_HID_ALPS is not set +# CONFIG_HID_MCP2200 is not set # CONFIG_HID_MCP2221 is not set # end of Special HID drivers @@ -7112,6 +7104,9 @@ CONFIG_ENCRYPTED_KEYS=m # CONFIG_USER_DECRYPTED_DATA is not set # CONFIG_KEY_DH_OPERATIONS is not set CONFIG_SECURITY_DMESG_RESTRICT=y +CONFIG_PROC_MEM_ALWAYS_FORCE=y +# CONFIG_PROC_MEM_FORCE_PTRACE is not set +# CONFIG_PROC_MEM_NO_FORCE is not set CONFIG_SECURITY=y CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y @@ -7147,6 +7142,7 @@ CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y # CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set # CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set +# CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT is not set # CONFIG_SECURITY_LANDLOCK is not set # CONFIG_SECURITY_IPE is not set CONFIG_INTEGRITY=y diff --git a/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json b/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json index 78a4b9816cc..b8efd1d25f2 100644 --- a/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json +++ b/SPECS-EXTENDED/kernel-rt/kernel-rt.signatures.json @@ -1,7 +1,7 @@ { "Signatures": { "cbl-mariner-ca-20211013.pem": "5ef124b0924cb1047c111a0ecff1ae11e6ad7cac8d1d9b40f98f99334121f0b0", - "config": "43963dcd73f4136fd19d7a8a9a7f51d73868744127a7871e96f57e9e3bd9152c", + "config": "bbbfc3923a256d98c620769a74d1aa15e7f5a411ede10e94fe0ef30c8b469536", "cpupower": "d7518767bf2b1110d146a49c7d42e76b803f45eb8bd14d931aa6d0d346fae985", "cpupower.service": "b057fe9e5d0e8c36f485818286b80e3eba8ff66ff44797940e99b1fd5361bb98", "sha512hmac-openssl.sh": "02ab91329c4be09ee66d759e4d23ac875037c3b56e5a598e32fd1206da06a27f",