Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp253473pxf; Wed, 31 Mar 2021 23:39:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWV03411jVoFNFss08vN3AAkf0u0tBGFoUn24tsmRcw1m0zsfu4kJ96X8I663KNA1u+51r X-Received: by 2002:a17:906:aac5:: with SMTP id kt5mr7781993ejb.548.1617259139888; Wed, 31 Mar 2021 23:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617259139; cv=none; d=google.com; s=arc-20160816; b=Mzn8x7nHmp3J2AOC5l3KrAOLRgsZOVThYp2+3wnYCwKcmy50Qj5qPUo44GV/GILptC ss3SORVfRXWtSYLLTeslO53LD4EqbTZ5HjzwFvsOZ9JJFCFj4vgOtHCWTuU9yA/GTNde I8uVqoJ+UMfIBBUNhEUZTAwVyv3nAHqiLZywyughfJvMKb8uxtNoOyKOvFMGkeiWiynl 7BNCqaO091YvuhppFJ9mv3HgGuCvEcT9uLR7yj34KH5pJ2Mg1QxzkF1h35TmqH3R+wQS ZjlKWV39KOnZCGtGQe6lDIUbWZRnakZddSx6ko1j+AWqNK3TqlntheECx0zk1RaCu/Eu JIqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UnDsqWuvOuHdfoPwQZfisLiRixlJIZ0mZK0rwiZPBp4=; b=N3Oe9siqCzTFgi3R53I9QtoN4yNU03rJdfJIhi924iiyBdNnZimHj9Cp22i8D4DpFS wmcYqbBvivF3ViP7AnTEEgmVWDC8C2wnB2O0Erv/zHQgXZ0Nmc6x2BX1TPaiu49q2gTK 5DmolQ9d7Non7ePrBqJXKSqBOZ2g42H/VLzfWYCicH6QwyiYo6rJAbtbC4ZwCQZOGRd1 hOBKLZJnpW3w9bA3WVZPi33r0pMcC+/MJOuzwfMOanCc6yp/o7/NSSy31y5Op+GB+gMu CXK2cnLQzmCuYSld5i92tT4cUlHZqVJKTmtvHkkjnB1q7RTBN47CQj0M4bOh4W/oxcEV eTJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SeItDScD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds18si3609779ejc.311.2021.03.31.23.38.37; Wed, 31 Mar 2021 23:38:59 -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=pass header.i=@infradead.org header.s=casper.20170209 header.b=SeItDScD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233190AbhDAGhk (ORCPT + 99 others); Thu, 1 Apr 2021 02:37:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbhDAGhg (ORCPT ); Thu, 1 Apr 2021 02:37:36 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39860C0613E6 for ; Wed, 31 Mar 2021 23:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=UnDsqWuvOuHdfoPwQZfisLiRixlJIZ0mZK0rwiZPBp4=; b=SeItDScDzhSk2FeB9nhoeHpmMQ FBuWTRohENB5eGO7fbkSTwV4gkO3YRWGqoAna5JxXiM1HIoPtwoR2ZU8k1rv79Xf1jXKjTDJqyU2s YnqWzS/O8iSgduV7PVWtbbczvwuWyxihagsNNeOD5JeHosFoo90yGpm9fJfcw3Nb1DOfTAyrqdG6K tUia+hUBgVON7cFLNbJANP9SdrVz4gC4/m3ksuGbhfc36f1kphPMARvOhfZJQcXeN/N0oxlaRdcOC nvt9q/5/hV7qps0n6k7ad/ZR6dBLkXp9mlMV6dMWoQ1wO17Ne0i5LIUInFVgy7gLZdtkfS5tOOumu l3sWMCiQ==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lRqx1-005ibZ-0P; Thu, 01 Apr 2021 06:37:10 +0000 Date: Thu, 1 Apr 2021 07:37:07 +0100 From: Christoph Hellwig To: Jiuyang Liu Cc: Alex Ghiti , Andrew Waterman , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrew Morton , Geert Uytterhoeven , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] implement flush_cache_vmap and flush_cache_vunmap for RISC-V Message-ID: <20210401063707.GA1362465@infradead.org> References: <20210329015510.44110-1-liu@jiuyang.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210329015510.44110-1-liu@jiuyang.me> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 01:55:09AM +0000, Jiuyang Liu wrote: > +/* > + * flush_cache_vmap and flush_cache_vunmap might modify PTE, needs SFENCE.VMA. > + * - flush_cache_vmap is invoked after map_kernel_range() has installed the page table entries. > + * - flush_cache_vunmap is invoked before unmap_kernel_range() deletes the page table entries > + */ Please never ever write comments > 80 chars. And please read the coding style document.