[Qemu-devel] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()

Philippe Mathieu-Daudé posted 6 patches 4 years, 10 months ago
Test s390x failed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test FreeBSD passed
Test docker-clang@ubuntu failed
Failed in applying to current master (apply log)
There is a newer version of this series
hw/arm/allwinner-a10.c  |  3 ++-
hw/arm/cubieboard.c     |  3 ++-
hw/arm/digic.c          |  3 ++-
hw/arm/exynos4_boards.c |  4 ++--
hw/arm/fsl-imx25.c      |  4 +++-
hw/arm/fsl-imx31.c      |  4 +++-
hw/arm/fsl-imx6.c       |  3 ++-
hw/arm/fsl-imx6ul.c     |  3 ++-
hw/arm/mcimx7d-sabre.c  |  9 ++++-----
hw/arm/mps2-tz.c        | 15 +++++++--------
hw/arm/musca.c          |  9 +++++----
hw/arm/xlnx-zynqmp.c    |  8 ++++----
hw/dma/xilinx_axidma.c  | 16 ++++++++--------
hw/net/xilinx_axienet.c | 17 ++++++++---------
14 files changed, 54 insertions(+), 47 deletions(-)
[Qemu-devel] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
First we use ARM_CPU_TYPE_NAME() when we should.

Then is follow up of
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg01492.html

  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().

Finally, some devices are declared orphean while they have a parent,
let them be together again.

[1] https://patchwork.ozlabs.org/patch/943333/#1953608

Philippe Mathieu-Daudé (6):
  hw/arm: Use ARM_CPU_TYPE_NAME() macro when appropriate
  hw/arm: Use object_initialize_child for correct reference counting
  hw/arm: Use sysbus_init_child_obj for correct reference counting
  hw/arm/fsl-imx: Add the cpu as child of the SoC object
  hw/dma/xilinx_axi: Use object_initialize_child for correct ref.
    counting
  hw/net/xilinx_axi: Use object_initialize_child for correct ref.
    counting

 hw/arm/allwinner-a10.c  |  3 ++-
 hw/arm/cubieboard.c     |  3 ++-
 hw/arm/digic.c          |  3 ++-
 hw/arm/exynos4_boards.c |  4 ++--
 hw/arm/fsl-imx25.c      |  4 +++-
 hw/arm/fsl-imx31.c      |  4 +++-
 hw/arm/fsl-imx6.c       |  3 ++-
 hw/arm/fsl-imx6ul.c     |  3 ++-
 hw/arm/mcimx7d-sabre.c  |  9 ++++-----
 hw/arm/mps2-tz.c        | 15 +++++++--------
 hw/arm/musca.c          |  9 +++++----
 hw/arm/xlnx-zynqmp.c    |  8 ++++----
 hw/dma/xilinx_axidma.c  | 16 ++++++++--------
 hw/net/xilinx_axienet.c | 17 ++++++++---------
 14 files changed, 54 insertions(+), 47 deletions(-)

-- 
2.20.1


Re: [Qemu-devel] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
Buh I forgot to Cc Eduardo.

On 7/1/19 2:31 PM, Philippe Mathieu-Daudé wrote:
> First we use ARM_CPU_TYPE_NAME() when we should.
> 
> Then is follow up of
> https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg01492.html
> 
>   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().
> 
> Finally, some devices are declared orphean while they have a parent,
> let them be together again.
> 
> [1] https://patchwork.ozlabs.org/patch/943333/#1953608
> 
> Philippe Mathieu-Daudé (6):
>   hw/arm: Use ARM_CPU_TYPE_NAME() macro when appropriate
>   hw/arm: Use object_initialize_child for correct reference counting
>   hw/arm: Use sysbus_init_child_obj for correct reference counting
>   hw/arm/fsl-imx: Add the cpu as child of the SoC object
>   hw/dma/xilinx_axi: Use object_initialize_child for correct ref.
>     counting
>   hw/net/xilinx_axi: Use object_initialize_child for correct ref.
>     counting

Re: [Qemu-devel] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()
Posted by no-reply@patchew.org 4 years, 10 months ago
Patchew URL: https://patchew.org/QEMU/20190701123108.12493-1-philmd@redhat.com/



Hi,

This series failed build test on s390x host. Please find the details below.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
# Testing script will be invoked under the git checkout with
# HEAD pointing to a commit that has the patches applied on top of "base"
# branch
set -e

echo
echo "=== ENV ==="
env

echo
echo "=== PACKAGES ==="
rpm -qa

echo
echo "=== UNAME ==="
uname -a

CC=$HOME/bin/cc
INSTALL=$PWD/install
BUILD=$PWD/build
mkdir -p $BUILD $INSTALL
SRC=$PWD
cd $BUILD
$SRC/configure --cc=$CC --prefix=$INSTALL
make -j4
# XXX: we need reliable clean up
# make check -j4 V=1
make install
=== TEST SCRIPT END ===

  CC      hw/dma/i8257.o
  CC      hw/dma/xilinx_axidma.o
/var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c: In function ‘xilinx_axidma_init’:
/var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:568:29: error: ‘TYPE_XILINX_AXI_ENET_DATA_STREAM’ undeclared (first use in this function); did you mean ‘TYPE_XILINX_AXI_DMA_DATA_STREAM’?
  568 |                             TYPE_XILINX_AXI_ENET_DATA_STREAM, &error_abort,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             TYPE_XILINX_AXI_DMA_DATA_STREAM
/var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:568:29: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:572:29: error: ‘TYPE_XILINX_AXI_ENET_CONTROL_STREAM’ undeclared (first use in this function); did you mean ‘TYPE_XILINX_AXI_DMA_CONTROL_STREAM’?
  572 |                             TYPE_XILINX_AXI_ENET_CONTROL_STREAM, &error_abort,
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                             TYPE_XILINX_AXI_DMA_CONTROL_STREAM


The full log is available at
http://patchew.org/logs/20190701123108.12493-1-philmd@redhat.com/testing.s390x/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
On 7/1/19 7:56 PM, no-reply@patchew.org wrote:
> Patchew URL: https://patchew.org/QEMU/20190701123108.12493-1-philmd@redhat.com/
> 
> Hi,
> 
> This series failed build test on s390x host. Please find the details below.
> 
>   CC      hw/dma/i8257.o
>   CC      hw/dma/xilinx_axidma.o
> /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c: In function ‘xilinx_axidma_init’:
> /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:568:29: error: ‘TYPE_XILINX_AXI_ENET_DATA_STREAM’ undeclared (first use in this function); did you mean ‘TYPE_XILINX_AXI_DMA_DATA_STREAM’?
>   568 |                             TYPE_XILINX_AXI_ENET_DATA_STREAM, &error_abort,
>       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                             TYPE_XILINX_AXI_DMA_DATA_STREAM
> /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:568:29: note: each undeclared identifier is reported only once for each function it appears in
> /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:572:29: error: ‘TYPE_XILINX_AXI_ENET_CONTROL_STREAM’ undeclared (first use in this function); did you mean ‘TYPE_XILINX_AXI_DMA_CONTROL_STREAM’?
>   572 |                             TYPE_XILINX_AXI_ENET_CONTROL_STREAM, &error_abort,
>       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                             TYPE_XILINX_AXI_DMA_CONTROL_STREAM

It would be nice if GCC directly fix the patch instead of embarrassing
the author for obvious copy/paste mistakes...

Re: [Qemu-devel] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()
Posted by Peter Maydell 4 years, 10 months ago
On Mon, 1 Jul 2019 at 19:13, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> On 7/1/19 7:56 PM, no-reply@patchew.org wrote:
> > Patchew URL: https://patchew.org/QEMU/20190701123108.12493-1-philmd@redhat.com/
> >
> > Hi,
> >
> > This series failed build test on s390x host. Please find the details below.
> >
> >   CC      hw/dma/i8257.o
> >   CC      hw/dma/xilinx_axidma.o
> > /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c: In function ‘xilinx_axidma_init’:
> > /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:568:29: error: ‘TYPE_XILINX_AXI_ENET_DATA_STREAM’ undeclared (first use in this function); did you mean ‘TYPE_XILINX_AXI_DMA_DATA_STREAM’?
> >   568 |                             TYPE_XILINX_AXI_ENET_DATA_STREAM, &error_abort,
> >       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >       |                             TYPE_XILINX_AXI_DMA_DATA_STREAM
> > /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:568:29: note: each undeclared identifier is reported only once for each function it appears in
> > /var/tmp/patchew-tester-tmp-6umc5eop/src/hw/dma/xilinx_axidma.c:572:29: error: ‘TYPE_XILINX_AXI_ENET_CONTROL_STREAM’ undeclared (first use in this function); did you mean ‘TYPE_XILINX_AXI_DMA_CONTROL_STREAM’?
> >   572 |                             TYPE_XILINX_AXI_ENET_CONTROL_STREAM, &error_abort,
> >       |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >       |                             TYPE_XILINX_AXI_DMA_CONTROL_STREAM
>
> It would be nice if GCC directly fix the patch instead of embarrassing
> the author for obvious copy/paste mistakes...

Sufficiently new gcc supports -fdiagnostics-generate-patch, and you could
probably script up a wrapper to automatically apply the patches ;-)

thanks
-- PMM