On 10/29/26 11:13, Alex Bennée wrote:
HALT_WFE will always be cleared when leaving halt via
arm_cpu_leaving_halt so we don't need to worry about atomic games in
the asynchronous timer callback. Furthermore, a WFET timeout or
event-stream expiration is not an event that sets the event register;
doing so causes a subsequent WFE to wake up immediately.

As we only need CPUState to call cpu_interrupt we can also simplify
the user data and avoid needless casting to get to it.

Suggested-by: Paolo Bonzini<[email protected]>
Fixes: 01b223f895a7 ("target/arm: enable WFE sleeping for A-profile")
Signed-off-by: Alex Bennée<[email protected]>
---
  target/arm/cpu.c | 20 +++-----------------
  1 file changed, 3 insertions(+), 17 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to