diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:59 +0000 |
commit | 27d3313807296c3943a96ceef8c2b7279cb56962 (patch) | |
tree | 7d08e78c36ab6437b403fc7cd8c23e41f135c7a3 /debian/patches-rt/0022-printk-Let-console_is_usable-handle-nbcon.patch | |
parent | Merging upstream version 6.7.7. (diff) | |
download | linux-27d3313807296c3943a96ceef8c2b7279cb56962.tar.xz linux-27d3313807296c3943a96ceef8c2b7279cb56962.zip |
Adding debian version 6.7.7-1.debian/6.7.7-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0022-printk-Let-console_is_usable-handle-nbcon.patch')
-rw-r--r-- | debian/patches-rt/0022-printk-Let-console_is_usable-handle-nbcon.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches-rt/0022-printk-Let-console_is_usable-handle-nbcon.patch b/debian/patches-rt/0022-printk-Let-console_is_usable-handle-nbcon.patch new file mode 100644 index 0000000000..3d7364fe69 --- /dev/null +++ b/debian/patches-rt/0022-printk-Let-console_is_usable-handle-nbcon.patch @@ -0,0 +1,43 @@ +From: John Ogness <john.ogness@linutronix.de> +Date: Tue, 12 Sep 2023 13:53:21 +0000 +Subject: [PATCH 22/50] printk: Let console_is_usable() handle nbcon +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.7/older/patches-6.7-rt6.tar.xz + +The nbcon consoles use a different printing callback. For nbcon +consoles, check for the write_atomic() callback instead of +write(). + +Signed-off-by: John Ogness <john.ogness@linutronix.de> +Reviewed-by: Petr Mladek <pmladek@suse.com> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/printk/internal.h | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/kernel/printk/internal.h ++++ b/kernel/printk/internal.h +@@ -80,6 +80,8 @@ void nbcon_free(struct console *con); + + /* + * Check if the given console is currently capable and allowed to print ++ * records. Note that this function does not consider the current context, ++ * which can also play a role in deciding if @con can be used to print + * records. + * + * Requires the console_srcu_read_lock. +@@ -94,8 +96,13 @@ static inline bool console_is_usable(str + if ((flags & CON_SUSPENDED)) + return false; + +- if (!con->write) +- return false; ++ if (flags & CON_NBCON) { ++ if (!con->write_atomic) ++ return false; ++ } else { ++ if (!con->write) ++ return false; ++ } + + /* + * Console drivers may assume that per-cpu resources have been |