diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches-rt/0037-printk-nbcon-Show-replay-message-on-takeover.patch (renamed from debian/patches-rt/0040-printk-nbcon-Show-replay-message-on-takeover.patch) | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/debian/patches-rt/0040-printk-nbcon-Show-replay-message-on-takeover.patch b/debian/patches-rt/0037-printk-nbcon-Show-replay-message-on-takeover.patch index ab1046954b..87b2799c12 100644 --- a/debian/patches-rt/0040-printk-nbcon-Show-replay-message-on-takeover.patch +++ b/debian/patches-rt/0037-printk-nbcon-Show-replay-message-on-takeover.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 25 Mar 2024 21:00:40 +0000 -Subject: [PATCH 40/48] printk: nbcon: Show replay message on takeover -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.8/older/patches-6.8.2-rt11.tar.xz +Subject: [PATCH 37/46] printk: nbcon: Show replay message on takeover +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.9/older/patches-6.9-rt5.tar.xz An emergency or panic context can takeover console ownership while the current owner was printing a printk message. The @@ -26,33 +26,34 @@ the user that the previous message is being printed again. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/linux/console.h | 2 ++ + include/linux/console.h | 3 +++ kernel/printk/internal.h | 1 + kernel/printk/nbcon.c | 24 ++++++++++++++++++++++++ kernel/printk/printk.c | 19 +++++++++++++++++++ - 4 files changed, 46 insertions(+) + 4 files changed, 47 insertions(+) --- a/include/linux/console.h +++ b/include/linux/console.h -@@ -325,6 +325,7 @@ struct nbcon_drvdata { - * +@@ -325,6 +325,7 @@ struct nbcon_write_context { * @nbcon_state: State for nbcon consoles * @nbcon_seq: Sequence number of the next record for nbcon to print + * @nbcon_driver_ctxt: Context available for driver non-printing operations + * @nbcon_prev_seq: Seq num the previous nbcon owner was assigned to print * @pbufs: Pointer to nbcon private buffer * @kthread: Printer kthread for this console * @rcuwait: RCU-safe wait object for @kthread waking -@@ -441,6 +442,7 @@ struct console { - +@@ -445,6 +446,8 @@ struct console { atomic_t __private nbcon_state; atomic_long_t __private nbcon_seq; + struct nbcon_context __private nbcon_driver_ctxt; + atomic_long_t __private nbcon_prev_seq; - - /** - * @nbcon_drvdata: ++ + struct printk_buffers *pbufs; + struct task_struct *kthread; + struct rcuwait rcuwait; --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h -@@ -222,4 +222,5 @@ bool printk_get_next_message(struct prin +@@ -231,4 +231,5 @@ bool printk_get_next_message(struct prin #ifdef CONFIG_PRINTK void console_prepend_dropped(struct printk_message *pmsg, unsigned long dropped); @@ -97,17 +98,17 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (!nbcon_context_exit_unsafe(ctxt)) return false; -@@ -1524,6 +1547,7 @@ void nbcon_init(struct console *con) +@@ -1611,6 +1634,7 @@ void nbcon_init(struct console *con, u64 rcuwait_init(&con->rcuwait); init_irq_work(&con->irq_work, nbcon_irq_work); - nbcon_seq_force(con, 0); + nbcon_seq_force(con, init_seq); + atomic_long_set(&ACCESS_PRIVATE(con, nbcon_prev_seq), -1UL); nbcon_state_set(con, &state); nbcon_kthread_create(con); } --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -2881,6 +2881,25 @@ void console_prepend_dropped(struct prin +@@ -2868,6 +2868,25 @@ void console_prepend_dropped(struct prin } /* |