From: Petr Mladek <pmladek@suse.com>
To: Marcos Paulo de Souza <mpdesouza@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Jason Wessel <jason.wessel@windriver.com>,
Daniel Thompson <danielt@kernel.org>,
Douglas Anderson <dianders@chromium.org>,
linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net
Subject: Re: [PATCH v6 2/5] printk: nbcon: Introduce KDB helpers
Date: Fri, 17 Oct 2025 12:16:44 +0200 [thread overview]
Message-ID: <aPIXjPJmJxW2i6xr@pathway.suse.cz> (raw)
In-Reply-To: <20251016-nbcon-kgdboc-v6-2-866aac60a80e@suse.com>
On Thu 2025-10-16 11:47:55, Marcos Paulo de Souza wrote:
> These helpers will be used when calling console->write_atomic on
> KDB code in the next patch. It's basically the same implementation
> as nbcon_device_try_acquire, but using NBCON_PRIO_EMERGENCY when
> acquiring the context.
>
> If the acquire succeeds, the message and message length are assigned to
> nbcon_write_context so ->write_atomic can print the message.
>
> After release try to flush the console since there may be a backlog of
> messages in the ringbuffer. The kthread console printers do not get a
> chance to run while kdb is active.
>
> --- a/include/linux/console.h
> +++ b/include/linux/console.h
> @@ -606,6 +606,9 @@ extern bool nbcon_can_proceed(struct nbcon_write_context *wctxt);
> extern bool nbcon_enter_unsafe(struct nbcon_write_context *wctxt);
> extern bool nbcon_exit_unsafe(struct nbcon_write_context *wctxt);
> extern void nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt);
> +extern bool nbcon_kdb_try_acquire(struct console *con,
> + struct nbcon_write_context *wctxt);
> +extern void nbcon_kdb_release(struct nbcon_write_context *wctxt);
>
> /*
> * Check if the given console is currently capable and allowed to print
> @@ -655,6 +658,9 @@ static inline bool nbcon_can_proceed(struct nbcon_write_context *wctxt) { return
> static inline bool nbcon_enter_unsafe(struct nbcon_write_context *wctxt) { return false; }
> static inline bool nbcon_exit_unsafe(struct nbcon_write_context *wctxt) { return false; }
> static inline void nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt) { }
> +static inline bool nbcon_kdb_try_acquire(struct console *con,
> + struct nbcon_write_context *wctxt) { return false; }
> +static inline void nbcon_kdb_release(struct console *con) { }
A test robot found that this definition is using a wrong type,
see https://lore.kernel.org/all/202510171023.YREXxhMK-lkp@intel.com/
It should be:
static inline void nbcon_kdb_release(struct nbcon_write_context *wctxt) { }
No need for v7. I am going to fix this when committing the patchset.
Best Regards,
Petr
next prev parent reply other threads:[~2025-10-17 10:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 14:47 [PATCH v6 0/5] Handle NBCON consoles on KDB Marcos Paulo de Souza
2025-10-16 14:47 ` [PATCH v6 1/5] printk: nbcon: Export console_is_usable Marcos Paulo de Souza
2025-10-16 14:47 ` [PATCH v6 2/5] printk: nbcon: Introduce KDB helpers Marcos Paulo de Souza
2025-10-17 10:16 ` Petr Mladek [this message]
2025-10-16 14:47 ` [PATCH v6 3/5] printk: nbcon: Allow KDB to acquire the NBCON context Marcos Paulo de Souza
2025-10-17 1:25 ` kernel test robot
2025-10-17 9:19 ` Petr Mladek
2025-10-17 9:22 ` Petr Mladek
2025-10-16 14:47 ` [PATCH v6 4/5] printk: nbcon: Export nbcon_write_context_set_buf Marcos Paulo de Souza
2025-10-16 14:47 ` [PATCH v6 5/5] kdb: Adapt kdb_msg_write to work with NBCON consoles Marcos Paulo de Souza
2025-10-17 2:17 ` kernel test robot
2025-10-17 10:12 ` Petr Mladek
2025-10-17 7:14 ` kernel test robot
2025-10-17 11:34 ` [PATCH v6 0/5] Handle NBCON consoles on KDB Petr Mladek
2025-10-17 12:12 ` Marcos Paulo de Souza
2025-10-24 11:52 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPIXjPJmJxW2i6xr@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=danielt@kernel.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason.wessel@windriver.com \
--cc=john.ogness@linutronix.de \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mpdesouza@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®