[RFC v2 1/4] hw: vmapple: include missing headers

Mohamed Mediouni posted 4 patches 1 month, 1 week ago
Maintainers: Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Mads Ynddal <mads@ynddal.dk>, Alexander Graf <agraf@csgraf.de>, Peter Maydell <peter.maydell@linaro.org>
[RFC v2 1/4] hw: vmapple: include missing headers
Posted by Mohamed Mediouni 1 month, 1 week ago
Disablement by default led to:

../hw/vmapple/vmapple.c:276:39: error: use of undeclared identifier 'GTIMER_VIRT'
  276 |         qdev_connect_gpio_out(cpudev, GTIMER_VIRT,
      |                                       ^
../hw/vmapple/vmapple.c:479:54: error: use of undeclared identifier 'QEMU_PSCI_CONDUIT_HVC'
  479 |         object_property_set_int(cpu, "psci-conduit", QEMU_PSCI_CONDUIT_HVC,
      |                                                      ^
../hw/vmapple/vmapple.c:556:13: error: call to undeclared function 'arm_build_mp_affinity'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  556 |             arm_build_mp_affinity(n, GICV3_TARGETLIST_BITS);
      |             ^
3 errors generated.

pretty quickly.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
---
 hw/vmapple/vmapple.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/vmapple/vmapple.c b/hw/vmapple/vmapple.c
index 16e6110b68..5928df4411 100644
--- a/hw/vmapple/vmapple.c
+++ b/hw/vmapple/vmapple.c
@@ -51,6 +51,8 @@
 #include "system/reset.h"
 #include "system/runstate.h"
 #include "system/system.h"
+#include "gtimer.h"
+#include "cpu.h"
 
 struct VMAppleMachineState {
     MachineState parent;
-- 
2.50.1 (Apple Git-155)
Re: [RFC v2 1/4] hw: vmapple: include missing headers
Posted by Philippe Mathieu-Daudé 1 month ago
On 7/10/25 22:31, Mohamed Mediouni wrote:
> Disablement by default led to:
> 
> ../hw/vmapple/vmapple.c:276:39: error: use of undeclared identifier 'GTIMER_VIRT'
>    276 |         qdev_connect_gpio_out(cpudev, GTIMER_VIRT,
>        |                                       ^
> ../hw/vmapple/vmapple.c:479:54: error: use of undeclared identifier 'QEMU_PSCI_CONDUIT_HVC'
>    479 |         object_property_set_int(cpu, "psci-conduit", QEMU_PSCI_CONDUIT_HVC,
>        |                                                      ^
> ../hw/vmapple/vmapple.c:556:13: error: call to undeclared function 'arm_build_mp_affinity'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>    556 |             arm_build_mp_affinity(n, GICV3_TARGETLIST_BITS);
>        |             ^
> 3 errors generated.
> 
> pretty quickly.
> 
> Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
> ---
>   hw/vmapple/vmapple.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/vmapple/vmapple.c b/hw/vmapple/vmapple.c
> index 16e6110b68..5928df4411 100644
> --- a/hw/vmapple/vmapple.c
> +++ b/hw/vmapple/vmapple.c
> @@ -51,6 +51,8 @@
>   #include "system/reset.h"
>   #include "system/runstate.h"
>   #include "system/system.h"
> +#include "gtimer.h"
> +#include "cpu.h"

Queued using instead:

#include "target/arm/gtimer.h"
#include "target/arm/cpu.h"

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [RFC v2 1/4] hw: vmapple: include missing headers
Posted by Alexander Graf 1 month, 1 week ago
On 07.10.25 22:31, Mohamed Mediouni wrote:
> Disablement by default led to:
>
> ../hw/vmapple/vmapple.c:276:39: error: use of undeclared identifier 'GTIMER_VIRT'
>    276 |         qdev_connect_gpio_out(cpudev, GTIMER_VIRT,
>        |                                       ^
> ../hw/vmapple/vmapple.c:479:54: error: use of undeclared identifier 'QEMU_PSCI_CONDUIT_HVC'
>    479 |         object_property_set_int(cpu, "psci-conduit", QEMU_PSCI_CONDUIT_HVC,
>        |                                                      ^
> ../hw/vmapple/vmapple.c:556:13: error: call to undeclared function 'arm_build_mp_affinity'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>    556 |             arm_build_mp_affinity(n, GICV3_TARGETLIST_BITS);
>        |             ^
> 3 errors generated.
>
> pretty quickly.
>
> Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>


This patch should be stand alone and not RFC.

Alex


> ---
>   hw/vmapple/vmapple.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/hw/vmapple/vmapple.c b/hw/vmapple/vmapple.c
> index 16e6110b68..5928df4411 100644
> --- a/hw/vmapple/vmapple.c
> +++ b/hw/vmapple/vmapple.c
> @@ -51,6 +51,8 @@
>   #include "system/reset.h"
>   #include "system/runstate.h"
>   #include "system/system.h"
> +#include "gtimer.h"
> +#include "cpu.h"
>   
>   struct VMAppleMachineState {
>       MachineState parent;