diff mbox series

[v2,9/9] htm: Check threads !active instead of quiesced

Message ID 20211125004138.120917-10-jniethe5@gmail.com
State Accepted
Headers show
Series Add P10 HTM support | expand

Checks

Context Check Description
snowpatch_ozlabs/github-CI success Successfully ran 1 jobs.
snowpatch_ozlabs/github-build_and_test success Successfully ran 1 jobs.

Commit Message

Jordan Niethe Nov. 25, 2021, 12:41 a.m. UTC
The P10 thread_state quiesced status is
maint_mode && thread_quiesced && ict_empty
which is more than is needed for taking a core HTM trace.
Instead check the secondary threads are !active.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
---
 src/htm.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/src/htm.c b/src/htm.c
index f55f3753b083..613475c282df 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -230,6 +230,12 @@  static bool is_smt1(struct pdbg_target *target)
 	}
 
 	/* secondary thread */
+	if (pdbg_target_compatible(target, "ibm,power10-thread")) {
+		if (!thread_status(target).active)
+			return true;
+		goto fail;
+	}
+
 	if (thread_status(target).quiesced)
 		return true;