diff mbox series

[v3,01/11] target/arm: Call arm*_cpu_do_interrupt directly instead of via TCGCPUOps

Message ID 20260902152044.31291-2-philmd@oss.qualcomm.com
State New
Headers show
Series accel/tcg: Push BQL down into per-target do_interrupt handlers | expand

Commit Message

Philippe Mathieu-Daudé Sept. 2, 2026, 3:20 p.m. UTC
The TCGCPUOps.do_interrupt handler is a target-specific
callback installed for use by target-agnostic TCG core methods.
Target-specific code should not dispatch through this indirection;
call the ARM implementation directly instead.

Reported-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
 target/arm/cpu-irq.c     | 2 +-
 target/arm/tcg/cpu-v7m.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Pierrick Bouvier Sept. 2, 2026, 7:52 p.m. UTC | #1
On 9/2/2026 8:20 AM, Philippe Mathieu-Daudé wrote:
> The TCGCPUOps.do_interrupt handler is a target-specific
> callback installed for use by target-agnostic TCG core methods.
> Target-specific code should not dispatch through this indirection;
> call the ARM implementation directly instead.
> 
> Reported-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> ---
>  target/arm/cpu-irq.c     | 2 +-
>  target/arm/tcg/cpu-v7m.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
diff mbox series

Patch

diff --git a/target/arm/cpu-irq.c b/target/arm/cpu-irq.c
index 883e8a176c3..e8a6520e5ca 100644
--- a/target/arm/cpu-irq.c
+++ b/target/arm/cpu-irq.c
@@ -270,7 +270,7 @@  bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
  found:
     cs->exception_index = excp_idx;
     env->exception.target_el = target_el;
-    cs->cc->tcg_ops->do_interrupt(cs);
+    arm_cpu_do_interrupt(cs);
     return true;
 }
 #endif /* CONFIG_TCG */
diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c
index 48b31d5eac8..502998dbd1c 100644
--- a/target/arm/tcg/cpu-v7m.c
+++ b/target/arm/tcg/cpu-v7m.c
@@ -34,7 +34,7 @@  static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
     if (interrupt_request & CPU_INTERRUPT_HARD
         && (armv7m_nvic_can_take_pending_exception(env->nvic))) {
         cs->exception_index = EXCP_IRQ;
-        cs->cc->tcg_ops->do_interrupt(cs);
+        arm_v7m_cpu_do_interrupt(cs);
         ret = true;
     }
     return ret;