[Pdbg] [PATCH v2 05/22] libpdbg: Support paths including virutal nodes
Alistair Popple
alistair at popple.id.au
Mon Sep 23 11:49:42 AEST 2019
Reviewed-by: Alistair Popple <alistair at popple.id.au>
On Friday, 20 September 2019 3:16:34 PM AEST Amitay Isaacs wrote:
> With the presence of virtual nodes, some of the nodes can be reached
> from the root using different paths:
>
> - using virtual nodes (which provide the system device tree view)
> - using the actual hwunits present in the backend (backend device tree)
>
> Both device tree paths should result in the same hardware unit.
>
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
> libpdbg/device.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libpdbg/device.c b/libpdbg/device.c
> index 6e2e7bb..cba4475 100644
> --- a/libpdbg/device.c
> +++ b/libpdbg/device.c
> @@ -294,7 +294,10 @@ static struct pdbg_target *dt_find_by_path(struct pdbg_target *root, const char
> if (pal && (pal != nal || strncmp(pa, na, pal)))
> match = false;
> if (match) {
> - root = n;
> + if (!n->compatible && n->vnode)
> + root = n->vnode;
> + else
> + root = n;
> break;
> }
> }
>
More information about the Pdbg
mailing list