Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1956292pxb; Thu, 4 Nov 2021 11:24:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE5tHv2KnGGDwnfu7d/06FJoMAnI2qx5Pcm/r/ot9TTeAKJ6v0dcqEym8inhbviFFQMYEz X-Received: by 2002:aa7:c496:: with SMTP id m22mr55514427edq.180.1636050262948; Thu, 04 Nov 2021 11:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636050262; cv=none; d=google.com; s=arc-20160816; b=EluBGfhDYSSBgba4iKWHHIjNwM6sSRdqS7UArFel+TXR3UC3fWfiQ8hSUbiNK2wJ+L Fv6CGjbykgKqW7FjXq7O5m/E74isPrKrSWl+gYoeoYYTScYfVjDE91ababBKemNzyD4+ VF8Khi/p/L95onify9XpAco0N9mM9zCOQq3z9bu2hQ0xUqKAS/7azJ9zpXBQMjAMhC9/ aoI2X8estmi6NeGRoAXtrfQMYrFa6sP7n+PsTZvgMbW492W/nHxXmfZQIwNT2OMNukvC D4j6w/UFoHKlALAZnFnllvzveOy1SjHXL3O6mONxdyoZQ+2mKCwdOyPrIramOP5VIq+G RA0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CTMgu48D5xrqZkVRkHn0Ok/wYvOBUq4l67vNS1ppUJ0=; b=MbjNopxWXdm+Bx8Vy6yNownz2TV/GjrXb5pwFy570SW2JCROKlZaomyZ998AFuX9pg M82QZ3kCVO+Hcel7Nohl2MpupEME9YaxArMEE+V+Gnr4YQyD9ojENGzH0xi9oizRnrk+ eRPgn2u/UUcatccoDoFWtKdXN0N0wYuEHO5Y8ZT/4vJa+4R3gNq73OROtuSDDP2qqy5e 3pZr6MpgIPp0YiJzErf9LKH2i5nDsG1JmL/DCqD0pwgB3P9FLYDiiWAH8nDjw+bnOnOl yxB/xs/bNDdMw6aNd9rgfhn/n+wLmm8254wOBhdF50En4wrvT54BLeuCqMCuoCF7aKNY gmlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=wOY07QEE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si8128931edd.600.2021.11.04.11.23.58; Thu, 04 Nov 2021 11:24:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=wOY07QEE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234119AbhKDSXZ (ORCPT + 99 others); Thu, 4 Nov 2021 14:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234101AbhKDSXY (ORCPT ); Thu, 4 Nov 2021 14:23:24 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417DCC061714; Thu, 4 Nov 2021 11:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CTMgu48D5xrqZkVRkHn0Ok/wYvOBUq4l67vNS1ppUJ0=; b=wOY07QEE2cjfGMszfimeZ58LkM 1I6fsH17SoGntuT+2pW1LYNpfvAHf9Odniy7Em5lz8tNlhapR7b4lWhb3f8Ejsn7WbjyiCUt9AJq7 lZBgIxLxO0HU91Ope1VmZ1etWszOc0KIjPAt2Cj6c55y4/iHbVJxYYTsD2IfUWPPux1bPS2Bc57pf cJIF0nJezqfm2nQ7VbYyWleceN1fib/ju42YRHdpDA3XL4q/r7nswjIXhgrPyil/3TfC7ykXaef4h hFAaQqiPpeLecazmT4xNltLizhR81mEUu6KEwQxGFkCSZlP5dVMjQtR7I7IMVQCj93r6FVpiSVlcg XPfDVYow==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55488) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mihLs-0006Dz-Gt; Thu, 04 Nov 2021 18:20:40 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mihLp-0007Ws-JS; Thu, 04 Nov 2021 18:20:37 +0000 Date: Thu, 4 Nov 2021 18:20:37 +0000 From: "Russell King (Oracle)" To: Catalin Marinas Cc: Linus Torvalds , Matthew Wilcox , Christoph Hellwig , linux-arch , Ira Weiny , Andrew Morton , Linux Kernel Mailing List , Thomas Gleixner Subject: Re: flush_dcache_page vs kunmap_local Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 04, 2021 at 06:04:45PM +0000, Catalin Marinas wrote: > The cachetlb.rst doc states the two cases where flush_dcache_page() > should be called: > > 1. After writing to a page cache page (that's what we need on arm64 for > the I-cache). > > 2. Before reading from a page cache page and user mappings potentially > exist. I think arm32 ensures the D-cache user aliases are coherent > with the kernel one (added rmk to confirm). Yes, where necessary, we flush the user aliases in flush_dcache_page(). -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!