diff mbox series

[13/19] libpdbg: Use index as thread-id for p9 system

Message ID 20200702033918.708013-14-amitay@ozlabs.org
State Accepted
Headers show
Series Fixes and cleanup before release | expand

Commit Message

Amitay Isaacs July 2, 2020, 3:39 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/p9chip.c  | 4 +---
 libpdbg/sbefifo.c | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index a46d053..0a8cae8 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -116,10 +116,8 @@  static struct thread_state p9_get_thread_status(struct thread *thread)
 static int p9_thread_probe(struct pdbg_target *target)
 {
 	struct thread *thread = target_to_thread(target);
-	uint32_t tid;
 
-	assert(!pdbg_target_u32_property(target, "tid", &tid));
-	thread->id = tid;
+	thread->id = pdbg_target_index(target);
 	thread->status = p9_get_thread_status(thread);
 
 	return 0;
diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
index e9cb63e..898fd1a 100644
--- a/libpdbg/sbefifo.c
+++ b/libpdbg/sbefifo.c
@@ -288,10 +288,8 @@  static int sbefifo_pib_thread_sreset(struct pib *pib)
 static int sbefifo_thread_probe(struct pdbg_target *target)
 {
 	struct thread *thread = target_to_thread(target);
-	uint32_t tid;
 
-	assert(!pdbg_target_u32_property(target, "tid", &tid));
-	thread->id = tid;
+	thread->id = pdbg_target_index(target);
 
 	return 0;
 }