From patchwork Mon Nov 11 05:44:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1192756 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 47BKgl2v2Kz9sPj for ; Mon, 11 Nov 2019 16:49:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S9oTMzuC"; 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 47BKgk6JW7zF3XP for ; Mon, 11 Nov 2019 16:49:06 +1100 (AEDT) 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=gmail.com (client-ip=2607:f8b0:4864:20::443; helo=mail-pf1-x443.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S9oTMzuC"; dkim-atps=neutral Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (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 47BKc6058gzF4f6 for ; Mon, 11 Nov 2019 16:45:57 +1100 (AEDT) Received: by mail-pf1-x443.google.com with SMTP id d13so9932153pfq.2 for ; Sun, 10 Nov 2019 21:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hYbQFHru7iabzbIQu5hwV2w/asLJ6mMLC9gbV7GksN4=; b=S9oTMzuCvyo0w1Sm4tlzzF7TXvHb8EvdSSB7+8EXMwMU3K14VqwAahnw258Ne/8FML cklphM4azAE75MXBuXyhlnNbTegOPpwKKxvkPXkYV4v+95Ehn5rolLdqiDphwJn+HIos wa/g5o+ZyO80PX3PU524JohY1P5Dz3pibxgI/r7w0lSRxGyecpr8xNGsJXHT8GZMToVa 8auNFuNn2tS1PDl83EDth1BQuzKPJWI26oBxZ/P3Gdo6AqaZzlyTOyukh3ZBjrYHKgcR 4A9FutpBQ7CJ1fTvDLGOeZQrWFZkVriNMQ4/fBCWqFREE31yRvPkva8zXUOLp4L4u0rX UZOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hYbQFHru7iabzbIQu5hwV2w/asLJ6mMLC9gbV7GksN4=; b=VZyCIb5NdXPKuXIDZp3DReAgtQcnM0ih8uNIYaSiEzm5r8ts558yBzHOa2rSzaUqXE aNlBu0RiqBJHh//eJp+8+DIjEGIQQfJYdNBGIHTqVVp50376LbJlxT3FkSS3E/ZznMES GLg8R23AvRam3hMwqAtjqKu1YuLOqif/IwmPUtDEF50BKwsqJ65NqZSqa60AL0OBH3k+ 76tbpCpkJjqmGNKhn5Uf97rrvJ19YCP/QWx2R7Ehvs7E44exMPX91pYSRAvXEVwqsdY4 AFU4IwjbaIR0qn4TGguWkWMuZVYm+XB1+a6CqlGZCT53qYzRxUoIY/RhVTGF8j0fq3MM mjvg== X-Gm-Message-State: APjAAAWepUU0UFnysnjIhTo+cJhhXPFsXgvDldJnrc3Nu3vlXptD3Q6I SZIlSSiNohGe6yXv1wkvLfBN2tVp X-Google-Smtp-Source: APXvYqwDhZoAodaG6joBx+TDPxp43Hjru+1AMnxdsS2BPJhb4CLs6avhusktkywwPdXpfC+UHGfQIg== X-Received: by 2002:a17:90a:1f0c:: with SMTP id u12mr31038317pja.22.1573451155615; Sun, 10 Nov 2019 21:45:55 -0800 (PST) Received: from bobo.local0.net (193-116-100-125.tpgi.com.au. [193.116.100.125]) by smtp.gmail.com with ESMTPSA id x29sm15044638pfj.131.2019.11.10.21.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2019 21:45:55 -0800 (PST) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Mon, 11 Nov 2019 15:44:43 +1000 Message-Id: <20191111054448.6989-5-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191111054448.6989-1-npiggin@gmail.com> References: <20191111054448.6989-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 4/9] xive/p9: use predefined bitmasks to manipulate EQ addresses 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 catches one more case missed by commit 2354857fca. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/xive.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xive.c b/hw/xive.c index bf2983306..324b8d052 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -802,8 +802,9 @@ static void xive_init_emu_eq(uint32_t vp_blk, uint32_t vp_idx, memset(eq, 0, sizeof(struct xive_eq)); eq->w1 = EQ_W1_GENERATION; - eq->w3 = ((uint64_t)backing_page) & 0xffffffff; - eq->w2 = (((uint64_t)backing_page)) >> 32 & 0x0fffffff; + eq->w3 = ((uint64_t)backing_page) & EQ_W3_OP_DESC_LO; + eq->w2 = (((uint64_t)backing_page) >> 32) & EQ_W2_OP_DESC_HI; + eq->w6 = SETFIELD(EQ_W6_NVT_BLOCK, 0ul, vp_blk) | SETFIELD(EQ_W6_NVT_INDEX, 0ul, vp_idx); eq->w7 = SETFIELD(EQ_W7_F0_PRIORITY, 0ul, prio);