summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0036-printk-nbcon-Add-printer-thread-wakeups.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches-rt/0036-printk-nbcon-Add-printer-thread-wakeups.patch (renamed from debian/patches-rt/0040-printk-nbcon-Add-printer-thread-wakeups.patch)30
1 files changed, 15 insertions, 15 deletions
diff --git a/debian/patches-rt/0040-printk-nbcon-Add-printer-thread-wakeups.patch b/debian/patches-rt/0036-printk-nbcon-Add-printer-thread-wakeups.patch
index 89e086aa32..81701b90f0 100644
--- a/debian/patches-rt/0040-printk-nbcon-Add-printer-thread-wakeups.patch
+++ b/debian/patches-rt/0036-printk-nbcon-Add-printer-thread-wakeups.patch
@@ -1,7 +1,7 @@
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 26 Sep 2023 13:03:52 +0000
-Subject: [PATCH 40/50] printk: nbcon: Add printer thread wakeups
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.7/older/patches-6.7-rt6.tar.xz
+Subject: [PATCH 36/48] printk: nbcon: Add printer thread wakeups
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.8/older/patches-6.8.2-rt11.tar.xz
Add a function to wakeup the printer threads. Use the new function
when:
@@ -34,16 +34,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#include <linux/rculist.h>
#include <linux/rcuwait.h>
#include <linux/types.h>
-@@ -313,6 +314,7 @@ struct nbcon_write_context {
- * @locked_port: True, if the port lock is locked by nbcon
+@@ -327,6 +328,7 @@ struct nbcon_drvdata {
+ * @pbufs: Pointer to nbcon private buffer
* @kthread: Printer kthread for this console
* @rcuwait: RCU-safe wait object for @kthread waking
+ * @irq_work: Defer @kthread waking to IRQ work context
*/
struct console {
char name[16];
-@@ -346,6 +348,7 @@ struct console {
- bool locked_port;
+@@ -457,6 +459,7 @@ struct console {
+ struct printk_buffers *pbufs;
struct task_struct *kthread;
struct rcuwait rcuwait;
+ struct irq_work irq_work;
@@ -52,9 +52,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#ifdef CONFIG_LOCKDEP
--- a/kernel/printk/internal.h
+++ b/kernel/printk/internal.h
-@@ -93,6 +93,7 @@ enum nbcon_prio nbcon_get_default_prio(v
- void nbcon_atomic_flush_all(void);
- bool nbcon_atomic_emit_next_record(struct console *con, bool *handover, int cookie);
+@@ -91,6 +91,7 @@ void nbcon_atomic_flush_pending(void);
+ bool nbcon_legacy_emit_next_record(struct console *con, bool *handover,
+ int cookie);
void nbcon_kthread_create(struct console *con);
+void nbcon_wake_threads(void);
@@ -62,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* Check if the given console is currently capable and allowed to print
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
-@@ -1052,6 +1052,61 @@ static int nbcon_kthread_func(void *__co
+@@ -1056,6 +1056,61 @@ static int nbcon_kthread_func(void *__co
goto wait_for_event;
}
@@ -124,17 +124,17 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Track the nbcon emergency nesting per CPU. */
static DEFINE_PER_CPU(unsigned int, nbcon_pcpu_emergency_nesting);
static unsigned int early_nbcon_pcpu_emergency_nesting __initdata;
-@@ -1418,6 +1473,7 @@ void nbcon_init(struct console *con)
+@@ -1451,6 +1506,7 @@ void nbcon_init(struct console *con)
BUG_ON(!con->pbufs);
rcuwait_init(&con->rcuwait);
+ init_irq_work(&con->irq_work, nbcon_irq_work);
- nbcon_seq_force(con, con->seq);
+ nbcon_seq_force(con, 0);
nbcon_state_set(con, &state);
}
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
-@@ -2402,6 +2402,8 @@ asmlinkage int vprintk_emit(int facility
+@@ -2415,6 +2415,8 @@ asmlinkage int vprintk_emit(int facility
}
}
@@ -143,7 +143,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (do_trylock_unlock) {
/*
* The caller may be holding system-critical or
-@@ -2712,6 +2714,10 @@ void resume_console(void)
+@@ -2721,6 +2723,10 @@ void resume_console(void)
*/
synchronize_srcu(&console_srcu);
@@ -154,7 +154,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
cookie = console_srcu_read_lock();
for_each_console_srcu(con) {
flags = console_srcu_read_flags(con);
-@@ -4104,6 +4110,7 @@ void defer_console_output(void)
+@@ -4151,6 +4157,7 @@ void defer_console_output(void)
void printk_trigger_flush(void)
{