From patchwork Fri Jun 12 11:37:27 2020 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: 1308122 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 49jzHt3Qnmz9sSy for ; Fri, 12 Jun 2020 21:38:18 +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 49jzHs6J54zDqx1 for ; Fri, 12 Jun 2020 21:38:17 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kaod.org (client-ip=46.105.58.226; helo=3.mo2.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 Received: from 3.mo2.mail-out.ovh.net (3.mo2.mail-out.ovh.net [46.105.58.226]) (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 49jzHm3p1wzDqwg for ; Fri, 12 Jun 2020 21:38:12 +1000 (AEST) Received: from player771.ha.ovh.net (unknown [10.110.103.199]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id 02AAE1D759B for ; Fri, 12 Jun 2020 13:38:07 +0200 (CEST) Received: from kaod.org (82-64-250-170.subs.proxad.net [82.64.250.170]) (Authenticated sender: clg@kaod.org) by player771.ha.ovh.net (Postfix) with ESMTPSA id 49E2C1363DAED; Fri, 12 Jun 2020 11:38:03 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G002134e8569-9672-4081-915f-c968f9315b95,EB3F143BCCF81B35F467F76D3EA0524591534A17) smtp.auth=clg@kaod.org From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: skiboot@lists.ozlabs.org Date: Fri, 12 Jun 2020 13:37:27 +0200 Message-Id: <20200612113732.374240-7-clg@kaod.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200612113732.374240-1-clg@kaod.org> References: <20200612113732.374240-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 7574773099725884377 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudeiuddggeegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepveorughrihgtucfnvgcuifhorghtvghruceotghlgheskhgrohgurdhorhhgqeenucggtffrrghtthgvrhhnpefgieetvdefudeghedvveejudeihfeiteffjeetjeeukefhgffgvedugedugedugfenucfkpheptddrtddrtddrtddpkedvrdeigedrvdehtddrudejtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejjedurdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhrtghpthhtohepshhkihgsohhotheslhhishhtshdrohiilhgrsghsrdhorhhg Subject: [Skiboot] [PATCH v2 06/11] xive/p9: Introduce XIVE_EQ_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" Each EQ descriptor is associated with a pair of ESB pages. The even page controls the ESn PQ bits and the odd page controls the ESe PQ bits. Reviewed-by: Gustavo Romero Signed-off-by: Cédric Le Goater --- hw/xive.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xive.c b/hw/xive.c index 3e7b87fdfd17..a106bd593052 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -100,7 +100,6 @@ /* Use 64K for everything by default */ #define IC_PAGE_SIZE 0x10000 #define TM_PAGE_SIZE 0x10000 -#define EQ_ESB_SHIFT (16 + 1) /* VC BAR contains set translations for the ESBs and the EQs. * @@ -182,6 +181,8 @@ #define EQ_PER_PAGE (0x10000 / 32) // Use sizeof ? #define IND_EQ_TABLE_SIZE ((XIVE_EQ_COUNT / EQ_PER_PAGE) * 8) +#define XIVE_EQ_SHIFT (16 + 1) /* ESn + ESe pages */ + /* Number of priorities (and thus EQDs) we allocate for each VP */ #define NUM_INT_PRIORITIES 8 @@ -2676,7 +2677,7 @@ static struct xive *init_one_xive(struct dt_node *np) /* Register escalation sources */ __xive_register_source(x, &x->esc_irqs, MAKE_ESCALATION_GIRQ(x->block_id, 0), - XIVE_EQ_COUNT, EQ_ESB_SHIFT, + XIVE_EQ_COUNT, XIVE_EQ_SHIFT, x->eq_mmio, XIVE_SRC_EOI_PAGE1, false, NULL, NULL);