From patchwork Mon Jun 10 06:20:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 802978 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp1799517wro; Sun, 9 Jun 2024 23:23:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVsX+5nZ/y5QxcqNtNHV9Pg9aAlcKErRztGQvkdnfNyE/Afk1YVIm0VaqEL8srrwf/Ipzdoy9zIytU9ZYDgHO3Y X-Google-Smtp-Source: AGHT+IEbs77+iI2iTts3R0o/LECbviriXXWpMBIuC76wpmcKAxWdgU9BC6zL67ca9Ugfo5Tvy466 X-Received: by 2002:ac8:5f89:0:b0:43d:f946:faed with SMTP id d75a77b69052e-44041b6b8f0mr124672031cf.26.1718000580734; Sun, 09 Jun 2024 23:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718000580; cv=none; d=google.com; s=arc-20160816; b=IsEWM1e2gqooI4Va01tGLAYpD4mp8fZroVyTjeUtILRE80mGv7CSdf+lNJrul068BY lSL2syyXyrmeTBdHkkidbqXB2YamfRJzfSxl0eEFc+6rtSC3fjOVg4s4Stmw32faDa+x KF/K9iulNtEQXuKJA2kLc8YTqvniBZY9Q+++ASr2qF+v09FWqDoVWGoG+PU6q2z5c+b0 kzrHvIsX3EUgKonSLuLh8WlHD/ZovrHHgvHngWR+TAz31cucTNak7sUUPwNnJFf3uNCA G04NSShylw2ncTQEZs4DsuDOZL7HuU3tfM9lk6CZvU+VN2vCZZm0/fZKttVA9LvzZ0xx RW1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i1X43X3u1MNBxinpMUxBqMIlo7Li/da4jfz1xla7hBs=; fh=hC5FiRCNiggiG2AJlogWERqCtylTs4whX75JZ3qP4Qc=; b=eVs/Cfw7b0OZx2eLCHlxTkG21aSUtO2TJncYyxMMgljL97QPJy6HInb4csHyUv9u6J lLbFIohhmqDjnhTBZJ7+TEritf5nci2u2iRu1VZjr6tEdzxX9+OdfeilCHM4i3Hy5Iav /zlhR5kk5N3JRxECEfypIEvd4kyAGo9zWrv58MYvFjh23gis1voyAXP+0sX0do87QfPy mSS2N/duEYuFuno7p8aZ1593WdBInr2J5WwtcL0TPqDg+sIL0cn8Q7OQH1oqww8i5CXd D/t7neFC8VZomB7WSBZTF+2m9Pgv+8V7QXrA3Ir9DHpoXF1qIu5IpKG5N29IdGTHw+uq 0WLA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ukfSLDMw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-440605dc3cbsi34851611cf.625.2024.06.09.23.23.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jun 2024 23:23:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ukfSLDMw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGYQc-0004mG-VT; Mon, 10 Jun 2024 02:22:51 -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 1sGYQL-0004BT-UC for qemu-devel@nongnu.org; Mon, 10 Jun 2024 02:22:35 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGYQJ-0004Zb-47 for qemu-devel@nongnu.org; Mon, 10 Jun 2024 02:22:33 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-35f1a7386d5so1021837f8f.3 for ; Sun, 09 Jun 2024 23:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718000548; x=1718605348; 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=i1X43X3u1MNBxinpMUxBqMIlo7Li/da4jfz1xla7hBs=; b=ukfSLDMw7I0TYktrQ3H7XYQNb28ArGlld5E5baKOH9ruGsgIKmAoc7SRBGvJo4GwG0 q4bBBC9F3sAEu8n6Yoo6JR5avZHj1uSwiEQWr1MtxR26Az7GPk2G+mAOfUm8UYzb+1c5 64+Z/p/ejJsK1fMT1Rw1MKK77II/ZJlHLlXrfj/11JxFjo28WokqxR8Yc9sLfv1la+6g kti0y0GZNR4VZHsW1HoiJcZv8xQFoSreWMi7n/7K7ydmwa3htYh0eYZoGvzndCY/+Fc3 k7doD9ERtAf5pbM21wvPHc0MUcU5FZMnLMi2MX4pUlqegsAfThnaFruwK9+sUKb9mgu0 0mZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718000548; x=1718605348; 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=i1X43X3u1MNBxinpMUxBqMIlo7Li/da4jfz1xla7hBs=; b=HI31tSkEmWqSIaxNs7Nn3RwHAH4xy6YLBm6oN9fIkzfJbKUIJDSlaAotZ1dn1pQpDm y2z4f0PUBcSGbaHFe9Int1JE5cDSWlQa9QUwyFBKW+vIrjU92Re5Njrd+gGG79e/1X19 y8lrf9rVIJYd7hhxfFxXdMPOIhEwGk6K4yPDfOWi6LPQdXeLO2GU33yFe7fzNNdL53UJ G8EXcEllQu6HpEB9yz/xPDOQFRihmyQHAO4R3/+i2RQUc/ULKHY0NslpZpI4cnLcA4y4 pSnd54DYhEiOvw+Hib5D4sQLVESIGtfGVnA2fli99tOX4MOvGYrjkDQ3XpBPAFuyAjj9 vtdA== X-Gm-Message-State: AOJu0YwrATAMLdlDUIfZWO/+rr7CdthS+fbvTXoV0rvBIURF82WJcdcr kd6QGt8oihRZI//9MK6Lr+gqRjMjINeemMcdu2pWF7HKB1y0HJD4nyDd0FXF9RGzTTs8DYH5Qmw 5 X-Received: by 2002:a5d:5009:0:b0:35f:1176:ae72 with SMTP id ffacd0b85a97d-35f1176af9cmr2634603f8f.6.1718000547771; Sun, 09 Jun 2024 23:22:27 -0700 (PDT) Received: from m1x-phil.lan ([176.176.129.242]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35f223dfce9sm2549837f8f.21.2024.06.09.23.22.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Jun 2024 23:22:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , qemu-ppc@nongnu.org, Nicholas Piggin , =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , David Gibson , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 14/26] hw/ppc: Avoid using Monitor in xive_nvt_pic_print_info() Date: Mon, 10 Jun 2024 08:20:52 +0200 Message-ID: <20240610062105.49848-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240610062105.49848-1-philmd@linaro.org> References: <20240610062105.49848-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/pnv_xive.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index a0c6dee5db..3ad4ac8e7d 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -1832,7 +1832,7 @@ static const MemoryRegionOps pnv_xive_pc_ops = { }; static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx, - Monitor *mon) + GString *buf) { uint8_t eq_blk = xive_get_field32(NVT_W1_EQ_BLOCK, nvt->w1); uint32_t eq_idx = xive_get_field32(NVT_W1_EQ_INDEX, nvt->w1); @@ -1841,9 +1841,9 @@ static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx, return; } - monitor_printf(mon, " %08x end:%02x/%04x IPB:%02x\n", nvt_idx, - eq_blk, eq_idx, - xive_get_field32(NVT_W4_IPB, nvt->w4)); + g_string_append_printf(buf, " %08x end:%02x/%04x IPB:%02x\n", + nvt_idx, eq_blk, eq_idx, + xive_get_field32(NVT_W4_IPB, nvt->w4)); } void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) @@ -1888,17 +1888,18 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) while (!xive_router_get_end(xrtr, blk, i, &end)) { xive_end_eas_pic_print_info(&end, i++, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "XIVE[%x] #%d NVTT %08x .. %08x\n", chip_id, blk, - 0, XIVE_NVT_COUNT - 1); + g_string_append_printf(buf, "XIVE[%x] #%d NVTT %08x .. %08x\n", + chip_id, blk, 0, XIVE_NVT_COUNT - 1); xive_nvt_per_subpage = pnv_xive_vst_per_subpage(xive, VST_TSEL_VPDT); for (i = 0; i < XIVE_NVT_COUNT; i += xive_nvt_per_subpage) { while (!xive_router_get_nvt(xrtr, blk, i, &nvt)) { - xive_nvt_pic_print_info(&nvt, i++, mon); + xive_nvt_pic_print_info(&nvt, i++, buf); } } + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } static void pnv_xive_reset(void *dev)