diff mbox series

hw/arm/raspi: Don't bother setting default_cpu_type

Message ID 20180420155547.9497-1-peter.maydell@linaro.org
State New
Headers show
Series hw/arm/raspi: Don't bother setting default_cpu_type | expand

Commit Message

Peter Maydell April 20, 2018, 3:55 p.m. UTC
In commit 210f47840dd62, we changed the bcm2836 SoC object to
always create a CPU of the correct type for that SoC model. This
makes the default_cpu_type settings in the MachineClass structs
for the raspi2 and raspi3 boards redundant. We didn't change
those at the time because it would have meant a temporary
regression in a corner case of error handling if the user
requested a non-existing CPU type. The -cpu parse handling
changes in 2278b93941d42c3 mean that it no longer implicitly
depends on default_cpu_type for this to work, so we can now
delete the redundant default_cpu_type fields.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Tidying up a loose end from the raspi changes I did last month...

 hw/arm/raspi.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Philippe Mathieu-Daudé April 20, 2018, 6:55 p.m. UTC | #1
On 04/20/2018 12:55 PM, Peter Maydell wrote:
> In commit 210f47840dd62, we changed the bcm2836 SoC object to
> always create a CPU of the correct type for that SoC model. This
> makes the default_cpu_type settings in the MachineClass structs
> for the raspi2 and raspi3 boards redundant. We didn't change
> those at the time because it would have meant a temporary
> regression in a corner case of error handling if the user
> requested a non-existing CPU type. The -cpu parse handling
> changes in 2278b93941d42c3 mean that it no longer implicitly
> depends on default_cpu_type for this to work, so we can now
> delete the redundant default_cpu_type fields.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
> Tidying up a loose end from the raspi changes I did last month...
> 
>  hw/arm/raspi.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
> index 955a7c4e80..66899c28dc 100644
> --- a/hw/arm/raspi.c
> +++ b/hw/arm/raspi.c
> @@ -226,7 +226,6 @@ static void raspi2_machine_init(MachineClass *mc)
>      mc->no_parallel = 1;
>      mc->no_floppy = 1;
>      mc->no_cdrom = 1;
> -    mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a7");
>      mc->max_cpus = BCM283X_NCPUS;
>      mc->min_cpus = BCM283X_NCPUS;
>      mc->default_cpus = BCM283X_NCPUS;
> @@ -249,7 +248,6 @@ static void raspi3_machine_init(MachineClass *mc)
>      mc->no_parallel = 1;
>      mc->no_floppy = 1;
>      mc->no_cdrom = 1;
> -    mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a53");
>      mc->max_cpus = BCM283X_NCPUS;
>      mc->min_cpus = BCM283X_NCPUS;
>      mc->default_cpus = BCM283X_NCPUS;
>
diff mbox series

Patch

diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 955a7c4e80..66899c28dc 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -226,7 +226,6 @@  static void raspi2_machine_init(MachineClass *mc)
     mc->no_parallel = 1;
     mc->no_floppy = 1;
     mc->no_cdrom = 1;
-    mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a7");
     mc->max_cpus = BCM283X_NCPUS;
     mc->min_cpus = BCM283X_NCPUS;
     mc->default_cpus = BCM283X_NCPUS;
@@ -249,7 +248,6 @@  static void raspi3_machine_init(MachineClass *mc)
     mc->no_parallel = 1;
     mc->no_floppy = 1;
     mc->no_cdrom = 1;
-    mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a53");
     mc->max_cpus = BCM283X_NCPUS;
     mc->min_cpus = BCM283X_NCPUS;
     mc->default_cpus = BCM283X_NCPUS;