From patchwork Mon Jun 10 06:21:03 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: 802992 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp1799884wro; Sun, 9 Jun 2024 23:24:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVtXUtu1jAp+PK4dFFqoNtIwg71EAtuDk5onU/hwA4Y6luYKD1I1yKoNm2pRc0MEiBmIdCWSV4FydJlfw3jRVeT X-Google-Smtp-Source: AGHT+IGl2Q9D5BsYBWjk/ctmjbjhOumPW6fg0J1ev1lagzui37HsEAM2eAZNySl4MB2BMGxe5TWg X-Received: by 2002:a05:6102:54a3:b0:48c:5447:762 with SMTP id ada2fe7eead31-48c54471043mr2374774137.10.1718000669716; Sun, 09 Jun 2024 23:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718000669; cv=none; d=google.com; s=arc-20160816; b=uLia5zw7lqBW+1bNzEA8rbz3yI1ucaU0/I0QuYZfv0fZ1LMfMmtuXytPBAhZmEAZlX LJ1WPI5665WJZ0LFFFpXmeILundJdxEmXBF98XtN6LmHYlVzuMyCRckwKfdr8/MJHHcn uLbypM7Xy5w4lgG3QuCpQWT5IE+srizTrDHm+n7miqnFvpc0KjudbQQBWLHOXbf0Cd19 IYd6eDbo/Sa65UKJaMxqFhkf9E0bGL7zKTsJvz9DVqDov1FpDsV+g83PkX/kqTAEBXRB 8F+sZ6IK5YQHjoxAre5SPipBvEnDjGIMKrGw3OgKrW5ks88L5QdZmvFxJEpfYDyGJnxR Z41w== 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=BYilv7Qw7hhLPwOWxXzn16HBO3Z9l6H4QsXbLEJ0kt4=; fh=hC5FiRCNiggiG2AJlogWERqCtylTs4whX75JZ3qP4Qc=; b=QgHrMMWVdvXLXzcFuMsM8Wbg0+2uSOIQuBHDE632YR+diidGh9a7ydXFdL7dYbgPDA 8u1KV5IwVJCULVFQXRHDPVpn0/hVG8ZQmNy7qUKUmLczm6OpFuDtLOS50ZC8HShGNaXe IbkWKz6ZEszdlZYg8LhKsy5IUOSSWn9M7yvcJ9dxKL9ZxwTj5UcglmVY0p0vDZCZamqI IwU7ZFS2QX0pTlx6XiIY0GPT/V7Axv/dQVmIsAW3DECokZZr2wIE1+phyuxZUzw3IPMP CtNeM7+uBfGQ+oBVn2MXnZCQqLg2AmxoddplHkzSf0+RDJfvbescvIoNEYVw5iiZAw5X 60MQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eP4kWX8Y; 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 af79cd13be357-7953284e764si683631585a.110.2024.06.09.23.24.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jun 2024 23:24:29 -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=eP4kWX8Y; 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 1sGYRf-00049X-Pm; Mon, 10 Jun 2024 02:23:55 -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 1sGYRe-0003zO-K9 for qemu-devel@nongnu.org; Mon, 10 Jun 2024 02:23:54 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGYRc-0004ps-Lw for qemu-devel@nongnu.org; Mon, 10 Jun 2024 02:23:54 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-421b9068274so5264165e9.1 for ; Sun, 09 Jun 2024 23:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718000631; x=1718605431; 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=BYilv7Qw7hhLPwOWxXzn16HBO3Z9l6H4QsXbLEJ0kt4=; b=eP4kWX8Y9Qlb56BlFMvfXKlFq6nW/zJc6LoTZpJA7vURfiBCfYN1uxl+A0fZQ79qbx +hxeI8kt39fk+kEXjihdeBt7vm99SAxCEFCOd8xollQHx1DOJxLq86WiIwTd271RFimU SRAHJnEce5ydT8f/fVShN6hIgDCg1TOQ6lzZ8CXdQHzkwxvgyhKqycX8Yzlf7ixmmkwO ntIT0pn72fYcMT/FDvkne34aazjeXxM3PmPMQ8zrj2UyJ8MdTEO/i5etSSgKeIrr+GMk wNqWsbpyHeYUq+d+2YEV4jzr3bALtFDv25LNBleHaq22Cin1IPTGRDWLR19OXClbBoTj Dmzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718000631; x=1718605431; 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=BYilv7Qw7hhLPwOWxXzn16HBO3Z9l6H4QsXbLEJ0kt4=; b=m0QNVTeIy3cnwkvMgsBX3w6I1n7yUh07NKkdw/ySMNmu2Spy8DZMArhb8KZUQE7CjS LGJS4MJtsyGoKxk1fwkAaZPECQT/Ge4wjs8Aq4Fz+jb9sGPzPrCofX/C5bWBsTD5KRtW QuOzuv5Rc5eMjU8GOy09Wz1ufNwaFDnoGfJpSregw7a8hYB5mquVZK0dx3BgLHldMF9y jam6xnaER/FxhGqZf3NgZpaLM5EgflUVrziJerzAKm/tdYlpT+9Q5HLwK7qo7NnfdK6D 4zLV6DScOKGixRXjbZhrcW4Is/OLD1tOCNiwBfVI7tGtz3d0J+/OM/bZOJvtY0CVd32U vocA== X-Gm-Message-State: AOJu0YwkaoEai85oDXPXRKeZJJKtKKCI00fxXZ6BX1YEqkA89dH8o7YT j50Jx/k62u/ASJoLk6swYQZiZyGfeg3BbtQShtsvm136C+mCUaipqKeC8jTo2xgA22RUXmv2x1r Z X-Received: by 2002:a05:600c:4f07:b0:421:6cb5:c914 with SMTP id 5b1f17b1804b1-4216cb5cb49mr59850335e9.37.1718000609739; Sun, 09 Jun 2024 23:23:29 -0700 (PDT) Received: from m1x-phil.lan ([176.176.129.242]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215c1aa1desm131072945e9.11.2024.06.09.23.23.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Jun 2024 23:23:29 -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 25/26] hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_info_child() Date: Mon, 10 Jun 2024 08:21:03 +0200 Message-ID: <20240610062105.49848-26-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::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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/ppc/pnv.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 5b9dbff754..9039c1777a 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -789,18 +789,14 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon) static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) { - Monitor *mon = opaque; + GString *buf = opaque; PnvPHB *phb = (PnvPHB *) object_dynamic_cast(child, TYPE_PNV_PHB); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; if (!phb) { return 0; } pnv_phb4_pic_print_info(PNV_PHB4(phb->backend), buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); return 0; } @@ -813,12 +809,11 @@ static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon) pnv_xive_pic_print_info(&chip9->xive, buf); pnv_psi_pic_print_info(&chip9->psi, buf); + object_child_foreach_recursive(OBJECT(chip), + pnv_chip_power9_pic_print_info_child, buf); info = human_readable_text_from_str(buf); monitor_puts(mon, info->human_readable_text); - - object_child_foreach_recursive(OBJECT(chip), - pnv_chip_power9_pic_print_info_child, mon); } static uint64_t pnv_chip_power8_xscom_core_base(PnvChip *chip, @@ -865,13 +860,12 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon) g_autoptr(HumanReadableText) info = NULL; pnv_xive2_pic_print_info(&chip10->xive, buf); - pnv_psi_pic_print_info(&chip10->psi, buf); + object_child_foreach_recursive(OBJECT(chip), + pnv_chip_power9_pic_print_info_child, buf); + info = human_readable_text_from_str(buf); monitor_puts(mon, info->human_readable_text); - - object_child_foreach_recursive(OBJECT(chip), - pnv_chip_power9_pic_print_info_child, mon); } /* Always give the first 1GB to chip 0 else we won't boot */