[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 4/6] hw/arm/fsl-imx: Add the cpu as child of the S
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH 4/6] hw/arm/fsl-imx: Add the cpu as child of the SoC object |
Date: |
Mon, 29 Jul 2019 14:05:44 +0100 |
On Mon, 1 Jul 2019 at 13:31, Philippe Mathieu-Daudé <address@hidden> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/arm/fsl-imx25.c | 4 +++-
> hw/arm/fsl-imx31.c | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
> index 869ee89b15..a237e967e4 100644
> --- a/hw/arm/fsl-imx25.c
> +++ b/hw/arm/fsl-imx25.c
> @@ -36,7 +36,9 @@ static void fsl_imx25_init(Object *obj)
> FslIMX25State *s = FSL_IMX25(obj);
> int i;
>
> - object_initialize(&s->cpu, sizeof(s->cpu), "arm926-" TYPE_ARM_CPU);
> + object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
> + ARM_CPU_TYPE_NAME("arm926"),
> + &error_abort, NULL);
>
> sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
> TYPE_IMX_AVIC);
> diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
> index 662fe78f1b..423d9ef076 100644
> --- a/hw/arm/fsl-imx31.c
> +++ b/hw/arm/fsl-imx31.c
> @@ -33,7 +33,9 @@ static void fsl_imx31_init(Object *obj)
> FslIMX31State *s = FSL_IMX31(obj);
> int i;
>
> - object_initialize(&s->cpu, sizeof(s->cpu), "arm1136-" TYPE_ARM_CPU);
> + object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
> + ARM_CPU_TYPE_NAME("arm1136"),
> + &error_abort, NULL);
>
> sysbus_init_child_obj(obj, "avic", &s->avic, sizeof(s->avic),
> TYPE_IMX_AVIC);
> --
> 2.20.1
Really the ARM_CPU_TYPE_NAME part of this change should be
in patch 1 I think...
Could you expand the commit message a little to explain why
we want to make the CPU a child of the SoC object?
thanks
-- PMM
- [Qemu-arm] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child(), Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH 1/6] hw/arm: Use ARM_CPU_TYPE_NAME() macro when appropriate, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH 2/6] hw/arm: Use object_initialize_child for correct reference counting, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH 4/6] hw/arm/fsl-imx: Add the cpu as child of the SoC object, Philippe Mathieu-Daudé, 2019/07/01
- Re: [Qemu-arm] [PATCH 4/6] hw/arm/fsl-imx: Add the cpu as child of the SoC object,
Peter Maydell <=
- [Qemu-arm] [PATCH 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH 5/6] hw/dma/xilinx_axi: Use object_initialize_child for correct ref. counting, Philippe Mathieu-Daudé, 2019/07/01
- [Qemu-arm] [PATCH 6/6] hw/net/xilinx_axi: Use object_initialize_child for correct ref. counting, Philippe Mathieu-Daudé, 2019/07/01
- Re: [Qemu-arm] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child(), Philippe Mathieu-Daudé, 2019/07/01
- Re: [Qemu-arm] [Qemu-devel] [PATCH 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child(), no-reply, 2019/07/01