Skip to content

TYPE_SERIAL cleanup

Bernhard Beschow qemu-arm qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 10 repliesIn review
  2. v213 patches 17 repliesSuperseded
  3. v112 patches 15 repliesSuperseded

Changes in v3 from the cover letter

* Pick up further R-b tags. Thanks!
* Add patch "hw/char/{diva-gsp,serial-pci-multi}: Fix deinitialization order" (Peter)
* Justify switching to serial_io_ops in certain cases in TYPE_SERIAL_MM (Peter)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14hw/arm/Kconfig: Fix serial selection for NPCM8XXhw/arm/Kconfig+1 -10 replies
2/14hw/char/{diva-gsp, serial-pci-multi}: Fix deinitialization orderhw/char/diva-gsp.c hw/char/serial-pci-multi.c+2 -20 replies
3/14hw/arm/aspeed_ast27x0-{ssp, tsp}: Do not access SerialMM internals directlyhw/arm/aspeed_ast27x0-ssp.c hw/arm/aspeed_ast27x0-tsp.c+8 -60 replies
4/14util/fifo8: Make all read-only methods const-correctinclude/qemu/fifo8.h util/fifo8.c+10 -101 reply
5/14hw/char/serial: Remove explicit cast from void pointerhw/char/serial.c+6 -61 reply
6/14hw/char/serial: Prefer fifo8 methods over open-codinghw/char/serial.c+4 -41 reply
7/14hw/char/serial: Reuse fifo8_num_used()hw/char/serial.c+3 -31 reply
8/14hw/char/serial: Remove unhelpful commenthw/char/serial.c+0 -30 replies
9/14hw/char/serial: Add constants for Line Control Registerhw/char/serial.c+11 -62 replies
10/14hw/char/serial: Remove redundant resethw/char/serial.c+0 -10 replies
11/14hw/char/serial: Avoid implicit conversion when tracinghw/char/trace-events+2 -20 replies
12/14hw/char/serial: Keep MemoryRegionOps privatehw/char/diva-gsp.c hw/char/serial-isa.c hw/char/serial-mm.c +5 more+66 -801 reply
13/14hw/char/serial: Inherit from SysBusDevicehw/char/diva-gsp.c hw/char/serial-isa.c hw/char/serial-mm.c +4 more+43 -362 replies
14/14hw/char/serial: Plug into reset frameworkhw/char/serial.c+3 -60 replies

Reviews trailers per patch

12 of 14 patches have a Reviewed-by or Acked-by.

PatchPeter MaydellJamin LinPhilippe Mathieu-Daudé
1/14R-b
2/14
3/14R-b R-b
4/14R-b R-b
5/14R-b R-b
6/14R-b R-b
7/14R-b R-b
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 00/14] TYPE_SERIAL cleanup

This series consists of cosmetic changes around TYPE_SERIAL. The biggest change is having it derive from TYPE_SYS_BUS_DEVICE which 1) eliminates usage of qemu_{un,}register_reset() and 2) stops all its users from accessing private data. The latter allows TYPE_SERIAL to be ported to Rust in the (near) future.

v3:
* Pick up further R-b tags. Thanks!
* Add patch "hw/char/{diva-gsp,serial-pci-multi}: Fix deinitialization order" (Peter)
* Justify switching to serial_io_ops in certain cases in TYPE_SERIAL_MM (Peter)

v2:
* Pick up R-b tags. Thanks!
* Ad patch to free consumers of TYPE_SERIAL from setting up MemoryRegionOps; configure via properties instead which should resolve odd code (Peter)
* Improve wording in one commit message (Peter)
* Sort patches by moving char/serial last
-> Keep "Avoid implicit conversion when tracing" untouched for now. Can be
omitted if deemed inappropriate.

Testing done:
* Boot mpc8544ds machine with Linux and interact with it on the serial console
* Boot q35 machine with Arch Linux and interact with it on the serial console
* Make check
* Make check-functional with all architectures enabled:
Summary of Failures:

238/313 func-thorough+func-aarch64-thorough+thorough - qemu:func-aarch64-tcg_plugins ERROR 0.72s exit status 1
309/313 func-thorough+func-x86_64-thorough+thorough - qemu:func-x86_64-vhost_user_bridge TIMEOUT 90.01s killed by signal 15 SIGTERM
311/313 func-thorough+func-x86_64-thorough+thorough - qemu:func-x86_64-rebuild_vmfd ERROR 33.64s exit status 1

Ok: 257
Fail: 2
Skipped: 53
Timeout: 1

Bernhard Beschow (14):
hw/arm/Kconfig: Fix serial selection for NPCM8XX hw/char/{diva-gsp,serial-pci-multi}: Fix deinitialization order hw/arm/aspeed_ast27x0-{ssp, tsp}: Do not access SerialMM internals
directly
util/fifo8: Make all read-only methods const-correct hw/char/serial: Remove explicit cast from void pointer hw/char/serial: Prefer fifo8 methods over open-coding hw/char/serial: Reuse fifo8_num_used()
hw/char/serial: Remove unhelpful comment hw/char/serial: Add constants for Line Control Register hw/char/serial: Remove redundant reset
hw/char/serial: Avoid implicit conversion when tracing hw/char/serial: Keep MemoryRegionOps private hw/char/serial: Inherit from SysBusDevice hw/char/serial: Plug into reset framework

 include/hw/char/serial-mm.h |   3 -
 include/hw/char/serial.h    |   8 ++-
 include/qemu/fifo8.h        |  10 +--
 hw/arm/aspeed_ast27x0-ssp.c |   7 +-
 hw/arm/aspeed_ast27x0-tsp.c |   7 +-
 hw/char/diva-gsp.c          |  23 +++---
 hw/char/serial-isa.c        |  17 +++--
 hw/char/serial-mm.c         |  59 ++--------------
 hw/char/serial-pci-multi.c  |  23 +++---
 hw/char/serial-pci.c        |  11 ++-
 hw/char/serial.c            | 137 +++++++++++++++++++++++++-----------
 util/fifo8.c                |  10 +--
 hw/arm/Kconfig              |   2 +-
 hw/char/trace-events        |   4 +-
 14 files changed, 157 insertions(+), 164 deletions(-)
Signature · 1 line
2.53.0