qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/misc/macio: Add the nvram as child of the MacIO south bridge
@ 2019-07-01 12:34 Philippe Mathieu-Daudé
  2019-07-01 16:55 ` Mark Cave-Ayland
  2019-07-01 18:07 ` no-reply
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-01 12:34 UTC (permalink / raw)
  To: qemu-devel
  Cc: Mark Cave-Ayland, Philippe Mathieu-Daudé, qemu-ppc,
	Eduardo Habkost, David Gibson

Avoid another QOM orphean, link it back to its parent.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/misc/macio/macio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 82492096f8..e02882be28 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -243,7 +243,8 @@ static void macio_oldworld_init(Object *obj)
 
     macio_init_child_obj(s, "cuda", &s->cuda, sizeof(s->cuda), TYPE_CUDA);
 
-    object_initialize(&os->nvram, sizeof(os->nvram), TYPE_MACIO_NVRAM);
+    object_initialize_child(s, "nvram",  &os->nvram, sizeof(os->nvram),
+                            TYPE_MACIO_NVRAM, &error_abort, NULL);
     dev = DEVICE(&os->nvram);
     qdev_prop_set_uint32(dev, "size", 0x2000);
     qdev_prop_set_uint32(dev, "it_shift", 4);
-- 
2.20.1



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

* Re: [Qemu-devel] [PATCH] hw/misc/macio: Add the nvram as child of the MacIO south bridge
  2019-07-01 12:34 [Qemu-devel] [PATCH] hw/misc/macio: Add the nvram as child of the MacIO south bridge Philippe Mathieu-Daudé
@ 2019-07-01 16:55 ` Mark Cave-Ayland
  2019-07-01 18:07 ` no-reply
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Cave-Ayland @ 2019-07-01 16:55 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-ppc, Eduardo Habkost, David Gibson

On 01/07/2019 13:34, Philippe Mathieu-Daudé wrote:

> Avoid another QOM orphean, link it back to its parent.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/misc/macio/macio.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
> index 82492096f8..e02882be28 100644
> --- a/hw/misc/macio/macio.c
> +++ b/hw/misc/macio/macio.c
> @@ -243,7 +243,8 @@ static void macio_oldworld_init(Object *obj)
>  
>      macio_init_child_obj(s, "cuda", &s->cuda, sizeof(s->cuda), TYPE_CUDA);
>  
> -    object_initialize(&os->nvram, sizeof(os->nvram), TYPE_MACIO_NVRAM);
> +    object_initialize_child(s, "nvram",  &os->nvram, sizeof(os->nvram),
> +                            TYPE_MACIO_NVRAM, &error_abort, NULL);
>      dev = DEVICE(&os->nvram);
>      qdev_prop_set_uint32(dev, "size", 0x2000);
>      qdev_prop_set_uint32(dev, "it_shift", 4);

Hmmm actually I think this should be using macio_init_child_obj() which does the same
as you have done above, plus it sets the qbus correctly too. And also a minor nit on
the subject line: you should mention that this just for Old World Macs, since for New
World Macs the NVRAM is located elsewhere.

In fact it looks like there are also a few cases in macio_newworld_realize() where
this function should be used too, if you fancy touching those up whilst you're in the
area.


ATB,

Mark.


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

* Re: [Qemu-devel] [PATCH] hw/misc/macio: Add the nvram as child of the MacIO south bridge
  2019-07-01 12:34 [Qemu-devel] [PATCH] hw/misc/macio: Add the nvram as child of the MacIO south bridge Philippe Mathieu-Daudé
  2019-07-01 16:55 ` Mark Cave-Ayland
@ 2019-07-01 18:07 ` no-reply
  1 sibling, 0 replies; 3+ messages in thread
From: no-reply @ 2019-07-01 18:07 UTC (permalink / raw)
  To: philmd; +Cc: ehabkost, mark.cave-ayland, qemu-devel, qemu-ppc, philmd, david

Patchew URL: https://patchew.org/QEMU/20190701123441.13412-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/misc/macio/pmu.o
  CC      hw/misc/macio/mac_dbdma.o
/var/tmp/patchew-tester-tmp-58xxnaif/src/hw/misc/macio/macio.c: In function ‘macio_oldworld_init’:
/var/tmp/patchew-tester-tmp-58xxnaif/src/hw/misc/macio/macio.c:246:29: error: passing argument 1 of ‘object_initialize_child’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  246 |     object_initialize_child(s, "nvram",  &os->nvram, sizeof(os->nvram),
      |                             ^
      |                             |


The full log is available at
http://patchew.org/logs/20190701123441.13412-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

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

end of thread, other threads:[~2019-07-02  3:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-01 12:34 [Qemu-devel] [PATCH] hw/misc/macio: Add the nvram as child of the MacIO south bridge Philippe Mathieu-Daudé
2019-07-01 16:55 ` Mark Cave-Ayland
2019-07-01 18:07 ` no-reply

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