|
| 1 | +From 4bde2c46a979ba1539c05ffa6d4fc22ab6a2a9c2 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Stephanos Ioannidis < [email protected]> |
| 3 | +Date: Wed, 8 Jan 2020 17:47:05 +0900 |
| 4 | +Subject: [PATCH] Revert "target/arm: Revert back to YIELD for WFI" |
| 5 | + |
| 6 | +This reverts commit 5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16. |
| 7 | + |
| 8 | +The commit 5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16 was probably |
| 9 | +introduced in order to improve emulation performance, as well as to |
| 10 | +address the stability issue when running co-simulations (refer to the |
| 11 | +commit 708639f72be2a9425992ae9dc4b9a098dc804c94). |
| 12 | + |
| 13 | +This, unfortunately, breaks the WFI instruction; i.e. CPU is not halted |
| 14 | +and keeps running regardless of whether an interrupt occurs, and this |
| 15 | +is a problem for the Zephyr CI tests that expect the WFI instruction to |
| 16 | +do its job (in particular, tests/kernel/context is broken because of |
| 17 | +this change). |
| 18 | + |
| 19 | +Signed-off-by: Stephanos Ioannidis < [email protected]> |
| 20 | +--- |
| 21 | + target/arm/op_helper.c | 2 +- |
| 22 | + 1 file changed, 1 insertion(+), 1 deletion(-) |
| 23 | + |
| 24 | +diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c |
| 25 | +index acef79251d..6ab3a75a76 100644 |
| 26 | +--- a/target/arm/op_helper.c |
| 27 | ++++ b/target/arm/op_helper.c |
| 28 | +@@ -304,7 +304,7 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len) |
| 29 | + } |
| 30 | + |
| 31 | + qemu_mutex_lock_iothread(); |
| 32 | +- if (use_icount || 1) { |
| 33 | ++ if (use_icount) { |
| 34 | + cs->exception_index = EXCP_YIELD; |
| 35 | + } else { |
| 36 | + cs->halted = 1; |
| 37 | +-- |
| 38 | +2.17.1 |
| 39 | + |
0 commit comments