From 8c065e72d7829ba7efeb3c93d98c602f7ba3d158 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 23:00:47 +0200 Subject: Adding debian version 6.9.2-1~exp1. Signed-off-by: Daniel Baumann --- ...bcon-Remove-return-value-for-write_atomic.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 debian/patches-rt/0003-printk-nbcon-Remove-return-value-for-write_atomic.patch (limited to 'debian/patches-rt/0003-printk-nbcon-Remove-return-value-for-write_atomic.patch') diff --git a/debian/patches-rt/0003-printk-nbcon-Remove-return-value-for-write_atomic.patch b/debian/patches-rt/0003-printk-nbcon-Remove-return-value-for-write_atomic.patch new file mode 100644 index 000000000..92ecbe036 --- /dev/null +++ b/debian/patches-rt/0003-printk-nbcon-Remove-return-value-for-write_atomic.patch @@ -0,0 +1,69 @@ +From: John Ogness +Date: Fri, 20 Oct 2023 09:52:59 +0000 +Subject: [PATCH 03/46] printk: nbcon: Remove return value for write_atomic() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.9/older/patches-6.9-rt5.tar.xz + +The return value of write_atomic() does not provide any useful +information. On the contrary, it makes things more complicated +for the caller to appropriately deal with the information. + +Change write_atomic() to not have a return value. If the +message did not get printed due to loss of ownership, the +caller will notice this on its own. If ownership was not lost, +it will be assumed that the driver successfully printed the +message and the sequence number for that console will be +incremented. + +Signed-off-by: John Ogness +Reviewed-by: Petr Mladek +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/console.h | 2 +- + kernel/printk/nbcon.c | 15 +++++++-------- + 2 files changed, 8 insertions(+), 9 deletions(-) + +--- a/include/linux/console.h ++++ b/include/linux/console.h +@@ -345,7 +345,7 @@ struct console { + struct hlist_node node; + + /* nbcon console specific members */ +- bool (*write_atomic)(struct console *con, ++ void (*write_atomic)(struct console *con, + struct nbcon_write_context *wctxt); + atomic_t __private nbcon_state; + atomic_long_t __private nbcon_seq; +--- a/kernel/printk/nbcon.c ++++ b/kernel/printk/nbcon.c +@@ -849,7 +849,6 @@ static bool nbcon_emit_next_record(struc + unsigned long con_dropped; + struct nbcon_state cur; + unsigned long dropped; +- bool done; + + /* + * The printk buffers are filled within an unsafe section. This +@@ -889,16 +888,16 @@ static bool nbcon_emit_next_record(struc + wctxt->unsafe_takeover = cur.unsafe_takeover; + + if (con->write_atomic) { +- done = con->write_atomic(con, wctxt); ++ con->write_atomic(con, wctxt); + } else { +- nbcon_context_release(ctxt); ++ /* ++ * This function should never be called for legacy consoles. ++ * Handle it as if ownership was lost and try to continue. ++ */ + WARN_ON_ONCE(1); +- done = false; +- } +- +- /* If not done, the emit was aborted. */ +- if (!done) ++ nbcon_context_release(ctxt); + return false; ++ } + + /* + * Since any dropped message was successfully output, reset the -- cgit v1.2.3