From patchwork Wed Sep 13 03:37:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 813151 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xsS741P4pz9s7g for ; Wed, 13 Sep 2017 13:38:24 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xsS740Yw4zDrJh for ; Wed, 13 Sep 2017 13:38:24 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=benh@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xsS6S3mVdzDrJ5 for ; Wed, 13 Sep 2017 13:37:52 +1000 (AEST) Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v8D3bTOd017880; Tue, 12 Sep 2017 22:37:33 -0500 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Wed, 13 Sep 2017 13:37:26 +1000 Message-Id: <20170913033726.24171-2-benh@kernel.crashing.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170913033726.24171-1-benh@kernel.crashing.org> References: <20170913033726.24171-1-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH v3 2/2] xive: Fix opal_xive_dump_tm() to access W2 properly X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The HW only supported limited access sizes. Signed-off-by: Benjamin Herrenschmidt --- hw/xive.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/xive.c b/hw/xive.c index 21dd3d95..26edd669 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -4733,7 +4733,13 @@ static int64_t opal_xive_dump_tm(uint32_t offset, const char *n, uint32_t pir) xive_regr(x, PC_TCTXT_INDIR0); v0 = in_be64(ind_tm_base + offset); - v1 = in_be64(ind_tm_base + offset + 8); + if (offset == TM_QW3_HV_PHYS) { + v1 = in_8(ind_tm_base + offset + 8); + v1 <<= 56; + } else { + v1 = in_be32(ind_tm_base + offset + 8); + v1 <<= 32; + } prlog(PR_INFO, "CPU[%04x]: TM state for QW %s\n", pir, n); prlog(PR_INFO, "CPU[%04x]: NSR CPPR IPB LSMFB ACK# INC AGE PIPR" " W2 W3\n", pir);