This is an automated email from Gerrit. "liangzhen <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9693
-- gerrit commit 0a275a97ba3c988256390c14f57750e2157f72a6 Author: Zane Leung <[email protected]> Date: Fri May 22 09:16:05 2026 +0800 target/riscv: skip redundant target polling in SMP groups When polling an SMP target, check if another target in the same SMP group has already been polled in this cycle. If so, skip redundant polling to improve performance in multi-core configurations. Change-Id: I921772e4e287597234b5a24063797c16f7e2d3a3 Signed-off-by: Zane Leung <[email protected]> diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 1e2b9caa35..d69450b1c8 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -4024,6 +4024,7 @@ int riscv_openocd_poll(struct target *target) struct riscv_info *i = riscv_info(target); struct list_head *targets; + struct target_list *entry; OOCD_LIST_HEAD(single_target_list); struct target_list single_target_entry = { @@ -4033,6 +4034,14 @@ int riscv_openocd_poll(struct target *target) if (target->smp) { targets = target->smp_targets; + foreach_smp_target(entry, targets) { + struct target *t = entry->target; + if (t != target) { + LOG_TARGET_DEBUG(target, "target already polled in smp group %d", target->smp); + return ERROR_OK; + } + break; + } } else { /* Make a list that just contains a single target, so we can * share code below. */ @@ -4045,7 +4054,6 @@ int riscv_openocd_poll(struct target *target) unsigned int halted = 0; unsigned int running = 0; unsigned int cause_groups = 0; - struct target_list *entry; foreach_smp_target(entry, targets) { struct target *t = entry->target; struct riscv_info *info = riscv_info(t); --
