Skip to content

serial: Disable DMA and PM on kernel console

Andy Shevchenko linux-renesas-soc linux-serial 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 18 repliesIn review
  2. v28 patches 17 repliesSuperseded

Changes in v3 from the cover letter

- dropped applied patches
- dropped "cleanup" DMA patches, that they were not tested and actually are regressions
- added DEVICE_ATTR_RO/_RW conversion patches (Greg)
- added pr_*() to dev_*() conversion patch (Greg)
- updated commit message to note OMAP behaviour change (Russell)
- replace run-time PM callbacks to be _sync() (Tony)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6serial: core: Switch to use DEVICE_ATTR_RO()drivers/tty/serial/serial_core.c+28 -290 replies
2/6serial: core: Allow detach and attach serial device for consoleDocumentation/ABI/testing/sysfs-tty drivers/tty/serial/serial_core.c+63 -411 replies
3/6serial: 8250_port: Switch to use DEVICE_ATTR_RW()drivers/tty/serial/8250/8250_port.c+6 -80 replies
4/6serial: 8250_port: Use dev_*() instead of pr_*()drivers/tty/serial/8250/8250_port.c+7 -100 replies
5/6serial: 8250_port: Don't use power management for kernel consoledrivers/tty/serial/8250/8250_core.c drivers/tty/serial/8250/8250_port.c include/linux/serial_8250.h+30 -40 replies
6/6serial: 8250_port: Disable DMA operations for kernel consoledrivers/tty/serial/8250/8250_port.c+8 -30 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTony Lindgren
SeriesR-b T-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/6] serial: Disable DMA and PM on kernel console

This is third version to get rid of problematic DMA and PM calls in the serial kernel console code.

Patches 1, 3 and 4 are preparatory ones.

After previous discussion Tony suggested to add a possibility to detach and attach back kernel console from user space. It's done in the patch 2.

Kernel console is sensitive to any kind of complex work needed to print out anything on it. One such case is emergency print during Oops.

More details on topic are in the commit messages of the patches 5 and 6.

The series has been tested on few Intel platforms.

Note, it depends to recently submitted and applied patches in the core console code [2, 3]. Petr, may you confirm that [3] is immutable or even send Greg KH a PR?

Greg, see above note before applying, thanks!

[1]: https://lore.kernel.org/patchwork/cover/905632/
[2]: https://lore.kernel.org/lkml/[email protected]/
[3]: https://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git/log/?h=for-5.7-console-exit

Cc Russell King <[email protected]>
Cc Petr Mladek <[email protected]>

Changelog v3:
- dropped applied patches
- dropped "cleanup" DMA patches, that they were not tested and actually are regressions
- added DEVICE_ATTR_RO/_RW conversion patches (Greg)
- added pr_*() to dev_*() conversion patch (Greg)
- updated commit message to note OMAP behaviour change (Russell)
- replace run-time PM callbacks to be _sync() (Tony)

Changelog v2:
- added possibility to detach and attach back console from userspace (Tony)
- reworded commit messages in patches 5 and 6 (Sebastian)
- dropped console patch (it had been pushed separately [2])

Andy Shevchenko (6):
serial: core: Switch to use DEVICE_ATTR_RO()
serial: core: Allow detach and attach serial device for console
serial: 8250_port: Switch to use DEVICE_ATTR_RW()
serial: 8250_port: Use dev_*() instead of pr_*()
serial: 8250_port: Don't use power management for kernel console
serial: 8250_port: Disable DMA operations for kernel console

 Documentation/ABI/testing/sysfs-tty |   7 ++
 drivers/tty/serial/8250/8250_core.c |   9 +++
 drivers/tty/serial/8250/8250_port.c |  64 +++++++++------
 drivers/tty/serial/serial_core.c    | 117 ++++++++++++++++++++--------
 include/linux/serial_8250.h         |   1 +
 5 files changed, 141 insertions(+), 57 deletions(-)

--
2.25.0