Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1893913imm; Thu, 27 Sep 2018 04:21:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV60i/IduG1JtJgT+Vv5fDBUdEXUvjTXN26846sXMwOq4yoQW+5+jt9Jsmndp9Yq/GGuX52Ya X-Received: by 2002:a17:902:7109:: with SMTP id a9-v6mr10747551pll.310.1538047266684; Thu, 27 Sep 2018 04:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538047266; cv=none; d=google.com; s=arc-20160816; b=cf3uSEufSaqtNKo01m7hILJtc3kXG38gQhNuiU4QQlPvjzjeKg0oqjZG/bme8xeP69 j7pYTevXKG+hIz2Ai5HDsNaAWqlC1sgOCZf3HMoLT7Z7kM6PKdgAcEpxjtIABo7jO/42 NT4QI7ICgQKLczzSvit1c79xO4OWqub0EbOWHJEARbE0BpfmsuzH3ZAz8rllfeon8RJI RyaLLUEWFQ8q48medioLxPr3195zaKFLyzUSSUNWUFNuRrCVx4iBjfKjxvA+U9Cvajup DdaatBol93l7d7c4Qr/WRa/u+IjZUKhk64mEul14sMrdJWRBP5SV+6K+8UzDFuqqLBcE Km4g== 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; bh=pwhw+BpTuUgyf00QJ6KgaENoC8xRYL+qcFSfUgzjl54=; b=tOEF8v2ZaK+FHFlQnbBQkLrOx9RmLWq8ZrwOFCw1yiXmgPG2Z8s/X0IggiPmzZN35d KHIgYDRrCfw6RSpGsKmFpiDKhX0Kz+VrVmCTsfCktFlRHcgJe+gWkDMGUyNeUEurtnsi CvpFahUJFfYmlNM5WJqcvBaSPveh0zLqcjM91RZGYDjJIqnbTFwxF9ALC7IjOo3Sd/Jz vwCBKf5Vu4ti1JWlxg3V/HtRCf1Yv81P/3aQwRGH8jknQcpJotDVYv17bxQpAP7LstKJ OyQ2venCmd0Tlt8SU8l4bIiKSNSes+ujciXDM7qDYy2RT3Ah/7jZTF+ZQJ7uvNv7XErK 12qA== ARC-Authentication-Results: i=1; mx.google.com; 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 r12-v6si1784596pgg.209.2018.09.27.04.20.51; Thu, 27 Sep 2018 04:21:06 -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; 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 S1727474AbeI0Ri0 (ORCPT + 99 others); Thu, 27 Sep 2018 13:38:26 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:48459 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727105AbeI0RiZ (ORCPT ); Thu, 27 Sep 2018 13:38:25 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.08068142|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03295;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=20;RT=20;SR=0;TI=SMTPD_---.CwXstet_1538047199; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.CwXstet_1538047199) by smtp.aliyun-inc.com(10.147.44.145); Thu, 27 Sep 2018 19:20:00 +0800 Date: Thu, 27 Sep 2018 19:19:59 +0800 From: Guo Ren To: Peter Zijlstra 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: <20180927111959.GA20967@guoren-Inspiron-7460> 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> <20180927090134.GG5254@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180927090134.GG5254@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) 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 11:01:34AM +0200, Peter Zijlstra wrote: > 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(). Ok, the comment is necessary and I'll do it in next patchset. Best Regards Guo Ren