diff mbox series

[v3,04/22] libpdbg: Add virtual node target

Message ID 20190923084841.18057-5-amitay@ozlabs.org
State Superseded
Headers show
Series Add system device tree to libpdbg | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (8a10a05c89db666bf98734139334166da7c370a4)
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master

Commit Message

Amitay Isaacs Sept. 23, 2019, 8:48 a.m. UTC
This is used to construct system device tree representation.

Currently there are multiple device trees for a system (e.g. P9) based
on the backend where it's used.  This means one cannot refer to a hwunit
by specific path which is independent of backend.

System device tree is a system representation that allows to identify
hwunits uniquely by device tree path.  However, the backend device
trees are still separate.  To avoid keeping two different device trees
(system device tree and backend device tree) in memory, a system device
tree view is created on top of the backend device tree.  This system
device tree view is created using virtual nodes.  A virtual nodes
denotes the attachment point for a hw-unit in a system device tree view.
With multiple virtual nodes a system device tree view is overlaid on
top of the backend device tree.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
---
 libpdbg/target.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libpdbg/target.h b/libpdbg/target.h
index 2ecbf98..7e08ac3 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -50,6 +50,7 @@  struct pdbg_target {
 	bool probed;
 	struct list_node class_link;
 	void *priv;
+	struct pdbg_target *vnode;
 };
 
 struct pdbg_target *require_target_parent(struct pdbg_target *target);