From nobody Sat Nov 23 19:47:19 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1731684182; cv=none; d=zohomail.com; s=zohoarc; b=LYBUYQAKt/6wRcH4Qn2HcnY89ZZzAhFpz6X5zlMUEB4U/6ltmu38x6jc7aHpt0ujb0MIj9SnKXCOhxhN9No3ab21EnUN4QQftgFsToh0hhCHg5bB9Aej5ZYH8RQObzfUixenKb5ZsFTw2VFuPgkSl5Ax8Zp9KHpLCWFQbNKeDs4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731684182; 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=yp1aCpXr3wZU6pqXqUnr6GbiNobZzfh44qbynt7h1+g=; b=h4+zAK4SgzvSIqRIkPMbS8Xe0O4gvrFaTWfrZtwJ8dOGGqgcyyKmzCmGzhDjmcthKEVgD8QlBfHqf0M5/zH5jzad5G0OFkX+yhvbH8ppAdLAecJvmDVB932//Cbqd6guwcWaFdIJIg0ZUsi5kFmHgNLzjEbY4SKmMDxNltteSzQ= 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 1731684182089646.8584105507559; Fri, 15 Nov 2024 07:23:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBy8a-0002EQ-6i; Fri, 15 Nov 2024 10:21:32 -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 1tBy8Y-0002E4-Pq for qemu-devel@nongnu.org; Fri, 15 Nov 2024 10:21:30 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBy8W-00047L-Te for qemu-devel@nongnu.org; Fri, 15 Nov 2024 10:21:30 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-432d86a3085so17181895e9.2 for ; Fri, 15 Nov 2024 07:21:28 -0800 (PST) Received: from localhost.localdomain ([176.187.214.209]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-382224253f6sm3301155f8f.111.2024.11.15.07.21.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 15 Nov 2024 07:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731684087; x=1732288887; 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=yp1aCpXr3wZU6pqXqUnr6GbiNobZzfh44qbynt7h1+g=; b=N2Wl7E5jXDQ0SsfJQ2oD+rd1jHzKElM9eihLlNQ9lls7CGnsnXf9219rjfKFVSiKLd DGYWaQwr6X4rt2vvK2eTyt5Mn/UL0EucdVF4lV6dkrVAwxNe0XGNjAZxf0UF9VkHaFH1 GcNuzIiPkGPCwjBqyhLr8uoahJuHt5jZMegzkSSb5q+waBZ+bulOQRtAMT7uZUJGugn2 ABMdHk2iqRHrFcDL8t7FMKL/O+aQK9laCdkd2Xod+SUMxLwU/9Z/w1G9gfVe3Dzr961W Aqm/23SC/Ylf5bhFYSs3cBdCx+uqwdIIJCWPBDVtKJ9NfAGSShFkYRZk12ZwfGLXGnT7 UDRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731684087; x=1732288887; 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=yp1aCpXr3wZU6pqXqUnr6GbiNobZzfh44qbynt7h1+g=; b=rHd2xdZqgw5Ygsk8oqQaWNxJohD5IQ/kxnX/+BJ4CMHRRr5E4SDXcMn4XEk6jB0VtE VKQva2OlTxuaG1qtWEz2R9MBUM7EJP2yhfPBdqz7B+8UypppQ8DECjjIRCFM1hdFNff/ 4KIdLLAmlYRCpD5tFhlVUEPjwLQ9pfKuXW+nQlM1O49EhuV7twzc/Q5oz+P2unk7/uN6 fHwoDCYIfDtB/KLCSfkDCmOEaL2l/RdlQzofYNoGgZXgIRVaKTUoktiPCWfOUfs7b65K uOkUfwL01gAI16f8n1RdKE8SMlCf2JTRUPL11wlpQYObzrtbbV4XTi2YAQioV7nFiaGR YOIQ== X-Gm-Message-State: AOJu0YyYiE/OPfSI50f37rj/iCGNTMte/tbdqljFYxbja6LMSeUo4AiX Acq6hbnCDVm0aYlgoAJO/qMDYqRmYl1KnYUEFEZMejkwfBP4tK4Q4BGiFcbI4RJPoJMI2JDEBAe B X-Google-Smtp-Source: AGHT+IFhFoquZWowIOxNx0Ov4CvVfco7sFdbAGelYS7jLuKzzw2hgKb8CAmPZ0GVe6KqbVkhrJIUOg== X-Received: by 2002:a05:6000:1868:b0:37e:f1ed:67e8 with SMTP id ffacd0b85a97d-38225a21d77mr2952048f8f.35.1731684087066; Fri, 15 Nov 2024 07:21:27 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 06/10] accel/tcg: Remove cpu_unwind_state_data() unused CPUState argument Date: Fri, 15 Nov 2024 16:20:49 +0100 Message-ID: <20241115152053.66442-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115152053.66442-1-philmd@linaro.org> References: <20241115152053.66442-1-philmd@linaro.org> 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=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 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 @linaro.org) X-ZM-MESSAGEID: 1731684182818116600 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/exec/translate-all.h | 3 +-- accel/tcg/translate-all.c | 2 +- target/i386/helper.c | 3 ++- target/openrisc/sys_helper.c | 7 +++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h index f06cfedd52..9303318953 100644 --- a/include/exec/translate-all.h +++ b/include/exec/translate-all.h @@ -23,7 +23,6 @@ =20 /** * cpu_unwind_state_data: - * @cpu: the cpu context * @host_pc: the host pc within the translation * @data: output data * @@ -32,7 +31,7 @@ * function returns false; otherwise @data is loaded. * This is the same unwind info as given to restore_state_to_opc. */ -bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *dat= a); +bool cpu_unwind_state_data(uintptr_t host_pc, uint64_t *data); =20 /* translate-all.c */ void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr); diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index fdf6d8ac19..8d5530e341 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -243,7 +243,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc) return false; } =20 -bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *dat= a) +bool cpu_unwind_state_data(uintptr_t host_pc, uint64_t *data) { if (in_code_gen_buffer((const void *)(host_pc - tcg_splitwx_diff))) { TranslationBlock *tb =3D tcg_tb_lookup(host_pc); diff --git a/target/i386/helper.c b/target/i386/helper.c index 01a268a30b..b848936441 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -29,6 +29,7 @@ #endif #include "qemu/log.h" #ifdef CONFIG_TCG +#include "exec/translate-all.h" #include "tcg/insn-start-words.h" #endif =20 @@ -526,7 +527,7 @@ static inline target_ulong get_memio_eip(CPUX86State *e= nv) uint64_t data[TARGET_INSN_START_WORDS]; CPUState *cs =3D env_cpu(env); =20 - if (!cpu_unwind_state_data(cs, cs->mem_io_pc, data)) { + if (!cpu_unwind_state_data(cs->mem_io_pc, data)) { return env->eip; } =20 diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 77567afba4..67e1f53fca 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -20,7 +20,7 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "exec/exec-all.h" +#include "exec/translate-all.h" #include "exec/helper-proto.h" #include "exception.h" #ifndef CONFIG_USER_ONLY @@ -219,7 +219,6 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, targe= t_ulong rd, #ifndef CONFIG_USER_ONLY uint64_t data[TARGET_INSN_START_WORDS]; MachineState *ms =3D MACHINE(qdev_get_machine()); - CPUState *cs =3D env_cpu(env); int idx; #endif =20 @@ -260,7 +259,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, targe= t_ulong rd, return env->evbar; =20 case TO_SPR(0, 16): /* NPC (equals PC) */ - if (cpu_unwind_state_data(cs, GETPC(), data)) { + if (cpu_unwind_state_data(GETPC(), data)) { return data[0]; } return env->pc; @@ -269,7 +268,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, targe= t_ulong rd, return cpu_get_sr(env); =20 case TO_SPR(0, 18): /* PPC */ - if (cpu_unwind_state_data(cs, GETPC(), data)) { + if (cpu_unwind_state_data(GETPC(), data)) { if (data[1] & 2) { return data[0] - 4; } --=20 2.45.2