Skip to content

hw: Use object_initialize_child for correct reference counting

Philippe Mathieu-Daudé qemu-arm qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 28 repliesIn review
  2. v11 patch 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16hw/ppc/pnv: Use object_initialize_child for correct reference countinghw/ppc/pnv.c+4 -81 reply
2/16hw/misc/macio: Use object_initialize_child for correct ref. countinghw/misc/macio/macio.c+4 -41 reply
3/16hw/virtio: Use object_initialize_child for correct reference countinghw/virtio/virtio.c+2 -30 replies
4/16hw/arm/bcm2835: Use TYPE_PL011 instead of hardcoded stringhw/arm/bcm2835_peripherals.c include/hw/arm/bcm2835_peripherals.h+2 -12 replies
5/16hw/arm/bcm2835: Use object_initialize() on PL011Statehw/arm/bcm2835_peripherals.c include/hw/arm/bcm2835_peripherals.h+8 -82 replies
6/16hw/arm/bcm2835: Use object_initialize_child for correct ref. countinghw/arm/bcm2835_peripherals.c+20 -332 replies
7/16hw/arm/aspeed: Use object_initialize_child for correct ref. countinghw/arm/aspeed.c hw/arm/aspeed_soc.c+23 -331 reply
8/16hw/arm: Use object_initialize_child for correct reference countinghw/arm/digic.c hw/arm/imx25_pdk.c hw/arm/kzm.c +4 more+21 -312 replies
9/16hw/mips: Use object_initialize() on MIPSCPSStatehw/mips/boston.c hw/mips/mips_malta.c+20 -221 reply
10/16hw/mips: Use object_initialize_child for correct reference countinghw/mips/boston.c hw/mips/cps.c hw/mips/mips_malta.c+12 -161 reply
11/16hw/microblaze/zynqmp: Move the IPI state into the PMUSoC statehw/microblaze/xlnx-zynqmp-pmu.c+7 -72 replies
12/16hw/microblaze/zynqmp: Let the SoC manage the IPI deviceshw/microblaze/xlnx-zynqmp-pmu.c+16 -202 replies
13/16hw/microblaze/zynqmp: Use object_initialize_child for correct ref. countinghw/microblaze/xlnx-zynqmp-pmu.c+4 -32 replies
14/16hw/microblaze/zynqmp: Use object_initialize_child for correct ref. countinghw/microblaze/xlnx-zynqmp-pmu.c+3 -32 replies
15/16hw/arm/mps2: Use object_initialize_child for correct reference countinghw/arm/mps2-tz.c hw/arm/mps2.c+8 -81 reply
16/16hw/intc/nvic: Use object_initialize_child for correct reference countinghw/intc/armv7m_nvic.c+3 -32 replies

Reviews trailers per patch

15 of 16 patches have a Reviewed-by or Acked-by.

PatchThomas HuthJoel StanleyDavid GibsonPaolo BonziniAlistair Francis
1/16Inspired-by A-b
2/16Inspired-by A-b
3/16Inspired-by
4/16R-b R-b
5/16R-b R-b
6/16Inspired-by R-b R-b
7/16Inspired-by R-b R-b
8/16Inspired-by R-b R-b
9/16R-b
10/16Inspired-by R-b
11/16R-b R-b
12/16R-b R-b
13/16Inspired-by R-b R-b
14/16Inspired-by R-b R-b
15/16Inspired-by R-b
16/16Inspired-by R-b R-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 5 reviewers.

Read the v2 thread

Cover letter [Qemu-arm] [PATCH v2 00/16] hw: Use object_initialize_child for correct reference counting

Hi,

This series looks at Eduardo suggestions from [1]
and Thomas commit aff39be0ed97 to replace various
object_initialize + qdev_set_parent_bus calls by
sysbus_init_child_obj().

Important comment from Eduardo:

It's possible, but we need a volunteer to review each hunk because the existing code might be (correctly) calling object_unref() (either immediately or when parent is finalized).

I tried to split it enough to make the review process easier.

Regards,

Phil.

[*] https://patchwork.ozlabs.org/patch/943333/#1953608
v1: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg05931.html

Philippe Mathieu-Daudé (16):
hw/ppc/pnv: Use object_initialize_child for correct reference counting hw/misc/macio: Use object_initialize_child for correct ref. counting hw/virtio: Use object_initialize_child for correct reference counting hw/arm/bcm2835: Use TYPE_PL011 instead of hardcoded string hw/arm/bcm2835: Use object_initialize() on PL011State hw/arm/bcm2835: Use object_initialize_child for correct ref. counting hw/arm/aspeed: Use object_initialize_child for correct ref. counting hw/arm: Use object_initialize_child for correct reference counting hw/mips: Use object_initialize() on MIPSCPSState
hw/mips: Use object_initialize_child for correct reference counting hw/microblaze/zynqmp: Move the IPI state into the PMUSoC state hw/microblaze/zynqmp: Let the SoC manage the IPI devices hw/microblaze/zynqmp: Use object_initialize_child for correct ref.
counting
hw/microblaze/zynqmp: Use object_initialize_child for correct ref.
counting
hw/arm/mps2: Use object_initialize_child for correct reference
counting
hw/intc/nvic: Use object_initialize_child for correct reference
counting

 hw/arm/aspeed.c                      |  6 +--
 hw/arm/aspeed_soc.c                  | 50 +++++++++--------------
 hw/arm/bcm2835_peripherals.c         | 61 +++++++++++-----------------
 hw/arm/digic.c                       | 17 +++-----
 hw/arm/imx25_pdk.c                   |  5 +--
 hw/arm/kzm.c                         |  5 +--
 hw/arm/mps2-tz.c                     |  8 ++--
 hw/arm/mps2.c                        |  8 ++--
 hw/arm/raspi.c                       |  7 ++--
 hw/arm/sabrelite.c                   |  5 +--
 hw/arm/xlnx-zcu102.c                 |  5 +--
 hw/arm/xlnx-zynqmp.c                 |  8 ++--
 hw/intc/armv7m_nvic.c                |  6 +--
 hw/microblaze/xlnx-zynqmp-pmu.c      | 45 ++++++++++----------
 hw/mips/boston.c                     | 25 ++++++------
 hw/mips/cps.c                        | 20 ++++-----
 hw/mips/mips_malta.c                 | 17 ++++----
 hw/misc/macio/macio.c                |  8 ++--
 hw/ppc/pnv.c                         | 12 ++----
 hw/virtio/virtio.c                   |  5 +--
 include/hw/arm/bcm2835_peripherals.h |  3 +-
 21 files changed, 140 insertions(+), 186 deletions(-)
Signature · 1 line
2.20.1