[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for co
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting |
Date: |
Fri, 23 Aug 2019 10:24:35 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/23/19 7:32 AM, Philippe Mathieu-Daudé wrote:
> diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
> index f69358a5ba..2781d8bd41 100644
> --- a/hw/arm/exynos4_boards.c
> +++ b/hw/arm/exynos4_boards.c
> @@ -131,8 +131,8 @@ exynos4_boards_init_common(MachineState *machine,
> exynos4_boards_init_ram(s, get_system_memory(),
> exynos4_board_ram_size[board_type]);
>
> - object_initialize(&s->soc, sizeof(s->soc), TYPE_EXYNOS4210_SOC);
> - qdev_set_parent_bus(DEVICE(&s->soc), sysbus_get_default());
> + sysbus_init_child_obj(OBJECT(machine), "soc",
> + &s->soc, sizeof(s->soc), TYPE_EXYNOS4210_SOC);
> object_property_set_bool(OBJECT(&s->soc), true, "realized",
> &error_fatal);
Thomas' comments re the commit message notwithstanding,
the patch itself is correct.
Reviewed-by: Richard Henderson <address@hidden>
r~
- [Qemu-devel] [PATCH v2 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child(), Philippe Mathieu-Daudé, 2019/08/23
- [Qemu-devel] [PATCH v2 1/6] hw/arm: Use ARM_CPU_TYPE_NAME() macro when appropriate, Philippe Mathieu-Daudé, 2019/08/23
- [Qemu-devel] [PATCH v2 2/6] hw/arm: Use object_initialize_child for correct reference counting, Philippe Mathieu-Daudé, 2019/08/23
- [Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting, Philippe Mathieu-Daudé, 2019/08/23
- [Qemu-devel] [PATCH v2 4/6] hw/arm/fsl-imx: Add the cpu as child of the SoC object, Philippe Mathieu-Daudé, 2019/08/23
- [Qemu-devel] [PATCH v2 5/6] hw/dma/xilinx_axi: Use object_initialize_child for correct ref. counting, Philippe Mathieu-Daudé, 2019/08/23
- [Qemu-devel] [PATCH v2 6/6] hw/net/xilinx_axi: Use object_initialize_child for correct ref. counting, Philippe Mathieu-Daudé, 2019/08/23