From patchwork Thu Sep 14 19:52:29 2023 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: 722604 Delivered-To: patch@linaro.org Received: by 2002:ab3:5684:0:b0:23f:8cfb:5ad7 with SMTP id d4csp688845ltc; Thu, 14 Sep 2023 12:53:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPcTENqvRbKdxyAakZFrowdwpDIn5IXhDMZ1zjVscH0Fcde3nA+6Bzxyy7Iu6r5HQ3qSwR X-Received: by 2002:a0c:b408:0:b0:64f:3f48:b6e1 with SMTP id u8-20020a0cb408000000b0064f3f48b6e1mr6891975qve.19.1694721227094; Thu, 14 Sep 2023 12:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694721227; cv=none; d=google.com; s=arc-20160816; b=SWaUJTHRAroMsiA5vh7oAujHoatsjrJkdeMjawjxpdIl+cL+odF20ICFPXHBouQTfZ np8B/O93OctC0oFlRm1X6GolbUMEuyNSDDLZR1r/FjjaeD/bsoxbxFmYV7vP5f6CpQcR 4fsn5nPAI/rnakHfH3UsUFdUSGw23MLCqA/1iQWdMSPa0QXfeqltrh0yHYR5erJXEMnj 2ioZg0Nzo22kYgenIFjS36Sz8SGLsZ3V/ryL/m0ezYjNWCk+toxKHrWX8v2fUfrLiOkk jcLfFJIsLYviDRsjJ18/2nYtgq5OP1hQKIa+bpx9y0VQtOibnURYbzGBCB81ueXXKwRO PWrA== 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=WMU91LA7BSC1SezrVUaA2bGYSFbwZkyvMxsyUhJZ/iI=; fh=FiyyUy7EBP2sturit0nQSzeCXKIF9fai8v0bS20tHfg=; b=k8sOkPEpniNMmeyRJr42AHH1TpAVWi5a32AYhxQ2vN7ni/eRZhiKz1yDP/n79V/y50 WsFc6Teq3HrJwtIxF0gwQmt7QYlfGugbzZoHz6FY1hFgXIV+r2N8O+3dJTzAFXdUa2+T wBSuo3x/AAbYxMftb6w4mOMdba8mUu6hgUryfucMNT0TgL/PZK9A3f1R9/id/FQrVjYv t8l1f5GckeeZlW6H3dgZ9VmLRXUxvqSgbitjvV1ok1812vdxnu0mjtmEoID7BX683Jb2 9ZQ3WDW131kKi1Tddt62LDweLt5iUQW82DEsqmJK+HLwSq0eSWcQrUl35afEkG2u3pqf fF0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FezRqLgX; 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 c27-20020a05620a269b00b00769892a9d35si1369744qkp.571.2023.09.14.12.53.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Sep 2023 12:53:47 -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=FezRqLgX; 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 1qgsOf-0006N0-6c; Thu, 14 Sep 2023 15:53:05 -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 1qgsOe-0006MZ-Ep for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:53:04 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgsOc-0006pl-1A for qemu-devel@nongnu.org; Thu, 14 Sep 2023 15:53:04 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-31f7400cb74so1164441f8f.2 for ; Thu, 14 Sep 2023 12:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694721180; x=1695325980; 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=WMU91LA7BSC1SezrVUaA2bGYSFbwZkyvMxsyUhJZ/iI=; b=FezRqLgX83XjU7AY3UAwehBVqyVGKt/1L1XDJsrKu6r84EQ3KQJvW4P6O+2UaoyMyj DeCSzyqYl3LEheCOEi25pBAJ/t0t2fhgTfd0ymRnGSpRtrMIrhU8aYH4DJQgklpliHx/ 52xsdvIEryJChhRMvE6G+kcgwcTyKNJiP4MBHjW3WBImeER0ULmrm0XNNNDbdEI1V7Q8 hprlNFkIXllWZL8fHbMqkcmhBOYmbDaatmz89Ig4DLuFZ7qqJYby6GVEdtAEhTf+3MDl jbxfEcf1vCnZKNrn5j30k8/EXdt26HICL24IejU8Rmx/TJ5iFGJQnCqcTUtyKb3DnEGO 932A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694721180; x=1695325980; 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=WMU91LA7BSC1SezrVUaA2bGYSFbwZkyvMxsyUhJZ/iI=; b=u2YmjiiaIrWrXDnLhJjPAslefmghjTBvUv0eKcoiC03E74ErMddSfrrZ+WhsnN3JZl HivL36QUxk3VK+HIxxnQtSMujKNwEjV8OUG9WziqOu+HoyEvxsr3+n+n+o/1qslJDfq0 8/t46t91T9NnlT04gyxyrBD3VVcD6iKCSUvf5cSpxL5Ifxu1rkHAHeGO4uNIr53X8dP8 TWbNN4W+WbOswzrWzkHMDBs19W55pbFC4/fp4Tjxd0LQPz+FS9kW4hPBmioTV4jPHSI/ qI5TJO0C0hKrN1WqZrxmHhIGa3dfDN7GfgzmrEjeZGktMFbNgJV/og/3IHnFbfcerUpe Js3w== X-Gm-Message-State: AOJu0Yy1jykqEclDIbybfQ0pyP37dTRANH5kEXXOyyEd9vn2wtL0PmtI tliQz7tTIl/6TkycB8sVtjrzNj0gaPeIY2UK1AU= X-Received: by 2002:adf:ebc8:0:b0:31a:e6c2:770d with SMTP id v8-20020adfebc8000000b0031ae6c2770dmr5628938wrn.36.1694721180203; Thu, 14 Sep 2023 12:53:00 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id d14-20020a50fb0e000000b00521953ce6e0sm1281656edq.93.2023.09.14.12.52.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 12:52:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Greg Kurz , Anton Johansson , Yanan Wang , Richard Henderson , David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Eduardo Habkost , Marcel Apfelbaum , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Harsh Prateek Bora , qemu-ppc@nongnu.org Subject: [RFC PATCH 4/4] accel/tcg: Keep tlb_set_dirty() internal Date: Thu, 14 Sep 2023 21:52:29 +0200 Message-ID: <20230914195229.78244-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914195229.78244-1-philmd@linaro.org> References: <20230914195229.78244-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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 Since commit 34d49937e4 ("accel/tcg: Handle atomic accesses to notdirty memory correctly") tlb_set_dirty() is only used (once) in the very same file it is defined... Make it static. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora --- include/exec/exec-all.h | 1 - accel/tcg/cputlb.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index b2f5cd4c2a..59efa7bc28 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -695,7 +695,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); MemoryRegionSection * address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr addr, diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index c643d66190..fe9d702f3e 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1062,7 +1062,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) { CPUArchState *env = cpu->env_ptr; int mmu_idx;