@@ -300,6 +300,12 @@ static int p8_ram_setup(struct thread *thread)
* quiesced */
dt_for_each_compatible(&chip->target, target, "ibm,power8-thread") {
struct thread *tmp;
+
+ /* If this thread wasn't enabled it may not yet have been probed
+ so do that now. This will also update the thread status */
+ if (pdbg_target_probe(target) != PDBG_TARGET_ENABLED)
+ return 1;
+
tmp = target_to_thread(target);
if (!(get_thread_status(tmp).quiesced))
return 1;
@@ -227,7 +227,9 @@ static int p9_ram_setup(struct thread *thread)
/* If this thread wasn't enabled it may not yet have been probed
so do that now. This will also update the thread status */
- p9_thread_probe(target);
+ if (pdbg_target_probe(target) != PDBG_TARGET_ENABLED)
+ goto out_fail;
+
tmp = target_to_thread(target);
if (!(tmp->status.quiesced))
goto out_fail;
p9chip.c called the probe function directly. Better to call pdbg_target_probe() so that any intermediate targets can also be probed. p8chip.c didn't probe the threads at all prior to use, so do that. Signed-off-by: Alistair Popple <alistair@popple.id.au> --- libpdbg/p8chip.c | 6 ++++++ libpdbg/p9chip.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-)