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 --- ...ntk-nbcon-Stop-threads-on-shutdown-reboot.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 debian/patches-rt/0034-printk-nbcon-Stop-threads-on-shutdown-reboot.patch (limited to 'debian/patches-rt/0034-printk-nbcon-Stop-threads-on-shutdown-reboot.patch') diff --git a/debian/patches-rt/0034-printk-nbcon-Stop-threads-on-shutdown-reboot.patch b/debian/patches-rt/0034-printk-nbcon-Stop-threads-on-shutdown-reboot.patch new file mode 100644 index 0000000000..83876c8f29 --- /dev/null +++ b/debian/patches-rt/0034-printk-nbcon-Stop-threads-on-shutdown-reboot.patch @@ -0,0 +1,60 @@ +From: John Ogness +Date: Tue, 26 Sep 2023 13:04:15 +0000 +Subject: [PATCH 34/46] printk: nbcon: Stop threads on shutdown/reboot +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.9/older/patches-6.9-rt5.tar.xz + +Register a syscore_ops shutdown function to stop all threaded +printers on shutdown/reboot. This allows printk to transition back +to atomic printing in order to provide a robust mechanism for +outputting the final messages. + +Signed-off-by: John Ogness +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/printk/nbcon.c | 31 +++++++++++++++++++++++++++++++ + 1 file changed, 31 insertions(+) + +--- a/kernel/printk/nbcon.c ++++ b/kernel/printk/nbcon.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include "internal.h" + #include "printk_ringbuffer.h" +@@ -1682,3 +1683,33 @@ void nbcon_driver_release(struct console + console_srcu_read_unlock(cookie); + } + EXPORT_SYMBOL_GPL(nbcon_driver_release); ++ ++/** ++ * printk_kthread_shutdown - shutdown all threaded printers ++ * ++ * On system shutdown all threaded printers are stopped. This allows printk ++ * to transition back to atomic printing, thus providing a robust mechanism ++ * for the final shutdown/reboot messages to be output. ++ */ ++static void printk_kthread_shutdown(void) ++{ ++ struct console *con; ++ ++ console_list_lock(); ++ for_each_console(con) { ++ if (con->flags & CON_NBCON) ++ nbcon_kthread_stop(con); ++ } ++ console_list_unlock(); ++} ++ ++static struct syscore_ops printk_syscore_ops = { ++ .shutdown = printk_kthread_shutdown, ++}; ++ ++static int __init printk_init_ops(void) ++{ ++ register_syscore_ops(&printk_syscore_ops); ++ return 0; ++} ++device_initcall(printk_init_ops); -- cgit v1.2.3