[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] hw/arm: Use ARM_CPU_TYPE_NAME() macro when
From: |
Alistair Francis |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] hw/arm: Use ARM_CPU_TYPE_NAME() macro when appropriate |
Date: |
Mon, 1 Jul 2019 09:36:17 -0700 |
On Mon, Jul 1, 2019 at 5:37 AM Philippe Mathieu-Daudé <address@hidden> wrote:
>
> Commit ba1ba5cca introduce the ARM_CPU_TYPE_NAME() macro.
> Unify the code base by use it in all places.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Alistair
> ---
> hw/arm/allwinner-a10.c | 3 ++-
> hw/arm/cubieboard.c | 3 ++-
> hw/arm/digic.c | 3 ++-
> hw/arm/fsl-imx6.c | 3 ++-
> hw/arm/fsl-imx6ul.c | 3 ++-
> hw/arm/xlnx-zynqmp.c | 8 ++++----
> 6 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
> index 35e906ca54..49d4d76686 100644
> --- a/hw/arm/allwinner-a10.c
> +++ b/hw/arm/allwinner-a10.c
> @@ -28,7 +28,8 @@ static void aw_a10_init(Object *obj)
> AwA10State *s = AW_A10(obj);
>
> object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
> - "cortex-a8-" TYPE_ARM_CPU, &error_abort, NULL);
> + ARM_CPU_TYPE_NAME("cortex-a8"),
> + &error_abort, NULL);
>
> sysbus_init_child_obj(obj, "intc", &s->intc, sizeof(s->intc),
> TYPE_AW_A10_PIC);
> diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
> index f7c8a5985a..a4d3d7a6a0 100644
> --- a/hw/arm/cubieboard.c
> +++ b/hw/arm/cubieboard.c
> @@ -80,7 +80,8 @@ static void cubieboard_init(MachineState *machine)
>
> static void cubieboard_machine_init(MachineClass *mc)
> {
> - mc->desc = "cubietech cubieboard";
> + mc->desc = "cubietech cubieboard (Cortex-A9)";
> + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
> mc->init = cubieboard_init;
> mc->block_default_type = IF_IDE;
> mc->units_per_default_bus = 1;
> diff --git a/hw/arm/digic.c b/hw/arm/digic.c
> index 9015b60c23..05db06be5e 100644
> --- a/hw/arm/digic.c
> +++ b/hw/arm/digic.c
> @@ -36,7 +36,8 @@ static void digic_init(Object *obj)
> int i;
>
> object_initialize_child(obj, "cpu", &s->cpu, sizeof(s->cpu),
> - "arm946-" TYPE_ARM_CPU, &error_abort, NULL);
> + ARM_CPU_TYPE_NAME("arm946"),
> + &error_abort, NULL);
>
> for (i = 0; i < DIGIC4_NB_TIMERS; i++) {
> #define DIGIC_TIMER_NAME_MLEN 11
> diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c
> index 7129517378..9b259c54b3 100644
> --- a/hw/arm/fsl-imx6.c
> +++ b/hw/arm/fsl-imx6.c
> @@ -40,7 +40,8 @@ static void fsl_imx6_init(Object *obj)
> for (i = 0; i < MIN(smp_cpus, FSL_IMX6_NUM_CPUS); i++) {
> snprintf(name, NAME_SIZE, "cpu%d", i);
> object_initialize_child(obj, name, &s->cpu[i], sizeof(s->cpu[i]),
> - "cortex-a9-" TYPE_ARM_CPU, &error_abort,
> NULL);
> + ARM_CPU_TYPE_NAME("cortex-a9"),
> + &error_abort, NULL);
> }
>
> sysbus_init_child_obj(obj, "a9mpcore", &s->a9mpcore, sizeof(s->a9mpcore),
> diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c
> index 05505bac56..1cbd8674bf 100644
> --- a/hw/arm/fsl-imx6ul.c
> +++ b/hw/arm/fsl-imx6ul.c
> @@ -35,7 +35,8 @@ static void fsl_imx6ul_init(Object *obj)
> for (i = 0; i < MIN(smp_cpus, FSL_IMX6UL_NUM_CPUS); i++) {
> snprintf(name, NAME_SIZE, "cpu%d", i);
> object_initialize_child(obj, name, &s->cpu[i], sizeof(s->cpu[i]),
> - "cortex-a7-" TYPE_ARM_CPU, &error_abort,
> NULL);
> + ARM_CPU_TYPE_NAME("cortex-a7"),
> + &error_abort, NULL);
> }
>
> /*
> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
> index a1ca9b5adf..2acd032df6 100644
> --- a/hw/arm/xlnx-zynqmp.c
> +++ b/hw/arm/xlnx-zynqmp.c
> @@ -193,8 +193,8 @@ static void xlnx_zynqmp_create_rpu(XlnxZynqMPState *s,
> const char *boot_cpu,
>
> object_initialize_child(OBJECT(&s->rpu_cluster), "rpu-cpu[*]",
> &s->rpu_cpu[i], sizeof(s->rpu_cpu[i]),
> - "cortex-r5f-" TYPE_ARM_CPU, &error_abort,
> - NULL);
> + ARM_CPU_TYPE_NAME("cortex-r5f"),
> + &error_abort, NULL);
>
> name = object_get_canonical_path_component(OBJECT(&s->rpu_cpu[i]));
> if (strcmp(name, boot_cpu)) {
> @@ -233,8 +233,8 @@ static void xlnx_zynqmp_init(Object *obj)
> for (i = 0; i < num_apus; i++) {
> object_initialize_child(OBJECT(&s->apu_cluster), "apu-cpu[*]",
> &s->apu_cpu[i], sizeof(s->apu_cpu[i]),
> - "cortex-a53-" TYPE_ARM_CPU, &error_abort,
> - NULL);
> + ARM_CPU_TYPE_NAME("cortex-a53"),
> + &error_abort, NULL);
> }
>
> sysbus_init_child_obj(obj, "gic", &s->gic, sizeof(s->gic),
> --
> 2.20.1
>
>