[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240722171939.3349410-2-john.ogness@linutronix.de>
Date: Mon, 22 Jul 2024 19:25:21 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: [PATCH printk v3 01/19] printk: nbcon: Clarify nbcon_get_default_prio() context
Correct the kerneldoc and code comments that claimed migration must
be disabled for nbcon_get_default_prio(). This is not true.
Add the explation in the kerneldoc.
Signed-off-by: John Ogness <john.ogness@...utronix.de>
---
kernel/printk/nbcon.c | 5 ++++-
kernel/printk/printk.c | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
index ef6e76db0f5a..d8388faa6500 100644
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -970,9 +970,12 @@ static __ref unsigned int *nbcon_get_cpu_emergency_nesting(void)
* nbcon_get_default_prio - The appropriate nbcon priority to use for nbcon
* printing on the current CPU
*
- * Context: Any context which could not be migrated to another CPU.
+ * Context: Any context.
* Return: The nbcon_prio to use for acquiring an nbcon console in this
* context for printing.
+ *
+ * Allowing migration enabled relies on the fact that a context cannot be
+ * migrated to panic or emergency state CPUs.
*/
enum nbcon_prio nbcon_get_default_prio(void)
{
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index d0bff0b0abfd..5090c0591f88 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2401,8 +2401,6 @@ asmlinkage int vprintk_emit(int facility, int level,
* printing of all remaining records to all consoles so that
* this context can return as soon as possible. Hopefully
* another printk() caller will take over the printing.
- *
- * Also, nbcon_get_default_prio() requires migration disabled.
*/
preempt_disable();
--
2.39.2
Powered by blists - more mailing lists