All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Handle NBCON consoles on KDB
@ 2025-08-11 13:32 Marcos Paulo de Souza
  2025-08-11 13:32 ` [PATCH v2 1/3] printk: nbcon: Export console_is_usable Marcos Paulo de Souza
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Marcos Paulo de Souza @ 2025-08-11 13:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Petr Mladek, Steven Rostedt, John Ogness,
	Sergey Senozhatsky, Jason Wessel, Daniel Thompson,
	Douglas Anderson
  Cc: linux-kernel, kgdb-bugreport, Marcos Paulo de Souza

After the proposed patches [1], it was suggested to start using
console_is_usable instead of checking if a console is enabled. It was
noticed that KDB was always calling con->write method, but this
callback is not set for NBCON consoles.

To fix this usecase, export console_is_usable and add new nbcon code to
acquire a context that KDB needs in order to call ->write_atomic. After
these patches are accepted I'm planning to go back to [1] again to use
the function expected here.

I did the tests using qemu and reapplying commit f79b163c4231
('Revert "serial: 8250: Switch to nbcon console"') created originally by
John, just to exercise the common 8250 serial from qemu. The commit can
be checked on [2]. I had to solve some conflicts since the code has been
reworked after the commit was reverted.

Without these patches, NBCON consoles won't receive the kgdb messages. I
tested using [2], and it works after this patchset.

Thanks to all reviewers of the patches posted on [1]! I hope this is the
first step into implementing all the changes suggested in that patchset.

[1]: https://lore.kernel.org/lkml/20250606-printk-cleanup-part2-v1-0-f427c743dda0@suse.com/
[2]: https://github.com/marcosps/linux/commit/bea249773c9caf56821f9ec06c7f9649e4966c61

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
Changes in v2:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v1: https://lore.kernel.org/r/20250713-nbcon-kgdboc-v1-0-51eccd9247a8@suse.com

---
Marcos Paulo de Souza (3):
      printk: nbcon: Export console_is_usable
      printk: nbcon: Introduce KDB helpers
      kdb: Adapt kdb_msg_write to work with NBCON consoles

 include/linux/console.h   | 50 +++++++++++++++++++++++++++++++++++++++++++++++
 kernel/debug/kdb/kdb_io.c | 26 ++++++++++++++++++++----
 kernel/printk/internal.h  | 41 --------------------------------------
 kernel/printk/nbcon.c     | 26 ++++++++++++++++++++++++
 4 files changed, 98 insertions(+), 45 deletions(-)
---
base-commit: bea249773c9caf56821f9ec06c7f9649e4966c61
change-id: 20250713-nbcon-kgdboc-efcfc37fde46

Best regards,
-- 
Marcos Paulo de Souza <mpdesouza@suse.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-09-01 12:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 13:32 [PATCH v2 0/3] Handle NBCON consoles on KDB Marcos Paulo de Souza
2025-08-11 13:32 ` [PATCH v2 1/3] printk: nbcon: Export console_is_usable Marcos Paulo de Souza
2025-08-20 15:03   ` Petr Mladek
2025-08-11 13:32 ` [PATCH v2 2/3] printk: nbcon: Introduce KDB helpers Marcos Paulo de Souza
2025-08-26 14:30   ` John Ogness
2025-08-29 12:30     ` Marcos Paulo de Souza
2025-08-28 15:26   ` Petr Mladek
2025-08-29 12:33     ` Marcos Paulo de Souza
2025-08-11 13:32 ` [PATCH v2 3/3] kdb: Adapt kdb_msg_write to work with NBCON consoles Marcos Paulo de Souza
2025-08-11 14:38   ` Daniel Thompson
2025-08-11 19:19     ` Marcos Paulo de Souza
2025-08-26 15:11       ` John Ogness
2025-08-29 13:15         ` Petr Mladek
2025-08-29 14:01           ` Marcos Paulo de Souza
2025-08-29 14:12           ` John Ogness
2025-09-01 11:46             ` Petr Mladek
2025-09-01 12:27               ` John Ogness
2025-08-12 17:14 ` [PATCH v2 0/3] Handle NBCON consoles on KDB Marcos Paulo de Souza

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.