From patchwork Thu Mar 12 01:25:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Popple X-Patchwork-Id: 1253327 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 48dB391HH3z9sST for ; Thu, 12 Mar 2020 12:25:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48dB37721czDqMC for ; Thu, 12 Mar 2020 12:25:23 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48dB316ZYgzDqHH for ; Thu, 12 Mar 2020 12:25:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au 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 ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48dB313n58z9sSL; Thu, 12 Mar 2020 12:25:17 +1100 (AEDT) From: Alistair Popple To: pdbg@lists.ozlabs.org Date: Thu, 12 Mar 2020 12:25:06 +1100 Message-Id: <20200312012507.9052-2-alistair@popple.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312012507.9052-1-alistair@popple.id.au> References: <20200312012507.9052-1-alistair@popple.id.au> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 2/3] p9_fapi_targets: Make P9 chiplet address translation match FAPI 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: , Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" This patch makes the P9 chiplet address translation match the rest of the translation for FAPI targets. Signed-off-by: Alistair Popple --- libpdbg/p9_fapi_targets.c | 6 +++--- p9.dts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c index 9ff35d9..d38ecdb 100644 --- a/libpdbg/p9_fapi_targets.c +++ b/libpdbg/p9_fapi_targets.c @@ -690,9 +690,9 @@ static int p9_chiplet_probe(struct pdbg_target *target) return 0; } -static uint64_t p9_chiplet_translate(struct pdbg_target *target, uint64_t addr) +static uint64_t p9_chiplet_translate(struct chiplet *chiplet, uint64_t addr) { - return (addr & 0xffffffffc0ffffffULL) + pdbg_target_address(target, NULL); + return set_chiplet_id(addr, pdbg_target_index(t(chiplet))); } static struct chiplet p9_chiplet = { @@ -701,7 +701,7 @@ static struct chiplet p9_chiplet = { .compatible = "ibm,power9-chiplet", .class = "chiplet", .probe = p9_chiplet_probe, - .translate = p9_chiplet_translate, + .translate = translate_cast(p9_chiplet_translate), }, .getring = p9_chiplet_getring, }; diff --git a/p9.dts b/p9.dts index 8a35d75..1051e3e 100644 --- a/p9.dts +++ b/p9.dts @@ -281,7 +281,7 @@ index = < 0x20 >; reg = < 0x00 0x20000000 0xfffff >; - core@0 { + s0_n0_p0_eq0_ex0_c0: core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; compatible = "ibm,power9-core"; @@ -3004,3 +3004,5 @@ }; }; }; + +/include/ "p9-attributes.dts"