From patchwork Mon Oct 14 05:17:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1175955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46s6KV69Rwz9sPh for ; Mon, 14 Oct 2019 16:18:38 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="odrOyfuZ"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46s6KV4rsVzDqXJ for ; Mon, 14 Oct 2019 16:18:38 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46s6Jt4mP7zDqW5 for ; Mon, 14 Oct 2019 16:18:06 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="odrOyfuZ"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 46s6Jt0qq4z9sPj; Mon, 14 Oct 2019 16:18:06 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1571030286; bh=cgL+NYvETCN4wTkwi1jm06bRhZrvzNH9SBqJpgxzZxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=odrOyfuZghkNbjIsbqD6mp5e10e2yY/hc44v+KJj0OCYRMynIq1Xj+tUBQqsEdGWx S7t4pfjfHiE9AIAIYjjGhDA4Szc5wlWoFuCMlwqYtbAUXOqfp8qvWfnoy2wbG8KJ8k AvyEXn6d97U8M9IEcjpiQpwivcBevSkcAJF+OcNpZ0F9yx5hWF2IaV8m7HH0bhfRzv PVyqyO2twoUIP3NRLltVA06o+WG1YIDEAYmkc125II4mbSnbK7DyZF2dXfiE7Cp4ID zUdMnCg6EunY2EDQF1isCysX1Q/Vmf2ZhLmrTr71ZxkrkIINxBhrOKgzJagsD9w8dg Jbdu+uRp5Hqdg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Mon, 14 Oct 2019 16:17:24 +1100 Message-Id: <20191014051748.20190-7-amitay@ozlabs.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191014051748.20190-1-amitay@ozlabs.org> References: <20191014051748.20190-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 06/30] libpdbg: Add virtual node target X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" 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 Reviewed-by: Alistair Popple --- libpdbg/target.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libpdbg/target.h b/libpdbg/target.h index 4c24251..71ffd2f 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_class *find_target_class(const char *name);