qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/28] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR
@ 2019-10-22 16:21 Marc-André Lureau
  2019-10-22 16:21 ` [PATCH v2 01/28] chardev: generate an internal id when none given Marc-André Lureau
                   ` (27 more replies)
  0 siblings, 28 replies; 35+ messages in thread
From: Marc-André Lureau @ 2019-10-22 16:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Corey Minyard, Peter Maydell, Michael S. Tsirkin, Jason Wang,
	Mark Cave-Ayland, KONRAD Frederic, Edgar E. Iglesias,
	Aleksandar Rikalo, Magnus Damm, Hervé Poussineau,
	Marc-André Lureau, Artyom Tarasenko, Eduardo Habkost,
	Fabien Chouteau, qemu-arm, Richard Henderson,
	Daniel P. Berrangé,
	qemu-ppc, Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

Hi,

QDEV_PROP_PTR is marked in multiple places as "FIXME/TODO/remove
me". In most cases, it can be easily replaced with QDEV_PROP_LINK when
the pointer points to an Object.

There are a few places where such substitution isn't possible. For
those places, it seems reasonable to use a specific setter method
instead, and keep the user_creatable = false. In other places,
proper usage of qemu_irq is the solution.

The serial code wasn't converted to qdev, which makes it a bit more
archaic to deal with. Let's convert it first, so we can more easily
embed it from other devices, and expose properties.

v2:
 - qom-ify serial
 - embed the serial from sm501, and expose a "chardev" property
 - add "leon3: use qemu_irq framework instead of callback as property"
 - add "sparc: move PIL irq handling to cpu.c"
 - add "cris: improve passing PIC interrupt vector to the CPU"
 - misc comment/todo changes, add r-b tags

Marc-André Lureau (28):
  chardev: generate an internal id when none given
  serial-pci-multi: factor out multi_serial_get_nr_ports
  serial: initial qom-ification
  serial: register vmsd with DeviceClass
  serial: add and set "chardev" property
  serial: make SerialMMState actually a different type
  serial: add and set "regshift" property
  serial: convert irq to qdev gpio properties
  serial: add "baudbase" property
  serial: add "base" property
  serial: realize the serial device
  serial: replace serial_exit_core() with unrealize
  serial: factor out serial_mm_connect
  sm501: embed the serial device
  vmmouse: replace PROP_PTR with PROP_LINK
  lance: replace PROP_PTR with PROP_LINK
  etraxfs: remove PROP_PTR usage
  dp8393x: replace PROP_PTR with PROP_LINK
  leon3: use qemu_irq framework instead of callback as property
  sparc: move PIL irq handling to cpu.c
  RFC: mips/cps: fix setting saar property
  cris: improve passing PIC interrupt vector to the CPU
  smbus-eeprom: remove PROP_PTR
  omap-intc: remove PROP_PTR
  omap-i2c: remove PROP_PTR
  omap-gpio: remove PROP_PTR
  qdev: remove PROP_MEMORY_REGION
  Remove QDEV_PROP_PTR

 chardev/char.c               |  32 ++++++---
 hw/arm/omap1.c               |   8 +--
 hw/arm/omap2.c               |  25 +++----
 hw/char/serial-isa.c         |  11 ++-
 hw/char/serial-pci-multi.c   |  45 +++++++++----
 hw/char/serial-pci.c         |  17 ++++-
 hw/char/serial.c             | 127 +++++++++++++++++++++++++++--------
 hw/core/qdev-properties.c    |  18 -----
 hw/cris/axis_dev88.c         |   4 --
 hw/display/sm501.c           |  27 +++++---
 hw/dma/sparc32_dma.c         |   2 +-
 hw/gpio/omap_gpio.c          |  42 +++++-------
 hw/i2c/omap_i2c.c            |  19 ++++--
 hw/i2c/smbus_eeprom.c        |  17 +++--
 hw/i386/pc.c                 |   6 +-
 hw/i386/vmmouse.c            |   8 +--
 hw/input/pckbd.c             |   8 +--
 hw/intc/etraxfs_pic.c        |  26 +------
 hw/intc/grlib_irqmp.c        |  35 ++--------
 hw/intc/omap_intc.c          |  17 +++--
 hw/mips/cps.c                |   2 +-
 hw/mips/mips_jazz.c          |   3 +-
 hw/net/dp8393x.c             |   7 +-
 hw/net/etraxfs_eth.c         |  44 +++++++++---
 hw/net/lance.c               |   5 +-
 hw/net/pcnet-pci.c           |   2 +-
 hw/net/pcnet.h               |   2 +-
 hw/sh4/r2d.c                 |   2 +-
 hw/sparc/leon3.c             |  38 +----------
 hw/sparc/trace-events        |   4 --
 include/hw/arm/omap.h        |  52 ++++++++++++++
 include/hw/char/serial.h     |  25 +++++--
 include/hw/cris/etraxfs.h    |  20 +-----
 include/hw/input/i8042.h     |   4 +-
 include/hw/qdev-properties.h |  24 -------
 include/qemu/id.h            |   1 +
 target/cris/cpu.c            |   8 +++
 target/cris/cpu.h            |   1 +
 target/sparc/cpu.c           |  39 +++++++++++
 target/sparc/cpu.h           |   1 +
 target/sparc/trace-events    |   4 ++
 util/id.c                    |   1 +
 42 files changed, 451 insertions(+), 332 deletions(-)

-- 
2.23.0.606.g08da6496b6



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

end of thread, other threads:[~2019-10-22 17:57 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 16:21 [PATCH v2 00/28] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 01/28] chardev: generate an internal id when none given Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 02/28] serial-pci-multi: factor out multi_serial_get_nr_ports Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 03/28] serial: initial qom-ification Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 04/28] serial: register vmsd with DeviceClass Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 05/28] serial: add and set "chardev" property Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 06/28] serial: make SerialMMState actually a different type Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 07/28] serial: add and set "regshift" property Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 08/28] serial: convert irq to qdev gpio properties Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 09/28] serial: add "baudbase" property Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 10/28] serial: add "base" property Marc-André Lureau
2019-10-22 16:31   ` Peter Maydell
2019-10-22 16:42     ` Marc-André Lureau
2019-10-22 16:50       ` Peter Maydell
2019-10-22 16:21 ` [PATCH v2 11/28] serial: realize the serial device Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 12/28] serial: replace serial_exit_core() with unrealize Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 13/28] serial: factor out serial_mm_connect Marc-André Lureau
2019-10-22 16:34   ` Peter Maydell
2019-10-22 16:21 ` [PATCH v2 14/28] sm501: embed the serial device Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 15/28] vmmouse: replace PROP_PTR with PROP_LINK Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 16/28] lance: " Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 17/28] etraxfs: remove PROP_PTR usage Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 18/28] dp8393x: replace PROP_PTR with PROP_LINK Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 19/28] leon3: use qemu_irq framework instead of callback as property Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 20/28] sparc: move PIL irq handling to cpu.c Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 21/28] RFC: mips/cps: fix setting saar property Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 22/28] cris: improve passing PIC interrupt vector to the CPU Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 23/28] smbus-eeprom: remove PROP_PTR Marc-André Lureau
2019-10-22 17:19   ` Peter Maydell
2019-10-22 17:56     ` Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 24/28] omap-intc: " Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 25/28] omap-i2c: " Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 26/28] omap-gpio: " Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 27/28] qdev: remove PROP_MEMORY_REGION Marc-André Lureau
2019-10-22 16:21 ` [PATCH v2 28/28] Remove QDEV_PROP_PTR Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).