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: 1834431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FezRqLgX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmp0r2T05z1yhd for ; Fri, 15 Sep 2023 05:53:48 +1000 (AEST) 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-Google-Smtp-Source: AGHT+IGj4Ouv5qBvfaJuxneNj2YWgwwDv0agb2peWcvtGj+BdDeDg6oOmuebujutYejycvmI0e+tRw== 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.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;