From patchwork Fri Apr 26 19:41:22 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: 792352 Delivered-To: patch@linaro.org Received: by 2002:adf:cc13:0:b0:346:15ad:a2a with SMTP id x19csp625357wrh; Fri, 26 Apr 2024 12:44:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV7eW7WhZm0Xok8JfT9PuePKazZOn1pdrxysAwK/5oF1vqIgGTmcaX0WNAjgCPuTU2QQQ08+yl0L1/sfzEe0+jC X-Google-Smtp-Source: AGHT+IH5CIGGSdEDnHPt41JuuOy7NmToUbx13t/CH1dFbC+cP/GnxBUJ8nQZequpYZxlHxMMuaha X-Received: by 2002:a05:690c:f11:b0:61a:cc3c:ae69 with SMTP id dc17-20020a05690c0f1100b0061acc3cae69mr4420275ywb.18.1714160682766; Fri, 26 Apr 2024 12:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714160682; cv=none; d=google.com; s=arc-20160816; b=mlzOD/ibIQyWP2MTfLZ/kAWQOqVBG/vMzTJ46QF6vRd9jX2EAPoWBoX3HEfxHtFaiN kTswqj/rWh56ZpZy1reR3zcV7UIvKuu2bZNztOSyPWrwSXQqOYfnN2oktfN3CJGam/8o ODKpSuFEgAVBsQ1uCuXwzLa3aj6zoCujo6TFlil723yK3WyDpRh0gWJsnL9SFd3zH70r U+6mAaSUlPHyNQRace+TdcUvKqblVp/J7IlBb6x/tuQKlPYbfY8cdOVYsNqeGQEDmGDJ VN5ugnDSGbHRyP5HLk6F2f2BA98jrBLcTmdZoj1zhT285Z/yC48RavNoz1awveA78kPg lnkw== 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=D/VvS2kWTA4rqEGF0JfFrfE/nD7tnjsws7S2+jUi5LY=; fh=kT+SWCKDHpOvENEFJ3mTYKt+7Tos+RGOymTadbn3wMM=; b=d4Q9cLwKahn23lijaNDyCHTTReFQQQeOkiGamyuL6/ydp21VekOGDd+ziDWey5utuJ aWo3zkSjv41BCHq8VVQH2h2pMhr6g/bQbuE9eVpixC0ec1f0aXZSHr6Lhm0QwmfuKZ5b 0ehWzELie2g++q314UGNtgc2tKgom1D5iSJuzRW0+eQd28MVUKnqs3SeQ49y93+h/oLB ZrNHoaBJRC4BxIb9fubqCnK3fAwjd6yJN+qmp5jJiSxtkhh107ykQpV8UWhoHea9+x4U T7eyBW9GLOsQ/q5nBkOPr/GGFNvok8Yz8Fi4bTZjyp4b71REKGNZq7CXGz+Xvg7OhYQe yn6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LLZ5gaaU; 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 c9-20020ac85a89000000b00435643ecf0dsi21720745qtc.64.2024.04.26.12.44.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2024 12:44:42 -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=LLZ5gaaU; 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 1s0RSv-0000UO-G2; Fri, 26 Apr 2024 15:42:37 -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 1s0RSm-0000Is-VP for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:42:29 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0RSd-0002nX-35 for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:42:24 -0400 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2d8a2cbe1baso35053341fa.0 for ; Fri, 26 Apr 2024 12:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714160536; x=1714765336; 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=D/VvS2kWTA4rqEGF0JfFrfE/nD7tnjsws7S2+jUi5LY=; b=LLZ5gaaUImzu1QoiVR+g9ULSvAhAyfPWE8DzzB248TJP0C6FPFUTy5tiP0Ih4ImyvE LxpCpcYjVLMocCj0VpcLU2/fJGCxjC1RWB1RaQGx/rk4uAFhPcx1S9ANdyGvF4giUA7k hqNMsI1qLvDrtyZZeFh/zaoMUAQNLIHsC+nD8MRbgZwTpT/nfLxaFk4pZs10iXgcGxX2 XfUrHI922nC+qibQPhyJTJJq5Pgnfcfwve0XBXz5MhSbLK89aOdGwgeTeO3gd6Wiwimg fyXNGAhLIiPI4d4f7tU5MmPg0tkGBGEtNNXflEiutuD//pXgRaQSKz8JbsCzcDNKcVvY gr3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714160536; x=1714765336; 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=D/VvS2kWTA4rqEGF0JfFrfE/nD7tnjsws7S2+jUi5LY=; b=RzVPAovwDdwradiw2XltQ8ZY88i/Xh9OsaUIYeyrTCPNLba1IH52+yebobH/ZuUlhK k16ToONpgI+dh+7NzCMF29Fv/USjeGsPc0jfIydazId0MIXZ3ewPeafebzQbcNVtBjSK NQuqeXhQ1LM1VFjH+84Pol8+s9V9yx7R+YyytpGEnA4L/Yrly9MkW3qhRFWhUVRg6uHc T2iHvex2W6gofuUOS1VCLyS9+UlPZh409+eX0xtHaI4WxJOQZr19zJCjRGotEAwbqGw0 aicq0p4LhFGzHhibDh0kuxlCewrTQP3uBwNCT08jYij6B8vT1wfO0AyJsXbcUrPiMibF lz/g== X-Gm-Message-State: AOJu0YyaqxbsDz1EikMTHljEky98kppSQ+aQDgdktYSHGlPodxDtQpfX sATJVKLvWwHoq9zgLJuM9GfwvJEpJ3KnFkj6PjsFuKXBA3RtMoHPlGWHuNJFGstuI/rjF+KMFy0 011I= X-Received: by 2002:a05:6512:4806:b0:51b:6366:3459 with SMTP id eo6-20020a056512480600b0051b63663459mr2820804lfb.67.1714160536378; Fri, 26 Apr 2024 12:42:16 -0700 (PDT) Received: from m1x-phil.lan (aul93-h02-176-184-11-147.dsl.sta.abo.bbox.fr. [176.184.11.147]) by smtp.gmail.com with ESMTPSA id c26-20020aa7c99a000000b00572405680e8sm1789128edt.21.2024.04.26.12.42.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 26 Apr 2024 12:42:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Harsh Prateek Bora , Richard Henderson , Paolo Bonzini Subject: [PULL 02/38] exec: Reduce tlb_set_dirty() declaration scope Date: Fri, 26 Apr 2024 21:41:22 +0200 Message-ID: <20240426194200.43723-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240426194200.43723-1-philmd@linaro.org> References: <20240426194200.43723-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=philmd@linaro.org; helo=mail-lj1-x234.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: Harsh Prateek Bora Reviewed-by: Richard Henderson Message-Id: <20240418192525.97451-11-philmd@linaro.org> --- 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 3e53501691..9599e16a09 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -654,7 +654,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); MemoryRegionSection * 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;