From patchwork Thu Apr 18 19:25:09 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: 789838 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp735332wrm; Thu, 18 Apr 2024 12:29:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxEtRrW5LEhz1WgUmGoTYyUfb3lZ0ALxnoTdJviV2dw6QggR2D1of8//KmagYRmiPJZ5ZwGgXTDcFhWG/GhADs X-Google-Smtp-Source: AGHT+IGIGErizm5WJ71nhLm460FKK9+d/Q/X+wteDijl9Fh11TdHCRp863tzz8PSEJnCYpY+VmuO X-Received: by 2002:ac8:5844:0:b0:436:52af:1efa with SMTP id h4-20020ac85844000000b0043652af1efamr14508qth.56.1713468585008; Thu, 18 Apr 2024 12:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713468584; cv=none; d=google.com; s=arc-20160816; b=I9Te5K8APyzx8Pc+Cw3yudx1Y/3E4ERtFNm4gBk1RUywLigxAvUOartemikqZQc5ii EIG+vCmDbXzVJsSAwt7LwwS/Lyw1E7g6otYTSM7RMExLrlxjfyY64gF27eIg5wQGf2me q7vACgvgUyE1duCau281VH9eCQpFxMy6sCT44u70h1W8MRMe+E5mUb2zP1sm0/OqPcSV IU7iGIwFteddQh/GB7zXt5YNBzvcWf7P67czpZAZra05c+lwHoZeWVprFjM0hf5f1zf4 lxxmn2K7TaRCDNEnHOnST2oV8JKm+9B7s6teieCrYAfJ+JT5a8zybkt+ZpNCl28rM7GO Jy4w== 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=3p8Qs3F8jC3emGpbq1YTEbHVimCbjmiYVCccpiO4GlE=; fh=OldoyVsnxIotb3oLwZzdNfaQktZrdXn2xfyEQOuGV+M=; b=Alxwt5HG7vxRIpdzIjo7XERwyW5zUlvFy0j8qpVkJ54DV+FEfwbufiYABUnDQ8eoMN vLgpjp7v8za/2pkniqrctqvPzNzwAu7EYLJu47HjceCuVqhDPd4S0PYvA2pKWhlYTDN5 +YfADtNz5bR2tBdx2T6isslOo5qSpktmWQ0HPXcu2hdgfSwMnpSFfVXSbDMoJ4N4aFMZ FuaYdw3zyeTQK/7CA0ePdv4D11UxYv4tuZvLKIQIWW+kHWT49O34ipj6hDkG5B4z+nZQ RH7150iWKNWPblpMfPrr2zGDsmEjPzfgTIRF1++xwohdkqNJaOZBwRWP1EgyUffCN6GQ WqwQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l6XJj1qe; 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 z20-20020a05622a061400b004369f4c005fsi2209314qta.700.2024.04.18.12.29.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2024 12:29:44 -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=l6XJj1qe; 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 1rxXRZ-0005kd-CC; Thu, 18 Apr 2024 15:29:13 -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 1rxXP2-00089X-EK for qemu-devel@nongnu.org; Thu, 18 Apr 2024 15:26:39 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxXOz-0007VL-De for qemu-devel@nongnu.org; Thu, 18 Apr 2024 15:26:35 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-516db2214e6so1664845e87.1 for ; Thu, 18 Apr 2024 12:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713468390; x=1714073190; 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=3p8Qs3F8jC3emGpbq1YTEbHVimCbjmiYVCccpiO4GlE=; b=l6XJj1qe8VBY4jrF6BnIYaBg1AZu9OvyIfJD48OAGLmANCcO1rhrkC05Q9IQo78mPl XE1ZA0h1h+zQXBqauPdX0ackVXtdbEoJ7/18OrxCKs44Q+dKCgDdkVsLuY0+CL5DZBZF finkyr1zD+WmcefH3/KSWPryCHp1BiBiFXDUpaajv7jVj0l0ToFtwNJHUs8uLmAcqOT9 Ibn6KrhTSzJhoet94eUFR6kTCLJGGQX3nCURcUBLRE0v56p+Ha8F1qJXsSK8bVxo0Z+T NxFSlbtbNsZJVgsYAHHHOFYg+MeQjqNkz/KVA06nINvI1tIJ37DE3SClCbRS8yZZVC6P vShQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713468390; x=1714073190; 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=3p8Qs3F8jC3emGpbq1YTEbHVimCbjmiYVCccpiO4GlE=; b=T2ntpl+oQDmtV/aZ/h0rHfBEjMqQZ3wgwmB+Ki95rYYDJ2J59TEkt3tC4ULm/Rpwws u9ui65Xo7bb9AzapJUjFQoOKUth44eIygZloJMTRSLLpcsQ0Z1LxfYGWQTG+WX0SAP3G jLVEVZbHMC4CVZk9kmx3TQWxMClmlJue7JMn7GPoCa6nvvV2RXXls4sbQVPl57Gv4HR7 wIJKj8BO82pLK8L0gyMVp/o5q11wrVxtZnej5Xz+l2jjXnotyjQYw2BE4QfVaDxE6zmU dQnErhP6ewvLDavo/rWqcZQt5a0feEK/WnFGiSIWzxEeYmvsY0gGdqmMrIBnDCOQ6Bog AJcQ== X-Gm-Message-State: AOJu0YyNvRfF0HglLW42JSbgr3JuYWJivV3tWrPkcF4p0h/uqXDOt6o1 OU0eYnRy2oVoUvq028CR4eFQwfTARB27Xp3pNGKy0b0uh8fjfG2vJV6zgaSrV+1cAQ6NGJduEO0 U X-Received: by 2002:a05:6512:34c3:b0:51a:affe:2526 with SMTP id w3-20020a05651234c300b0051aaffe2526mr460238lfr.62.1713468390092; Thu, 18 Apr 2024 12:26:30 -0700 (PDT) Received: from m1x-phil.lan ([176.176.151.213]) by smtp.gmail.com with ESMTPSA id es13-20020a056402380d00b0056c249798absm1211244edb.71.2024.04.18.12.26.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Apr 2024 12:26:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Anton Johansson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 10/24] exec: Reduce tlb_set_dirty() declaration scope Date: Thu, 18 Apr 2024 21:25:09 +0200 Message-ID: <20240418192525.97451-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240418192525.97451-1-philmd@linaro.org> References: <20240418192525.97451-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.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=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 tlb_set_dirty() is only used in accel/tcg/cputlb.c, where it is defined. Declare it statically, removing the stub. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/exec/exec-all.h | 1 - accel/stubs/tcg-stub.c | 4 ---- accel/tcg/cputlb.c | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index e4cff08db4..778c82ba8e 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -641,7 +641,6 @@ static inline void mmap_unlock(void) {} #define WITH_MMAP_LOCK_GUARD() void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length); -void tlb_set_dirty(CPUState *cpu, vaddr addr); void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length); #endif diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index 8a496a2a6f..dd890d6cf6 100644 --- a/accel/stubs/tcg-stub.c +++ b/accel/stubs/tcg-stub.c @@ -18,10 +18,6 @@ void tb_flush(CPUState *cpu) { } -void tlb_set_dirty(CPUState *cpu, vaddr vaddr) -{ -} - int probe_access_flags(CPUArchState *env, vaddr addr, int size, MMUAccessType access_type, int mmu_idx, bool nonfault, void **phost, uintptr_t retaddr) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 93b1ca810b..e16d02a62c 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1039,7 +1039,7 @@ static inline void tlb_set_dirty1_locked(CPUTLBEntry *tlb_entry, /* update the TLB corresponding to virtual page vaddr so that it is no longer dirty */ -void tlb_set_dirty(CPUState *cpu, vaddr addr) +static void tlb_set_dirty(CPUState *cpu, vaddr addr) { int mmu_idx;