All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/33] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR
@ 2019-10-23 17:31 Marc-André Lureau
  2019-10-23 17:31 ` [PATCH v3 01/33] qdev: remove unused qdev_prop_int64 Marc-André Lureau
                   ` (32 more replies)
  0 siblings, 33 replies; 99+ messages in thread
From: Marc-André Lureau @ 2019-10-23 17:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Corey Minyard, Peter Maydell, Michael S. Tsirkin, Jason Wang,
	Mark Cave-Ayland, KONRAD Frederic, Edgar E. Iglesias,
	Paul Burton, 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 re-export some properties.

v3:
 - introduce SerialMM and SerialIO sysbus devices
 - remove serial_mm_connect introduced in v2
 - replace "base" property introduced in v2, use "instance-id" for
   vmstate purpose only
 - add a few preliminary clean-ups

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 (33):
  qdev: remove unused qdev_prop_int64
  sysbus: remove unused sysbus_try_create*
  sysbus: remove outdated comment
  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 "chardev" property
  serial: add "baudbase" property
  serial: add "instance-id" property
  serial: realize the serial device
  serial: replace serial_exit_core() with unrealize
  serial: start making SerialMM a sysbus device
  serial-mm: add "regshift" property
  serial-mm: add endianness property
  serial-mm: use sysbus facilities
  serial: make SerialIO a sysbus device
  mips: inline serial_init
  sm501: make SerialMM a child, export chardev property
  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
  qdev: remove QDEV_PROP_PTR

 chardev/char.c               |  32 +++++--
 hw/arm/omap1.c               |   8 +-
 hw/arm/omap2.c               |  25 +++---
 hw/char/omap_uart.c          |   2 +-
 hw/char/serial-isa.c         |  11 ++-
 hw/char/serial-pci-multi.c   |  45 +++++++---
 hw/char/serial-pci.c         |  17 +++-
 hw/char/serial.c             | 164 ++++++++++++++++++++++++++++-------
 hw/core/qdev-properties.c    |  50 -----------
 hw/core/sysbus.c             |  32 -------
 hw/cris/axis_dev88.c         |   4 -
 hw/display/sm501.c           |  31 +++++--
 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                 |   7 +-
 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/boston.c             |   2 +-
 hw/mips/cps.c                |   2 +-
 hw/mips/mips_jazz.c          |   3 +-
 hw/mips/mips_malta.c         |   2 +-
 hw/mips/mips_mipssim.c       |  13 ++-
 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     |  44 +++++++---
 include/hw/cris/etraxfs.h    |  20 +----
 include/hw/input/i8042.h     |   4 +-
 include/hw/qdev-properties.h |  27 ------
 include/hw/sysbus.h          |  13 +--
 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 +
 48 files changed, 515 insertions(+), 428 deletions(-)

-- 
2.23.0.606.g08da6496b6



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

end of thread, other threads:[~2019-11-21  6:51 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 17:31 [PATCH v3 00/33] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 01/33] qdev: remove unused qdev_prop_int64 Marc-André Lureau
2019-11-18 14:01   ` Peter Maydell
2019-11-20  3:36     ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 02/33] sysbus: remove unused sysbus_try_create* Marc-André Lureau
2019-10-23 22:35   ` Philippe Mathieu-Daudé
2019-11-18 14:02   ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 03/33] sysbus: remove outdated comment Marc-André Lureau
2019-10-23 22:36   ` Philippe Mathieu-Daudé
2019-10-23 17:31 ` [PATCH v3 04/33] chardev: generate an internal id when none given Marc-André Lureau
2019-11-18 14:12   ` Peter Maydell
2019-11-18 18:54     ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 05/33] serial-pci-multi: factor out multi_serial_get_nr_ports Marc-André Lureau
2019-10-23 22:41   ` Philippe Mathieu-Daudé
2019-10-24  9:59     ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 06/33] serial: initial qom-ification Marc-André Lureau
2019-10-24  8:48   ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 07/33] serial: register vmsd with DeviceClass Marc-André Lureau
2019-11-18 14:21   ` Peter Maydell
2019-11-19 10:22     ` Marc-André Lureau
2019-11-19 10:33       ` Peter Maydell
2019-11-19 11:57         ` Marc-André Lureau
2019-11-20 18:54           ` Dr. David Alan Gilbert
2019-11-21  6:49             ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 08/33] serial: add "chardev" property Marc-André Lureau
2019-10-23 22:39   ` Philippe Mathieu-Daudé
2019-11-18 14:23   ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 09/33] serial: add "baudbase" property Marc-André Lureau
2019-10-23 22:40   ` Philippe Mathieu-Daudé
2019-11-18 14:26   ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 10/33] serial: add "instance-id" property Marc-André Lureau
2019-11-18 14:29   ` Peter Maydell
2019-11-19 10:32     ` Marc-André Lureau
2019-11-20  9:06   ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 11/33] serial: realize the serial device Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 12/33] serial: replace serial_exit_core() with unrealize Marc-André Lureau
2019-11-18 14:32   ` Peter Maydell
2019-11-20 12:32   ` Philippe Mathieu-Daudé
2019-10-23 17:31 ` [PATCH v3 13/33] serial: start making SerialMM a sysbus device Marc-André Lureau
2019-11-18 14:43   ` Peter Maydell
2019-11-20  7:34     ` Marc-André Lureau
2019-11-20 10:36       ` Peter Maydell
2019-11-20 10:40         ` Marc-André Lureau
2019-11-20 10:58           ` Peter Maydell
2019-11-20 11:03             ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 14/33] serial-mm: add "regshift" property Marc-André Lureau
2019-11-18 14:54   ` Peter Maydell
2019-11-20  7:53     ` Marc-André Lureau
2019-11-20 10:43       ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 15/33] serial-mm: add endianness property Marc-André Lureau
2019-11-18 15:02   ` Peter Maydell
2019-11-18 15:07   ` Peter Maydell
2019-11-20  7:59     ` Marc-André Lureau
2019-11-20 12:57   ` Philippe Mathieu-Daudé
2019-10-23 17:31 ` [PATCH v3 16/33] serial-mm: use sysbus facilities Marc-André Lureau
2019-11-18 15:09   ` Peter Maydell
2019-11-20  8:30     ` Marc-André Lureau
2019-11-20 10:46       ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 17/33] serial: make SerialIO a sysbus device Marc-André Lureau
2019-11-18 15:16   ` Peter Maydell
2019-11-20  8:41     ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 18/33] mips: inline serial_init Marc-André Lureau
2019-11-18 15:24   ` Peter Maydell
2019-11-20 11:14     ` Marc-André Lureau
2019-11-20  0:07   ` Aleksandar Markovic
2019-10-23 17:31 ` [PATCH v3 19/33] sm501: make SerialMM a child, export chardev property Marc-André Lureau
2019-10-23 22:57   ` Philippe Mathieu-Daudé
2019-10-24 10:28     ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 20/33] vmmouse: replace PROP_PTR with PROP_LINK Marc-André Lureau
2019-10-23 22:59   ` Philippe Mathieu-Daudé
2019-10-23 17:31 ` [PATCH v3 21/33] lance: " Marc-André Lureau
2019-10-23 23:00   ` Philippe Mathieu-Daudé
2019-10-24 11:09     ` Marc-André Lureau
2019-10-24 11:47       ` Philippe Mathieu-Daudé
2019-10-24 11:52         ` Peter Maydell
2019-10-24 18:07           ` Eduardo Habkost
2019-10-25  7:31             ` Peter Maydell
2019-10-24 12:25         ` Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 22/33] etraxfs: remove PROP_PTR usage Marc-André Lureau
2019-11-18 15:28   ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 23/33] dp8393x: replace PROP_PTR with PROP_LINK Marc-André Lureau
2019-10-23 23:02   ` Philippe Mathieu-Daudé
2019-10-24 11:12     ` Marc-André Lureau
2019-10-24 11:48       ` Philippe Mathieu-Daudé
2019-10-23 17:31 ` [PATCH v3 24/33] leon3: use qemu_irq framework instead of callback as property Marc-André Lureau
2019-11-18 14:15   ` KONRAD Frederic
2019-11-18 15:34   ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 25/33] sparc: move PIL irq handling to cpu.c Marc-André Lureau
2019-11-18 15:38   ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 26/33] RFC: mips/cps: fix setting saar property Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 27/33] cris: improve passing PIC interrupt vector to the CPU Marc-André Lureau
2019-11-18 15:40   ` Peter Maydell
2019-10-23 17:31 ` [PATCH v3 28/33] smbus-eeprom: remove PROP_PTR Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 29/33] omap-intc: " Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 30/33] omap-i2c: " Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 31/33] omap-gpio: " Marc-André Lureau
2019-10-23 17:31 ` [PATCH v3 32/33] qdev: remove PROP_MEMORY_REGION Marc-André Lureau
2019-10-23 23:07   ` Philippe Mathieu-Daudé
2019-10-23 17:31 ` [PATCH v3 33/33] qdev: remove QDEV_PROP_PTR Marc-André Lureau

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.