From patchwork Thu Sep 12 17:22:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 1161704 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 46TmPb3PTBz9s7T for ; Fri, 13 Sep 2019 03:45:07 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kaod.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46TmPb1pC9zDrRh for ; Fri, 13 Sep 2019 03:45:07 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=kaod.org (client-ip=87.98.173.103; helo=5.mo5.mail-out.ovh.net; envelope-from=clg@kaod.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kaod.org X-Greylist: delayed 319 seconds by postgrey-1.36 at bilbo; Fri, 13 Sep 2019 03:28:42 AEST Received: from 5.mo5.mail-out.ovh.net (5.mo5.mail-out.ovh.net [87.98.173.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46Tm2f5R1WzF4mX for ; Fri, 13 Sep 2019 03:28:41 +1000 (AEST) Received: from player735.ha.ovh.net (unknown [10.108.35.185]) by mo5.mail-out.ovh.net (Postfix) with ESMTP id 52C6124DEE6 for ; Thu, 12 Sep 2019 19:23:18 +0200 (CEST) Received: from kaod.org (lfbn-1-2240-157.w90-76.abo.wanadoo.fr [90.76.60.157]) (Authenticated sender: clg@kaod.org) by player735.ha.ovh.net (Postfix) with ESMTPSA id E0B709C37991; Thu, 12 Sep 2019 17:23:14 +0000 (UTC) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: skiboot@lists.ozlabs.org Date: Thu, 12 Sep 2019 19:22:15 +0200 Message-Id: <20190912172218.23335-15-clg@kaod.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190912172218.23335-1-clg@kaod.org> References: <20190912172218.23335-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9153003293596683225 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrtdehgdduudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Subject: [Skiboot] [PATCH v2 14/17] xive/p9: introduce NVT_SHIFT X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This defines the size of our VP space. Signed-off-by: Cédric Le Goater --- hw/xive.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/xive.c b/hw/xive.c index 6572a45f57be..8c92a612a5fa 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -189,7 +189,10 @@ * * XXX Adjust that based on BAR value ? */ -#define MAX_VP_ORDER 19 /* 512k */ + +#define NVT_SHIFT 19 /* in sync with EQ_W6_NVT_INDEX */ + +#define MAX_VP_ORDER NVT_SHIFT /* 512k */ #define MAX_VP_COUNT (1ul << MAX_VP_ORDER) #define VP_PER_PAGE (0x10000 / 64) // Use sizeof ? #define IND_VP_TABLE_SIZE ((MAX_VP_COUNT / VP_PER_PAGE) * 8) @@ -4042,7 +4045,7 @@ static int64_t opal_xive_get_vp_info(uint64_t vp_id, } if (out_cam_value) - *out_cam_value = (blk << 19) | idx; + *out_cam_value = (blk << NVT_SHIFT) | idx; if (out_report_cl_pair) { *out_report_cl_pair = ((uint64_t)(vp->w6 & 0x0fffffff)) << 32;