From patchwork Thu Nov 14 16:00:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 843130 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcc:0:b0:382:184f:390f with SMTP id e12csp359153wrc; Thu, 14 Nov 2024 08:02:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV+GJHhGX97eH6jEK8gJgXfwqY06XIaIE1JXwqQXjyfmqU4vKOJYIaEHCeItyUo0Vl5EBGV8g==@linaro.org X-Google-Smtp-Source: AGHT+IGkoqx2eMNR4zRvKPSy5udiQ5jLMNL3iVJbmgCIgln5e9EBmzLjjtH6MqLSAviMzqIoPz82 X-Received: by 2002:a05:6359:514a:b0:1c6:4d0:6410 with SMTP id e5c5f4694b2df-1c641e7db2dmr1156595755d.3.1731600150497; Thu, 14 Nov 2024 08:02:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731600150; cv=none; d=google.com; s=arc-20240605; b=ZuxmIvrNbCzAkpqgVImoMEEyqDi3jHzKI0fbqPZ2Kylz9VZAWFO3P67NFabQi8cMDI q8mrNWw8HZYmBIHgvpK2OFAsiyDGTrPlX+Z2bkiKHmc3OxpiK53Kvn0g+iVyQbF3G3EL 4U2YLgezTQq4B8noP3nG+11u+DQ7sQXNwu9iGGGYxVHqri6cbbLRbTrUefdkND2yonVN PXTwlyB/g6qlidN98lPEYAb1d1ljiTwhQmAAo7o3XcbRogsGqjc3p8nOIgAZOz1WIvzT IYiexnHuWFhTV6NzGViVR6ITRVv7h0b0zFLKW9Jl6EWhcO9oDiqCS29DPasuBvbVA1Zo u0Lg== 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:to:from :dkim-signature; bh=aH/YSb9/f+Pg6UolkLA4sQEI53j6GiG7lP5Aqm9cSsA=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=N07QnS2g57xYRakNvmHaejHeOs465OskQfmEuNwUaI1CGWmx+w2OdLoYlQF2H6pkDi amafBxttnRAVGon2zzEC9AA2h4mdRHB7gNqUazxXvvT8Ze1i3XZcyJeIodnyn3dXbU9K EzchNIpfL3nsO0wTSHO/OvBGSLM9fJG/mpoPsztvkJAhA5vjJLKhU3bwCnnsD/XjRSXl hcYQCULtD3hO3m2IFFLZmKK3+LNQxkmf4WQG8xKd6xw96y+B+uPzK0TZ1vwWx4v4MIOq +v9X/n34NViLygMl2Oh7jSO3wI0sItFZTsp0cFYELzZntb7g2vvZTcRJfEEX40Xarp0H +wXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RT+Kl5fa; 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 ada2fe7eead31-4ad5985691bsi470083137.395.2024.11.14.08.02.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Nov 2024 08:02:30 -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=RT+Kl5fa; 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 1tBcIR-00055D-Ex; Thu, 14 Nov 2024 11:02:16 -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 1tBcI3-0004z7-MT for qemu-devel@nongnu.org; Thu, 14 Nov 2024 11:01:51 -0500 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBcI0-0002EC-OV for qemu-devel@nongnu.org; Thu, 14 Nov 2024 11:01:50 -0500 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2e91403950dso648078a91.3 for ; Thu, 14 Nov 2024 08:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731600107; x=1732204907; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aH/YSb9/f+Pg6UolkLA4sQEI53j6GiG7lP5Aqm9cSsA=; b=RT+Kl5faUclTlmPrp/awEHRtcu/yrF983B7fB5+W83ioqoDb0x3OvNFbBwlv1NoWXX 9ShF4/255jkvHPeDVYkEuKj0e9qUpMmhm9FDSuFeN5OEzTRI+QdDT+Ak5CxFbXw1/EEU d/qQz2yIFWDm+xW2z7b/F9LLLBkSROXsFFGdkmImo//GibhkqV7wz34Y1qWqnC5+ccM1 OYgW/NLI7HXXZek/++/5vBdW1WoH3V5CoDIxX1YR85jLcJaEiwNaGoiTZMswaI0uGvpi EQ9yuNOoSU2b1ZURL8k/CyNAY5PwKxX+5Pn+TgzTWEIrHqNZ33tfVnrjBjLnchFTAlpn m4LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731600107; x=1732204907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aH/YSb9/f+Pg6UolkLA4sQEI53j6GiG7lP5Aqm9cSsA=; b=cdOaYb/L1VRnmID6WixNuSPUPfSu++Fz+JIQhxbqmVaxDjnMNm3q9ORfVamUj3YJNG fUxU/bmGHycyAtAftYJgLIkXfipN8GqGmAf4qFAKXKXc5AK9abChiK6yAp6q6T7HUYh3 FpQDUtdjmPPZyeejtIB4eO2/Agyvm9JStnmgSwDiRiyLAxn0z0qgSxeNmEUE24Q1xPUs hJmsoptEgFHnHrQzC/xVIUjk5yAq8Er8ZMf6WNnPHxDNC+4IWisiSdMny7jNVBtQMBxC jm/L++eCRKr6E89/9OV0J9KxG96afLSC9ZAU8ynOHAhf4z1UbSSAtaw+lG+rLMyUKqQM 1nJA== X-Gm-Message-State: AOJu0YwCHPhRr/PO78ub7QJhsbKi7yAsT+mk/6JkKeblOYTNpAf2rgCg 5eXmbUUMT73Xrx4+7KH7n7RZstJ4dtEL1S0wo/lfUbEKqFG5NrpMeLCEFn1dqp+0Ghy45+3Hukl H X-Received: by 2002:a17:90b:4c06:b0:2e2:cd11:c9b with SMTP id 98e67ed59e1d1-2e9b16eb849mr30900909a91.3.1731600106566; Thu, 14 Nov 2024 08:01:46 -0800 (PST) Received: from stoup.. ([71.212.136.242]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea024ec723sm1484438a91.46.2024.11.14.08.01.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 08:01:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 19/54] accel/tcg: Remove tlb_n_used_entries_inc Date: Thu, 14 Nov 2024 08:00:55 -0800 Message-ID: <20241114160131.48616-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241114160131.48616-1-richard.henderson@linaro.org> References: <20241114160131.48616-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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 Expand the function into its only caller, using the existing CPUTLBDesc local pointer. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- accel/tcg/cputlb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 8caa8c0f1d..3e24529f4f 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -354,11 +354,6 @@ static void tlb_mmu_init(CPUTLBDesc *desc, CPUTLBDescFast *fast, int64_t now) tlb_mmu_flush_locked(desc, fast); } -static inline void tlb_n_used_entries_inc(CPUState *cpu, uintptr_t mmu_idx) -{ - cpu->neg.tlb.d[mmu_idx].n_used_entries++; -} - void tlb_init(CPUState *cpu) { int64_t now = get_clock_realtime(); @@ -1211,7 +1206,7 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx, node->full = *full; copy_tlb_helper_locked(te, &node->copy); - tlb_n_used_entries_inc(cpu, mmu_idx); + desc->n_used_entries++; qemu_spin_unlock(&tlb->c.lock); }