Received: by 2002:a19:ee01:0:0:0:0:0 with SMTP id g1csp2445124lfb; Mon, 11 May 2020 01:17:47 -0700 (PDT) X-Google-Smtp-Source: APiQypK26HImnzdWtHBI2ebB7/XRY3+ib9Ibo3bskpSKw4OG7z+Xt5LDVUwVD6vPILHOy7TIdOMN X-Received: by 2002:ac8:75d8:: with SMTP id z24mr15464272qtq.324.1589185067086; Mon, 11 May 2020 01:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589185067; cv=none; d=google.com; s=arc-20160816; b=BxyFq5gdHFHJvo0zABVeIakO57Bz4gIjwGbSzyHhKfE7hs6S2gM3mkNTq/a92Dch6y PPo7LdMXisQaZ67DcYNFfQBB9SobLhUpHimjoyUBAuIJXnczGxeZxqoI1xlzgF+Lgg+P TLRhdp3NnX5ZArKVvpx+NjC00HQ8zcpQ55D0t6mA9066WuRWPv37iB8nfzmFW/gO0Qpq wslTi3iWsYhe8BgkR9mP5lJCdTKLFdYQFD1mZw8q0cxBXFyHMLNhfe+1ZLqWeyhDAar9 dc2kyPJBXIR+jg2WUbioJe35n69UFJy+r7oCKEcsCX/i3r8tt/utW+VWY4jNBi/DuErh mWVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=l8Kgyc/BsfqlAUuKAX2iSr9cLPvOmA/twzAvloj+tAk=; b=ViBuEvbOHEQ8q3hIL3CC4n9UJVBebKcgzpDEQq55tf2lEsVerlSZczXaH2Qn9wU/1V b3Orx8ZMXfBSzQ+rPlSdoejT6QdE5kR0+utkK5nLzmxjn+jRKt7jDUx5Qj38lFfoGXEO D4k4bA/fC44+XaCin6uPSueXgb+XUUwe1+M7PBWs/hakkW7XJ6yTYuU1Fq3KMkhiQ0/U CAYQx1fJ+qp0aEOq0zLCC2XvU2Mv3xbdWmBa6muMND6AEYYVfzDPUgJkCOTnB366Qgt3 Sf6nuOa1Ca6OkwWQpze0pBKEJ3MMXIwnZ66P0Qxf8+whdUbOkqkWQFaIAg2ozyL/EwLz aIpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=MMpqRCtw; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b7si1147841qkj.257.2020.05.11.01.17.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 May 2020 01:17:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=MMpqRCtw; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:53696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY3dC-00033x-CN for alex.bennee@linaro.org; Mon, 11 May 2020 04:17:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY3d1-0002z4-VZ for qemu-arm@nongnu.org; Mon, 11 May 2020 04:17:35 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:42589 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jY3d1-0002nD-4t for qemu-arm@nongnu.org; Mon, 11 May 2020 04:17:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589185054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l8Kgyc/BsfqlAUuKAX2iSr9cLPvOmA/twzAvloj+tAk=; b=MMpqRCtw05XaYIud2avoFP6oNkhcAJYsAQ34woSmETJ9+6jb9cd8RMb8zlE361uI+OxWGw w26Zxwl8GRcRfb5g/4HKF1zfnP/HE/G9zwzVhKNKmg38F99cynpUrHsEm99MmAdc7DgxgY 7v/RLK9Xd0K4MoYW4i3w6SdO3rQOuTM= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-hfM82fq7MU-fxvdSV4ERfA-1; Mon, 11 May 2020 04:17:32 -0400 X-MC-Unique: hfM82fq7MU-fxvdSV4ERfA-1 Received: by mail-wm1-f70.google.com with SMTP id a67so1803655wme.6 for ; Mon, 11 May 2020 01:17:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l8Kgyc/BsfqlAUuKAX2iSr9cLPvOmA/twzAvloj+tAk=; b=ehxBN1nOCV9+e3GERfTFooE1PE6LFDMkJuFRojG+O136DmMw9H/GTwuqSpfS1N0bNp sC9YxZ+pk2zUgECryl1hsdz33zOV5t766WkwJEYZjnb82WvkveBVa9hd0OW2fjIGB9h2 vukbpRcQg9pziu6nDSf/NadSJggYIU1W0T6TDphnegPQqg42Hg16seMtDcgQjbfJU3bZ doKS8ysXR80JK0bGbJKm6DctEhkXteHDkh+9eDKllnfCVWVKILfmUXKTNejjbBH5up31 m94gUrRY0AeayaHbzJKM5CBOs2rWKLn8rWMgx2y1qRxpRsYeMw+/FxUFkzZLOazHURLQ 4b0g== X-Gm-Message-State: AGi0PuZzcFTyQIRP5DD5H3lOGRThdKIHJrlJOZPh4mznF+QKwNoUKyGZ PhDfIgSZxZsQeJ2VwDOHKDjaFLKtrqkBBVKQRWIS1/0xi8P5IBxvcm9LSYj/H3ZLaPUkXOqnRT+ HGq/ovWYqxPlO X-Received: by 2002:a7b:c38b:: with SMTP id s11mr30234399wmj.55.1589185051370; Mon, 11 May 2020 01:17:31 -0700 (PDT) X-Received: by 2002:a7b:c38b:: with SMTP id s11mr30234388wmj.55.1589185051202; Mon, 11 May 2020 01:17:31 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id y10sm13269382wrd.95.2020.05.11.01.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 01:17:30 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 2/4] memory: Rename memory_region_do_writeback() -> memory_region_sync() Date: Mon, 11 May 2020 10:17:17 +0200 Message-Id: <20200511081719.31641-3-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200511081719.31641-1-philmd@redhat.com> References: <20200511081719.31641-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8; text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=207.211.31.81; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 01:43:51 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , Beata Michalska , qemu-block@nongnu.org, Richard Henderson , Max Reitz , qemu-arm@nongnu.org, Keith Busch , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: EaY3XgPVtA2p We usually use '_do_' for internal functions. Rename memory_region_do_writeback() as memory_region_sync() to better reflect what it does. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 13 +++++++------ memory.c | 2 +- target/arm/helper.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index e000bd2f97..4fc1d85b99 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1474,14 +1474,15 @@ void *memory_region_get_ram_ptr(MemoryRegion *mr); void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, Error **errp); /** - * memory_region_do_writeback: Trigger cache writeback or msync for - * selected address range + * memory_region_sync: Synchronize selected address range * - * @mr: the memory region to be updated - * @addr: the initial address of the range to be written back - * @size: the size of the range to be written back + * It is only meaningful for RAM regions, otherwise it is no-op. + * + * @mr: the memory region to be synchronized + * @addr: the initial address of the range to be sync + * @size: the size of the range to be sync */ -void memory_region_do_writeback(MemoryRegion *mr, hwaddr addr, hwaddr size); +void memory_region_sync(MemoryRegion *mr, hwaddr addr, hwaddr size); /** * memory_region_set_log: Turn dirty logging on or off for a region. diff --git a/memory.c b/memory.c index fd5c3af535..73534b26f4 100644 --- a/memory.c +++ b/memory.c @@ -2198,7 +2198,7 @@ void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, Error **errp } -void memory_region_do_writeback(MemoryRegion *mr, hwaddr addr, hwaddr size) +void memory_region_sync(MemoryRegion *mr, hwaddr addr, hwaddr size) { /* * Might be extended case needed to cover diff --git a/target/arm/helper.c b/target/arm/helper.c index a94f650795..c2697ed7c0 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6829,7 +6829,7 @@ static void dccvap_writefn(CPUARMState *env, const ARMCPRegInfo *opaque, mr = memory_region_from_host(haddr, &offset); if (mr) { - memory_region_do_writeback(mr, offset, dline_size); + memory_region_sync(mr, offset, dline_size); } } } -- 2.21.3