On Fri, May 15, 2026 at 5:10 PM Philippe Mathieu-Daudé
<[email protected]> wrote:
>
> Now than Raspi machines can be filtered when running a
> qemu-system-arm or qemu-system-aarch64 binary, we can
> remove the TARGET_AARCH64 #ifdef'ry and compile the
> aspeed.c file once, moving it from arm_ss[] source set
> to arm_common_ss[]. Note, we expose the TYPE_BCM2837
> and TYPE_BCM2838 types to qemu-system-arm, but they are
> not user-creatable, so not an issue.
>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
> Reviewed-by: Pierrick Bouvier <[email protected]>
> Reviewed-by: Richard Henderson <[email protected]>
> ---

Reviewed-by: Manos Pitsidianakis <[email protected]>

>  hw/arm/bcm2836.c   | 4 ----
>  hw/arm/raspi.c     | 4 ----
>  hw/arm/meson.build | 8 ++++++--
>  3 files changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
> index 03825e69d06..f4ecea908bd 100644
> --- a/hw/arm/bcm2836.c
> +++ b/hw/arm/bcm2836.c
> @@ -195,7 +195,6 @@ static void bcm2836_class_init(ObjectClass *oc, const 
> void *data)
>      dc->realize = bcm2836_realize;
>  };
>
> -#ifdef TARGET_AARCH64
>  static void bcm2837_class_init(ObjectClass *oc, const void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(oc);
> @@ -208,7 +207,6 @@ static void bcm2837_class_init(ObjectClass *oc, const 
> void *data)
>      bc->clusterid = 0x0;
>      dc->realize = bcm2836_realize;
>  };
> -#endif
>
>  static const TypeInfo bcm283x_types[] = {
>      {
> @@ -219,12 +217,10 @@ static const TypeInfo bcm283x_types[] = {
>          .name           = TYPE_BCM2836,
>          .parent         = TYPE_BCM283X,
>          .class_init     = bcm2836_class_init,
> -#ifdef TARGET_AARCH64
>      }, {
>          .name           = TYPE_BCM2837,
>          .parent         = TYPE_BCM283X,
>          .class_init     = bcm2837_class_init,
> -#endif
>      }, {
>          .name           = TYPE_BCM283X,
>          .parent         = TYPE_BCM283X_BASE,
> diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
> index 00e4a10466a..3f99e87428c 100644
> --- a/hw/arm/raspi.c
> +++ b/hw/arm/raspi.c
> @@ -367,7 +367,6 @@ static void raspi2b_machine_class_init(ObjectClass *oc, 
> const void *data)
>      raspi_machine_class_init(mc, rmc->board_rev);
>  };
>
> -#ifdef TARGET_AARCH64
>  static void raspi3ap_machine_class_init(ObjectClass *oc, const void *data)
>  {
>      MachineClass *mc = MACHINE_CLASS(oc);
> @@ -387,7 +386,6 @@ static void raspi3b_machine_class_init(ObjectClass *oc, 
> const void *data)
>      rmc->board_rev = 0xa02082;
>      raspi_machine_class_init(mc, rmc->board_rev);
>  };
> -#endif /* TARGET_AARCH64 */
>
>  static const TypeInfo raspi_machine_types[] = {
>      {
> @@ -405,7 +403,6 @@ static const TypeInfo raspi_machine_types[] = {
>          .parent         = TYPE_RASPI_MACHINE,
>          .class_init     = raspi2b_machine_class_init,
>          .interfaces     = arm_machine_interfaces,
> -#ifdef TARGET_AARCH64
>      }, {
>          .name           = MACHINE_TYPE_NAME("raspi3ap"),
>          .parent         = TYPE_RASPI_MACHINE,
> @@ -416,7 +413,6 @@ static const TypeInfo raspi_machine_types[] = {
>          .parent         = TYPE_RASPI_MACHINE,
>          .class_init     = raspi3b_machine_class_init,
>          .interfaces     = aarch64_machine_interfaces,
> -#endif
>      }, {
>          .name           = TYPE_RASPI_MACHINE,
>          .parent         = TYPE_RASPI_BASE_MACHINE,
> diff --git a/hw/arm/meson.build b/hw/arm/meson.build
> index 80068f70bb9..144e4827660 100644
> --- a/hw/arm/meson.build
> +++ b/hw/arm/meson.build
> @@ -27,8 +27,12 @@ arm_common_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: 
> files('allwinner-a10.c'
>  arm_common_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: 
> files('allwinner-h3.c', 'orangepi.c'))
>  arm_common_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: 
> files('allwinner-r40.c', 'bananapi_m2u.c'))
>  arm_common_ss.add(when: 'CONFIG_MAX78000_SOC', if_true: 
> files('max78000_soc.c'))
> -arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c'))
> -arm_common_ss.add(when: ['CONFIG_RASPI', 'TARGET_AARCH64'], if_true: 
> files('bcm2838.c', 'raspi4b.c'))
> +arm_common_ss.add(when: 'CONFIG_RASPI', if_true: files(
> +  'bcm2836.c',
> +  'bcm2838.c',
> +  'raspi.c',
> +  'raspi4b.c'
> +))
>  arm_common_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: 
> files('stm32f100_soc.c'))
>  arm_common_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: 
> files('stm32f205_soc.c'))
>  arm_common_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: 
> files('stm32f405_soc.c'))
> --
> 2.53.0
>

Reply via email to