From nobody Fri Oct 18 08:36:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1721952683; cv=none; d=zohomail.com; s=zohoarc; b=HCtVI+9KryGjAEx6Dr5z4mw13P9MFON0vYugcgENRgY6dQ+yxC+Nm+rcNlXDtKksfDWKAVYxjyod8t4DxsYzA3df5cPIYDltT07ZE/34vbwxULiBm9Vst/Z8TW6Fla+A//XkVTpVpaLl47Cy6hg40H8LbtsLcKfgEuHTg8zONEc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721952683; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Dhji2tzCt7V0bCKi9OaRajRAvFKebIz+tSdljnjixRU=; b=dg9lrG+33BYoEb+iwT8/vVPYYuHwYdFFKuyI8+wTlg5K/menBU9DVU7hoVspqHS4i6+sCOHZlhpSJJ6grlNuCpqdQEzvhtTHlLd6eecl38fav17UFxq+gPVkk6F1GOHv2I32mBOjjGkRfn6mGO9BmJhFnfRHohhYNmSizUMpz8c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1721952683005366.3031917012173; Thu, 25 Jul 2024 17:11:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sX8L4-000253-EU; Thu, 25 Jul 2024 19:57:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sX8Kv-0001Vz-9J; Thu, 25 Jul 2024 19:57:30 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sX8Ks-0001Oc-Ti; Thu, 25 Jul 2024 19:57:28 -0400 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7163489149eso336034a12.1; Thu, 25 Jul 2024 16:57:26 -0700 (PDT) Received: from wheely.local0.net ([203.220.44.216]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cf28c7fef3sm2142060a91.16.2024.07.25.16.57.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jul 2024 16:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721951845; x=1722556645; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dhji2tzCt7V0bCKi9OaRajRAvFKebIz+tSdljnjixRU=; b=jLiyRsLduOdXP3dJjt0zF8vNdw629j+PHpJUHEmu4FrtMCjTny/DBIDlgIUOosV41k WG67WnI2XqG3szsBjhI/itFaMOWvRkQYNgS2cpEGs+y+/QpDOJJjiIRt/KAg/xye518C vP+hQiqbydTz1FJLzlAxdDxQbZyDsRgz7CmaR3u9ZiROmgv+Wimw2eyp1Kxz87drlA3z AaxnGdKULyHcxzfLfjwHsOMZngbcgYghttD44puM8TaP/T1u7K/gP1BesSul4LVBeLUx UDEoondmwPyyoryeB7PqCAqAeWZqRnqF930Al1xCb7m7tm3nBgqldTGVYX7zBeOzRv/U xTMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721951845; x=1722556645; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dhji2tzCt7V0bCKi9OaRajRAvFKebIz+tSdljnjixRU=; b=JzOguyCcNAqhYZbNU691ESPOnrn5zGD71IrRba7/T40HhhzAZtLnOLMuQItQuBHMvR b9u138qkK2DkemEqctT4M73bocxk8PdbACKd6tJRbVkIq9wvXRwfuu45jBGY4xXSGY/x KUyD26l8qbZlCGKz2hP6SNeTTY7+Wpge5UmfZrKFU6+RVNp2P1hwI4TS/39GlTgF9USU nXglVohmjKqkj80E6qICCx8+RHK49NQojX9ixueWnWWp6vjQeBPeCl4GHbATAAlio3wJ GFJrWmhBU5JvQTZ+C3wxhyE1C32B/feW6EMvLU/5cG8OhcqpkMBJ9c3DX8Uu4FhUs8yT H2Lw== X-Forwarded-Encrypted: i=1; AJvYcCUeqdJtxqPHPsNqTfEhC9tcgNfQJNSKdKEbrs7Td/eTCMrtX+I46XkTf1SIhAU4lcRePuwteEZ6Jz3NdEBabrW5u73v X-Gm-Message-State: AOJu0YzKwQg3EgttDSGlIw+j6MCn4j4xirVfDgKNK315LIwtZJ3ryHeM FQJJVmXebHj3ReyoK4oWfNIsa+1V2mewMOOw5IEWl3h+izU45Nq48Ok44Q== X-Google-Smtp-Source: AGHT+IExY5WcUiBmtdbK40DSFUFaomZ5d9Kwz63bcUdSLW1s6pt2v4c0YeC4cONdYnrSfTunCNHOHw== X-Received: by 2002:a17:90a:b704:b0:2cb:4f14:2a70 with SMTP id 98e67ed59e1d1-2cf2eb6b180mr3763254a91.30.1721951844440; Thu, 25 Jul 2024 16:57:24 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Frederic Barrat , Michael Kowal , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 50/96] pnv/xive2: Move xive2_nvp_pic_print_info() to xive2.c Date: Fri, 26 Jul 2024 09:53:23 +1000 Message-ID: <20240725235410.451624-51-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240725235410.451624-1-npiggin@gmail.com> References: <20240725235410.451624-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=npiggin@gmail.com; helo=mail-pg1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1721952684683116600 From: Frederic Barrat Moving xive2_nvp_pic_print_info() to align with the other "pic_print_info" functions. Signed-off-by: Frederic Barrat Signed-off-by: Michael Kowal Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/pnv_xive2.c | 27 --------------------------- hw/intc/xive2.c | 26 ++++++++++++++++++++++++++ include/hw/ppc/xive2_regs.h | 2 ++ 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 9fbd44f974..78609105a8 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -2436,33 +2436,6 @@ static void pnv_xive2_register_types(void) =20 type_init(pnv_xive2_register_types) =20 -static void xive2_nvp_pic_print_info(Xive2Nvp *nvp, uint32_t nvp_idx, - GString *buf) -{ - uint8_t eq_blk =3D xive_get_field32(NVP2_W5_VP_END_BLOCK, nvp->w5); - uint32_t eq_idx =3D xive_get_field32(NVP2_W5_VP_END_INDEX, nvp->w5); - - if (!xive2_nvp_is_valid(nvp)) { - return; - } - - g_string_append_printf(buf, " %08x end:%02x/%04x IPB:%02x", - nvp_idx, eq_blk, eq_idx, - xive_get_field32(NVP2_W2_IPB, nvp->w2)); - /* - * When the NVP is HW controlled, more fields are updated - */ - if (xive2_nvp_is_hw(nvp)) { - g_string_append_printf(buf, " CPPR:%02x", - xive_get_field32(NVP2_W2_CPPR, nvp->w2)); - if (xive2_nvp_is_co(nvp)) { - g_string_append_printf(buf, " CO:%04x", - xive_get_field32(NVP2_W1_CO_THRID, nvp-= >w1)); - } - } - g_string_append_c(buf, '\n'); -} - /* * If the table is direct, we can compute the number of PQ entries * provisioned by FW. diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c index 3e7238c663..ac914b3d1c 100644 --- a/hw/intc/xive2.c +++ b/hw/intc/xive2.c @@ -137,6 +137,32 @@ void xive2_end_eas_pic_print_info(Xive2End *end, uint3= 2_t end_idx, (uint32_t) xive_get_field64(EAS2_END_DATA, eas-= >w)); } =20 +void xive2_nvp_pic_print_info(Xive2Nvp *nvp, uint32_t nvp_idx, GString *bu= f) +{ + uint8_t eq_blk =3D xive_get_field32(NVP2_W5_VP_END_BLOCK, nvp->w5); + uint32_t eq_idx =3D xive_get_field32(NVP2_W5_VP_END_INDEX, nvp->w5); + + if (!xive2_nvp_is_valid(nvp)) { + return; + } + + g_string_append_printf(buf, " %08x end:%02x/%04x IPB:%02x", + nvp_idx, eq_blk, eq_idx, + xive_get_field32(NVP2_W2_IPB, nvp->w2)); + /* + * When the NVP is HW controlled, more fields are updated + */ + if (xive2_nvp_is_hw(nvp)) { + g_string_append_printf(buf, " CPPR:%02x", + xive_get_field32(NVP2_W2_CPPR, nvp->w2)); + if (xive2_nvp_is_co(nvp)) { + g_string_append_printf(buf, " CO:%04x", + xive_get_field32(NVP2_W1_CO_THRID, nvp-= >w1)); + } + } + g_string_append_c(buf, '\n'); +} + static void xive2_end_enqueue(Xive2End *end, uint32_t data) { uint64_t qaddr_base =3D xive2_end_qaddr(end); diff --git a/include/hw/ppc/xive2_regs.h b/include/hw/ppc/xive2_regs.h index 4e5e17cd89..ec5d6ec2d6 100644 --- a/include/hw/ppc/xive2_regs.h +++ b/include/hw/ppc/xive2_regs.h @@ -194,6 +194,8 @@ static inline uint32_t xive2_nvp_blk(uint32_t cam_line) return (cam_line >> XIVE2_NVP_SHIFT) & 0xf; } =20 +void xive2_nvp_pic_print_info(Xive2Nvp *nvp, uint32_t nvp_idx, GString *bu= f); + /* * Notification Virtual Group or Crowd (NVG/NVC) */ --=20 2.45.2