Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1763846imm; Thu, 27 Sep 2018 02:02:35 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Z5DI98fmV3LjOWqrS9xdefqOdl2IsVGoIEpscOpN+nnMVTjWokzPUO+qoEFSoNMNdDIxL X-Received: by 2002:a17:902:74c4:: with SMTP id f4-v6mr2851135plt.59.1538038955540; Thu, 27 Sep 2018 02:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538038955; cv=none; d=google.com; s=arc-20160816; b=XS1cE+iXUv4VSkjHIkvVCg4kqz+1dayA/+MyF14VLBk5YsmtHdrtjYBQaubMmx6Paz ootvYCQ7kSCFGAd9x5C1NcUwh71Wkx5Okjk/UkALE99D3Ty+8HUpIe+fZRsDLh3gaDZ8 2L7k7UY0TT8Y5orcQYzgr3n/83v7po46wN4uaswGM0jq1pXkDW/8TqgK5aezM4RddEYO CUmRggv/n39KVjOfUYrvQytcApfiFtKS+6ZDTawHvHD3OkiUny+VrwdLsKDMGmFanCvY KOzJuXPudtctlDWis/RZT4JtfNygWTyH0ev0tUXZggRfSXX3hHasajJ2E+ufPNn3h6Gt J+FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wjNvAHC8bsJR7C0XneYvLGD76OYbf4+M+0r4B1H+C74=; b=GZuy4TXNmfFGzXVVZQsTPBHyFRd2xrZBw6614qr0LKELCUD9mHleZQgLibrZjYO2pu sf3g6llMixlisnKvdk0zD466gEsK9XoSUwVr54GGKSics/MN9xaeJQtItuMLVZ8XhKWN y187rm2zJG4eq1ztu/EkntUkevzdEVvhoo45GcyPKgEWSWlOQ+LKbfRtCZNWQvz6hpgB bnLbEDHvLM1Tj0MQs6mEZVc6ptfjCN1XO20FdHYLf+fo++9kG5YRQ8fThTPK534Agu5K TQJPPuwEpoDgQioooNcy6ba6UluVfvfelxhxDrfl3WcVK0fchwItkeNm9SzDVn+u0FAK YH2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YdoxSQce; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si1336698plz.355.2018.09.27.02.02.19; Thu, 27 Sep 2018 02:02:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=YdoxSQce; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727298AbeI0PTQ (ORCPT + 99 others); Thu, 27 Sep 2018 11:19:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:36392 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727154AbeI0PTP (ORCPT ); Thu, 27 Sep 2018 11:19:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender: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=wjNvAHC8bsJR7C0XneYvLGD76OYbf4+M+0r4B1H+C74=; b=YdoxSQceecfqWg8yPO4RJ0OD5 HrVo8DhAJa72UiPN7DdOzUgVbrEm+9bRWG7g2FzKVepYBoEt6tG4cUxXEYh9iHsON8mRY61hyqWZE 7eWPK+qBdYrg26usdxDrfiKILuiyrtYPn9P9Ef2ybkhXq8kzclbIi5sZ1nPy8y3UHvlN767e9YCkT nvzdT92mUUbpj+7x+H7pDnqagzTAjECwasWwAXDa3vdsTFv6AuMdh+AO5mvYqvlu4SIDQUl+iEvpn 9OrartNyr2BArpnwOfKNsyn31iCNKb/2/0h07NMNkeL4qeJ71pZB62WjWCRORb+4CtLYlaqgoHJeO L3M7yk1sA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5SAy-000546-CJ; Thu, 27 Sep 2018 09:01:51 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5E9F6202C1A0E; Thu, 27 Sep 2018 11:01:34 +0200 (CEST) Date: Thu, 27 Sep 2018 11:01:34 +0200 From: Peter Zijlstra To: Guo Ren Cc: akpm@linux-foundation.org, arnd@arndb.de, daniel.lezcano@linaro.org, davem@davemloft.net, gregkh@linuxfoundation.org, jason@lakedaemon.net, marc.zyngier@arm.com, mark.rutland@arm.com, mchehab+samsung@kernel.org, robh@kernel.org, robh+dt@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, devicetree@vger.kernel.org, c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, green.hu@gmail.com, palmer@sifive.com Subject: Re: [PATCH V5 06/30] csky: Cache and TLB routines Message-ID: <20180927090134.GG5254@hirez.programming.kicks-ass.net> References: <7cd7abcd2acf5c61435589338ff80a75a13173ca.1537789737.git.ren_guo@c-sky.com> <20180925072407.GA6999@hirez.programming.kicks-ass.net> <20180927052737.GA28407@guoren> <20180927070859.GC5254@hirez.programming.kicks-ass.net> <20180927081138.GA308@guoren> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180927081138.GA308@guoren> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 04:11:42PM +0800, Guo Ren wrote: > On Thu, Sep 27, 2018 at 09:08:59AM +0200, Peter Zijlstra wrote: > > That's not what I meant; I meant you need something like: > > > > #define flush_cache_range(vma, start, end) cache_wbinv_range(start, end) > If you remove the tlb_start_vma in my tlb.h, I want to use cache_wbinv_all() is > more safe. And I'll improve it in future. > > My cache_wbinv_range(start, end) won't care vma->mm's asid and they just use current > asid in mmu reg. If current_mm != vma->mm, then flush_cache_range will be broken. > Perhaps, I need improve flush_cache_range first ... Ah, ok. In that case I'll leave it to you to either use cache_wbinv_all() or improve the range flush. My only request would to stick on a comment to explain the reason you're not using cache_wbinv_range() if you choose to use cache_wbinv_all() for flush_cache_range(). Thanks!