summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:13 +0000
commit225809f918c2f2c9c831ea16ddb9b81485af5f34 (patch)
tree5332d51631f39fc96804d8001996f028bbbbdf54 /debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch
parentMerging upstream version 6.10.3. (diff)
downloadlinux-225809f918c2f2c9c831ea16ddb9b81485af5f34.tar.xz
linux-225809f918c2f2c9c831ea16ddb9b81485af5f34.zip
Merging debian version 6.10.3-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch')
-rw-r--r--debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch24
1 files changed, 12 insertions, 12 deletions
diff --git a/debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch b/debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch
index 1cfd27dd5d..01d254db59 100644
--- a/debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch
+++ b/debian/patches-rt/0022-printk-Avoid-console_lock-dance-if-no-legacy-or-boot.patch
@@ -1,8 +1,8 @@
From: John Ogness <john.ogness@linutronix.de>
Date: Tue, 26 Sep 2023 12:44:07 +0000
-Subject: [PATCH 22/46] printk: Avoid console_lock dance if no legacy or boot
+Subject: [PATCH 22/48] printk: Avoid console_lock dance if no legacy or boot
consoles
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.9/older/patches-6.9-rt5.tar.xz
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.10/older/patches-6.10.2-rt14.tar.xz
Currently the console lock is used to attempt legacy-type
printing even if there are no legacy or boot consoles registered.
@@ -70,7 +70,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* If trylock fails, someone else is doing the printing */
if (console_trylock())
console_unlock();
-@@ -3189,7 +3204,8 @@ void console_flush_on_panic(enum con_flu
+@@ -3201,7 +3216,8 @@ void console_flush_on_panic(enum con_flu
nbcon_atomic_flush_pending();
@@ -80,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
/*
-@@ -3538,6 +3554,7 @@ void register_console(struct console *ne
+@@ -3551,6 +3567,7 @@ void register_console(struct console *ne
if (newcon->flags & CON_NBCON) {
nbcon_init(newcon, init_seq);
} else {
@@ -88,15 +88,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
newcon->seq = init_seq;
}
-@@ -3613,6 +3630,7 @@ EXPORT_SYMBOL(register_console);
- /* Must be called under console_list_lock(). */
+@@ -3627,6 +3644,7 @@ EXPORT_SYMBOL(register_console);
static int unregister_console_locked(struct console *console)
{
+ bool use_device_lock = (console->flags & CON_NBCON) && console->write_atomic;
+ bool found_legacy_con = false;
bool found_boot_con = false;
unsigned long flags;
struct console *c;
-@@ -3680,9 +3698,13 @@ static int unregister_console_locked(str
+@@ -3694,9 +3712,13 @@ static int unregister_console_locked(str
for_each_console(c) {
if (c->flags & CON_BOOT)
found_boot_con = true;
@@ -110,7 +110,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return res;
}
-@@ -3843,22 +3865,34 @@ static bool __pr_flush(struct console *c
+@@ -3857,22 +3879,34 @@ static bool __pr_flush(struct console *c
seq = prb_next_reserve_seq(prb);
/* Flush the consoles so that records up to @seq are printed. */
@@ -154,7 +154,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
cookie = console_srcu_read_lock();
for_each_console_srcu(c) {
-@@ -3878,6 +3912,7 @@ static bool __pr_flush(struct console *c
+@@ -3892,6 +3926,7 @@ static bool __pr_flush(struct console *c
if (flags & CON_NBCON) {
printk_seq = nbcon_seq_read(c);
} else {
@@ -162,7 +162,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
printk_seq = c->seq;
}
-@@ -3889,7 +3924,8 @@ static bool __pr_flush(struct console *c
+@@ -3903,7 +3938,8 @@ static bool __pr_flush(struct console *c
if (diff != last_diff && reset_on_progress)
remaining_jiffies = timeout_jiffies;
@@ -172,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Note: @diff is 0 if there are no usable consoles. */
if (diff == 0 || remaining_jiffies == 0)
-@@ -3959,6 +3995,7 @@ static void __wake_up_klogd(int val)
+@@ -3973,6 +4009,7 @@ static void __wake_up_klogd(int val)
return;
preempt_disable();
@@ -180,7 +180,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/*
* Guarantee any new records can be seen by tasks preparing to wait
* before this context checks if the wait queue is empty.
-@@ -3970,11 +4007,22 @@ static void __wake_up_klogd(int val)
+@@ -3984,11 +4021,22 @@ static void __wake_up_klogd(int val)
*
* This pairs with devkmsg_read:A and syslog_print:A.
*/