From patchwork Thu Dec 12 18:53:32 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: 849747 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp1103666wry; Thu, 12 Dec 2024 10:56:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVKcmpSi2KHg2H4jvRsmh6BjNodUZokO8e1hW85sizT7RrX3xEuxIwRabx4HAmZhg73V1FX6w==@linaro.org X-Google-Smtp-Source: AGHT+IHM6PEQV4o/0yVwA6dL7KuXuS6iit5S3NYN9PPT0gBWAIcN2jGTSNRZiPsf34w39BY264WO X-Received: by 2002:a05:620a:a108:b0:7b6:d58b:9dce with SMTP id af79cd13be357-7b6f89f3b9fmr178410785a.51.1734029805043; Thu, 12 Dec 2024 10:56:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734029805; cv=none; d=google.com; s=arc-20240605; b=Rv3nD1X4OGmX994aNmfxwGXP0IYu5u0Q/nmzwUdf2kTzptxnkU1pZ+qm4Vvg/6wdJn 9cMNZk44SufWwckih2NR/FLzjY8zV2vMeBy+kBB88klxYf3WjJ/S3dUi0qYhYaKC06QJ 7Pc2eW6PmC7YXT9TW33yWcG66ARXFZUpzqpRFVIdv6RrBVwpmW86FocfkJt3Sf6ah/3H wrjwMpETfrclJMmxn4ED5qc4hjPEfyb3W5yUYfmGWRX82lZyVbTBefTLA4/FxxVTwDIY 2H6Q0O4Yg5cb6MHsW2egNmrgvOR7xTiD3O+YX/8c/hUPGuoENdtQsyESy3JAtMLd01yi I/3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=ziwrhan20pghgkypPdFtUixUvLCoelaBHFetr07pBgc=; fh=pnqwS/3OtHZ8LqG0NTMbRB51yilWjG1VtPDdq2UnsIY=; b=YK6/n4plW7QlqcJaCwM3I2n2i4SYqIk4HGpI6TyGN7oJ1HZfHO3xkgbQZGSdVuJJLh VZdQB25F6l4wjyjQ0jZRCNDBRHAGX9rujXyNyA6SIPuYBynGwG6OSnLEpOxNLbLItTIk /XEJ101yC/29i8ONCPbhnLSWf+S8a3Sw33fUIshTrettGlkFdfVipsf6AwVhy1QNlWI8 0765DzzqRhB2cef53DmpJpp198CJgBdzx7fIMw7JpjxejzbI7l4Bf0cAbMKDUDCCXon6 ZS/ZTqFVGYAYA3fLwgzo7MggJTWdtN2JrL8EmRQrxfR+FrkKdC5jxKi3gfra7reYrGuh vZlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yMu1IIsN; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46788430b10si52323621cf.557.2024.12.12.10.56.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Dec 2024 10:56:45 -0800 (PST) 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=yMu1IIsN; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLoLu-0006z7-2k; Thu, 12 Dec 2024 13:55:58 -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 1tLoLX-0006Tm-82 for qemu-devel@nongnu.org; Thu, 12 Dec 2024 13:55:37 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLoLV-0006pf-M0 for qemu-devel@nongnu.org; Thu, 12 Dec 2024 13:55:34 -0500 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2ee51c5f000so656450a91.0 for ; Thu, 12 Dec 2024 10:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734029732; x=1734634532; 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=ziwrhan20pghgkypPdFtUixUvLCoelaBHFetr07pBgc=; b=yMu1IIsN01z52n5su6yZffIIwa8ADp1YFG7Lhe6fR2inJHeJ9HElGs031pke33avwX 8zLFGZjZTy6aClwEm+EkAfkqRHRjN4wGJowPEl0iHfFC0QBdOhlvO88SR2moUojQnFf5 9slG/7Ic+SiZGfTNVhMvLsF9AWbw8ABqh+jlVXdmV8AtemCdzsgWql4VtrpQy3O+0w7i tELgQDzRkcmqYq7aowadqpByjHjHusy8fcN8+NmCWzlgXtMUaAxUVroh0NChYoEJkPsL HSitagiOWrcnvm0VSfgGExn4tIZgx4XGdOP5XVP3otXcUzOmHOBl3q+ww4msKW7hxL6i KNRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734029732; x=1734634532; 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=ziwrhan20pghgkypPdFtUixUvLCoelaBHFetr07pBgc=; b=Zxlqb5BQsHHIdGlaiyEV/H/2MEdM48gYM2tzF9//egrJqk4h5LOOwtcNbgOiglskvS M0mf4C1diZr2P9gj8UdHmJYxaiyDAhMj7USGR/LnTjLoFw2Oe9AMUbKFnbKPiZ4fnQn6 cpM4vIxov5MT2tysi7ftn7teAdH8HaKuBEM1sPfV/YZpjtqzlupYl4aXiQZk198OzofX QpEdc10krtTOQV/jXG85X4QR87/irVlWHXRELtRu9diOgPJbeBTVry9DCFqx97LXnc9s cNTSigGFGT3Owx7kBhXpzKMfm3Kccm31qS2QmJc/CfeUuiY2WKOt8RvY/OeMJl4/uaKI xLXg== X-Gm-Message-State: AOJu0YzMEMqIzUnCWOmLfkULI8ROzuLmTf5APKrv0Kk5D9FYvBCsSYB1 bmv4bFd8w8d6y99YTr7TxLsGCm8DyW0XU2EcucQIuCg8UNVV2BPHwA6qIH0InK9C9g11QunaLUV W X-Gm-Gg: ASbGncsuMny4/AH5E5clxoNkzHqNjb0gCfqzEk2NunlqFwBzr/ZenQ0UZu/pwO33jYt ao21A4BeeAbWmgyTznMwhTzq24EL29/QTWmFLQByVjk7rPnPYVSEW5C8kvUmS8bMz25Bhb1zd7+ 3E+Cc66I09Av+F38/bpZrs7I4EfMZc/kyJCGz5tPdUvB8xNH7Sd9pccauXwsg1pLiz4KOt+GzJ6 Ojpluq6MxhZM5yAJHvrNtvF0J1cEDwdPqN/tfyQrGRlheQr3CmEb3mUPFRWdUWgzUASAHPAZMkN 4TVMD+KGP1QC5ouv5NVHsafzixeQ7qc= X-Received: by 2002:a17:90b:1a8b:b0:2ee:7538:be70 with SMTP id 98e67ed59e1d1-2f127f5502emr12265129a91.5.1734029732064; Thu, 12 Dec 2024 10:55:32 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f142de347esm1620629a91.25.2024.12.12.10.55.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 12 Dec 2024 10:55:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PATCH 09/18] accel/tcg: Un-inline log_pc() Date: Thu, 12 Dec 2024 19:53:32 +0100 Message-ID: <20241212185341.2857-10-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241212185341.2857-1-philmd@linaro.org> References: <20241212185341.2857-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=philmd@linaro.org; helo=mail-pj1-x1032.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org log_pc() is only used within cpu-exec.c, no need to expose it via "internal-target.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- accel/tcg/internal-target.h | 10 ---------- accel/tcg/cpu-exec.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 6f4ec0bd424..0437d798295 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -72,16 +72,6 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); bool tb_invalidate_phys_page_unwind(tb_page_addr_t addr, uintptr_t pc); -/* Return the current PC from CPU, which may be cached in TB. */ -static inline vaddr log_pc(CPUState *cpu, const TranslationBlock *tb) -{ - if (tb_cflags(tb) & CF_PCREL) { - return cpu->cc->get_pc(cpu); - } else { - return tb->pc; - } -} - /** * tcg_req_mo: * @type: TCGBar diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index f82870a1e2a..396fa6f4a6b 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -21,6 +21,7 @@ #include "qemu/qemu-print.h" #include "qapi/error.h" #include "qapi/type-helpers.h" +#include "hw/core/cpu.h" #include "hw/core/tcg-cpu-ops.h" #include "trace.h" #include "disas/disas.h" @@ -434,6 +435,16 @@ const void *HELPER(lookup_tb_ptr)(CPUArchState *env) return tb->tc.ptr; } +/* Return the current PC from CPU, which may be cached in TB. */ +static vaddr log_pc(CPUState *cpu, const TranslationBlock *tb) +{ + if (tb_cflags(tb) & CF_PCREL) { + return cpu->cc->get_pc(cpu); + } else { + return tb->pc; + } +} + /* Execute a TB, and fix up the CPU state afterwards if necessary */ /* * Disable CFI checks.