From: OpenOCD-Gerrit <ope...@us...> - 2022-05-14 08:58:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 99293ebd15bd2980fa4cb9e161f0069092741a55 (commit) from a47d1f1b795e037fafd16667d0056364159c7623 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 99293ebd15bd2980fa4cb9e161f0069092741a55 Author: Antonio Borneo <bor...@gm...> Date: Mon Apr 25 22:25:08 2022 +0200 aarch64: don't wait for smp targets halted in deassert reset The function target_type::deassert_reset() is called for every target after reset is deasserted. If the target fails to get halted, we log a warning and issue a halt request for the target itself. Current code calls the generic target_halt() that: - extends the halt to all the targets in the SMP node; - waits for targets to halt. This breaks the logic of running target_type::deassert_reset() per target. Plus, waiting for targets to halt delays the call of target_type::deassert_reset() for the next targets. Replace the call to target_halt() with the aarch64 specific function to halt the single target. Pass the parameter HALT_LAZY to prevent the wait for target halted. Similar solution is already implemented for cortex_a. Change-Id: I446dc03cb91524c6d388db485bc2388177af77b6 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/6947 Tested-by: jenkins diff --git a/src/target/aarch64.c b/src/target/aarch64.c index d8a9664d7..ecd93248c 100644 --- a/src/target/aarch64.c +++ b/src/target/aarch64.c @@ -2026,9 +2026,13 @@ static int aarch64_deassert_reset(struct target *target) if (target->state != TARGET_HALTED) { LOG_WARNING("%s: ran after reset and before halt ...", target_name(target)); - retval = target_halt(target); - if (retval != ERROR_OK) - return retval; + if (target_was_examined(target)) { + retval = aarch64_halt_one(target, HALT_LAZY); + if (retval != ERROR_OK) + return retval; + } else { + target->state = TARGET_UNKNOWN; + } } } ----------------------------------------------------------------------- Summary of changes: src/target/aarch64.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) hooks/post-receive -- Main OpenOCD repository |