[PATCH-for-8.0] target/arm: Restrict arm_cpu_exec_interrupt() to TCG accelerator

Philippe Mathieu-Daudé posted 1 patch 1 year, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221209110823.59495-1-philmd@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH-for-8.0] target/arm: Restrict arm_cpu_exec_interrupt() to TCG accelerator
Posted by Philippe Mathieu-Daudé 1 year, 4 months ago
When building with --disable-tcg on Darwin we get:

  target/arm/cpu.c:725:16: error: incomplete definition of type 'struct TCGCPUOps'
    cc->tcg_ops->do_interrupt(cs);
    ~~~~~~~~~~~^

Commit 083afd18a9 ("target/arm: Restrict cpu_exec_interrupt()
handler to sysemu") limited this block to system emulation,
but neglected to also limit it to TCG.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/arm/cpu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 38d066c294..0f55004d7e 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -528,7 +528,7 @@ static void arm_cpu_reset(DeviceState *dev)
     arm_rebuild_hflags(env);
 }
 
-#ifndef CONFIG_USER_ONLY
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
 
 static inline bool arm_excp_unmasked(CPUState *cs, unsigned int excp_idx,
                                      unsigned int target_el,
@@ -725,7 +725,8 @@ static bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
     cc->tcg_ops->do_interrupt(cs);
     return true;
 }
-#endif /* !CONFIG_USER_ONLY */
+
+#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
 
 void arm_cpu_update_virq(ARMCPU *cpu)
 {
-- 
2.38.1


Re: [PATCH-for-8.0] target/arm: Restrict arm_cpu_exec_interrupt() to TCG accelerator
Posted by Peter Maydell 1 year, 4 months ago
On Fri, 9 Dec 2022 at 11:08, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> When building with --disable-tcg on Darwin we get:
>
>   target/arm/cpu.c:725:16: error: incomplete definition of type 'struct TCGCPUOps'
>     cc->tcg_ops->do_interrupt(cs);
>     ~~~~~~~~~~~^
>
> Commit 083afd18a9 ("target/arm: Restrict cpu_exec_interrupt()
> handler to sysemu") limited this block to system emulation,
> but neglected to also limit it to TCG.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---

Applied to target-arm-for-8.0, thanks.

-- PMM
Re: [PATCH-for-8.0] target/arm: Restrict arm_cpu_exec_interrupt() to TCG accelerator
Posted by Fabiano Rosas 1 year, 4 months ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> When building with --disable-tcg on Darwin we get:
>
>   target/arm/cpu.c:725:16: error: incomplete definition of type 'struct TCGCPUOps'
>     cc->tcg_ops->do_interrupt(cs);
>     ~~~~~~~~~~~^
>
> Commit 083afd18a9 ("target/arm: Restrict cpu_exec_interrupt()
> handler to sysemu") limited this block to system emulation,
> but neglected to also limit it to TCG.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Fabiano Rosas <farosas@suse.de>