summaryrefslogtreecommitdiffstats
path: root/src/htm.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-05-02 16:28:00 +1000
committerAlistair Popple <alistair@popple.id.au>2018-05-08 11:45:28 +1000
commitebba1d4e129f359b1bb8bcdec1c94f202d388b7a (patch)
tree0a8aeb7480da7ff2a312e265c255e8bc5aff24d2 /src/htm.c
parent15747dd503c063a1836bfb6b6964216df9f24dfb (diff)
downloadpdbg-ebba1d4e129f359b1bb8bcdec1c94f202d388b7a.tar.gz
pdbg-ebba1d4e129f359b1bb8bcdec1c94f202d388b7a.zip
libpdbg/p9chip.c: query thread active and stop states
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'src/htm.c')
-rw-r--r--src/htm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/htm.c b/src/htm.c
index 566687e..a7e7d06 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -322,6 +322,8 @@ int run_htm(int optind, int argc, char *argv[])
* This is as easy as checking that every single
* thread is "ACTIVE" and hasn't gone into any sleep
* state.
+ *
+ * On P9 it requires checking for THREAD_STATUS_STOP
*/
pdbg_for_each_class_target("thread", target) {
pdbg_target_probe(target);
@@ -329,7 +331,8 @@ int run_htm(int optind, int argc, char *argv[])
if (pdbg_target_status(target) == PDBG_TARGET_NONEXISTENT)
continue;
- if ((thread_status(target) & THREAD_STATUS_ACTIVE) != THREAD_STATUS_ACTIVE) {
+ if ((!(thread_status(target) & THREAD_STATUS_ACTIVE)) ||
+ (thread_status(target) & THREAD_STATUS_STOP)) {
fprintf(stderr, "It appears powersave is on 0x%" PRIx64 "%p\n", thread_status(target), target);
fprintf(stderr, "core HTM needs to run with powersave off\n");
fprintf(stderr, "Hint: put powersave=off on the kernel commandline\n");
OpenPOWER on IntegriCloud