[Pdbg] [PATCH v4 01/30] libpdbg: Do not assume device tree hierarchy

Amitay Isaacs amitay at ozlabs.org
Thu Oct 3 14:18:40 AEST 2019


Always get the parent of required class explicitly.

Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 libpdbg/p9chip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index f86a529..37cc93b 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -80,14 +80,14 @@
 
 static uint64_t thread_read(struct thread *thread, uint64_t addr, uint64_t *data)
 {
-	struct pdbg_target *chip = require_target_parent(&thread->target);
+	struct pdbg_target *chip = pdbg_target_require_parent("core", &thread->target);
 
 	return pib_read(chip, addr, data);
 }
 
 static uint64_t thread_write(struct thread *thread, uint64_t addr, uint64_t data)
 {
-	struct pdbg_target *chip = require_target_parent(&thread->target);
+	struct pdbg_target *chip = pdbg_target_require_parent("core", &thread->target);
 
 	return pib_write(chip, addr, data);
 }
-- 
2.21.0



More information about the Pdbg mailing list