From nobody Thu Nov 14 17:52:37 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=1708704274; cv=none; d=zohomail.com; s=zohoarc; b=NCRapb/4rgkPj10VULjBEtPo96fTZIoLXpS+W4NCVwqbXlpijJhNBc9Fa4nzjLnuvmy6f3J28iDIPoLp4m8OM1d9uGjPZK1ikA9YMUGd84HZBO7gG3VT28b1HsgxhKYZboNj/GhIWE85zdNtHza+708EVfr8SyHfWo7l0CqpJUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708704274; 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=BO+f3hPKeL5HSk7HpmCD/7SFZU9TBIYTsIyIXJfwhsQ=; b=EkEcJMKfRxk2KsrpEpYHu+yLpznynTNu9MbBWJkCL1rRwK2NC1ePDXgORYw87hLkTIcbwedd5YogfiJHuQk7VFZ1HuigenXbGxkzqIiYMFFjIIS/qamG08CcKWgKv2+h5nCpCNIg9DQMcDszAa97drzrs0jNL7OJNY5HzrHaP6k= 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 1708704274512597.6301122476857; Fri, 23 Feb 2024 08:04:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdY1f-0006Pz-KX; Fri, 23 Feb 2024 11:03:51 -0500 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 1rdXid-0005a5-A1; Fri, 23 Feb 2024 10:44:11 -0500 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdXia-0006FE-5P; Fri, 23 Feb 2024 10:44:11 -0500 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5dcc4076c13so820656a12.0; Fri, 23 Feb 2024 07:44:07 -0800 (PST) Received: from wheely.local0.net (220-235-194-103.tpgi.com.au. [220.235.194.103]) by smtp.gmail.com with ESMTPSA id h18-20020a170902f2d200b001d913992d8csm11808208plc.242.2024.02.23.07.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 07:44:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708703046; x=1709307846; 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=BO+f3hPKeL5HSk7HpmCD/7SFZU9TBIYTsIyIXJfwhsQ=; b=l7P2TXJWVa+kAXDw+z0HPgc0C/cpq1njmCeJ9drlB2VflZ6Nk9rp2Lw7UFuMByZqtO cvJIzUaqG4h0OOse/qVwapCIAUkHVy02YecW5Fbj5AVgEVLVSQ0H2C8U7zo2Ggu9JKa7 SI+gN5lq7H59Ygz5UUQAeRhScp+KmJoPd95MM3My+iPRwLM348ERHtsI8dRraETfm/Fo PAKHuqjPeUuh+19HZc/zR0CXCqVnkPmNFfRSk7mmou5gY+6qpEb7KpIJs6dGUOdN2Xo2 RoDmWkVtc2uuRatcJm12jvjrGSsDCAuuaJj1u46MFOkEqo94iwEQ8+gwRbhEf9B5aN+/ 8q3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708703046; x=1709307846; 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=BO+f3hPKeL5HSk7HpmCD/7SFZU9TBIYTsIyIXJfwhsQ=; b=v25YXhUXkdR8wFH55p3p+S6Qz7C4GDmb6jhzxl3huxdKHujV5j9B2EFczhD/AqS+wr 8mxgM+Y62+u6Imb5pVK2Ca9as4nkSokwBuzbhznsHL2+ioyMuEbdxRy67MPeWUNd7q6n 3InfRixEKSuvSrxNuPfE3ibR23/O8tolvKylbbXvZqIYuxIB9NsD8RQFBkkkf0jLPiOh tYBOdamCki8s3qlTsPq1NySDzjI2nXeD+iUfOMwAE3ohzucMx0CVmSohcoPt4YjxWDeV EaTsj+ejORolWoVmlRCNRsuwuQIm7dBgTPqXt50Mdk+pffSMHl93qQhPD5pHp+njklMI FMzw== X-Forwarded-Encrypted: i=1; AJvYcCXaVwSOIQ5+MdYcCuFQpeM+bTpAfv2vt61zIer+sIfkB8YXuRL+wEsphtNTvwXkMcIHI3O7unmZ4CAPsWXDPNicDGyO X-Gm-Message-State: AOJu0YzWBBVKPVd3FOBb+biXyNViKM5gBctvddanEc7FVAViAn85yRSa woNOhzmhnesd8Yv+7ZJd2a8ZSOO2UQkXZZswd82VQFjMeQwW7y7Dba2d9bio X-Google-Smtp-Source: AGHT+IEL1i3QVJX18FoUVcQrE2jBQoetHJ8mW5JEfNLw6YDOP/r2un/Glo8DgRfIMzQUGTsJZ4hKNQ== X-Received: by 2002:a17:902:ce91:b0:1d9:4106:b8b5 with SMTP id f17-20020a170902ce9100b001d94106b8b5mr178262plg.11.1708703045756; Fri, 23 Feb 2024 07:44:05 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 13/47] hw/ppc/spapr_hcall: Allow elision of softmmu_resize_hpt_prep Date: Sat, 24 Feb 2024 01:41:32 +1000 Message-ID: <20240223154211.1001692-14-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240223154211.1001692-1-npiggin@gmail.com> References: <20240223154211.1001692-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::530; envelope-from=npiggin@gmail.com; helo=mail-pg1-x530.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, T_SCC_BODY_TEXT_LINE=-0.01 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: 1708704275229100001 From: Philippe Mathieu-Daud=C3=A9 Check tcg_enabled() before calling softmmu_resize_hpt_prepare() and softmmu_resize_hpt_commit() to allow the compiler to elide their calls. The stubs are then unnecessary, remove them. Reviewed-by: Nicholas Piggin Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Nicholas Piggin --- hw/ppc/spapr_hcall.c | 12 ++++++++---- target/ppc/tcg-stub.c | 15 --------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index fcefd1d1c7..0d7d523e6d 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -123,9 +123,11 @@ static target_ulong h_resize_hpt_prepare(PowerPCCPU *c= pu, =20 if (kvm_enabled()) { return H_HARDWARE; + } else if (tcg_enabled()) { + return softmmu_resize_hpt_prepare(cpu, spapr, shift); + } else { + g_assert_not_reached(); } - - return softmmu_resize_hpt_prepare(cpu, spapr, shift); } =20 static void do_push_sregs_to_kvm_pr(CPUState *cs, run_on_cpu_data data) @@ -191,9 +193,11 @@ static target_ulong h_resize_hpt_commit(PowerPCCPU *cp= u, =20 if (kvm_enabled()) { return H_HARDWARE; + } else if (tcg_enabled()) { + return softmmu_resize_hpt_commit(cpu, spapr, flags, shift); + } else { + g_assert_not_reached(); } - - return softmmu_resize_hpt_commit(cpu, spapr, flags, shift); } =20 =20 diff --git a/target/ppc/tcg-stub.c b/target/ppc/tcg-stub.c index aadcf59d26..740d796b98 100644 --- a/target/ppc/tcg-stub.c +++ b/target/ppc/tcg-stub.c @@ -28,18 +28,3 @@ void create_ppc_opcodes(PowerPCCPU *cpu, Error **errp) void destroy_ppc_opcodes(PowerPCCPU *cpu) { } - -target_ulong softmmu_resize_hpt_prepare(PowerPCCPU *cpu, - SpaprMachineState *spapr, - target_ulong shift) -{ - g_assert_not_reached(); -} - -target_ulong softmmu_resize_hpt_commit(PowerPCCPU *cpu, - SpaprMachineState *spapr, - target_ulong flags, - target_ulong shift) -{ - g_assert_not_reached(); -} --=20 2.42.0