Received: by 10.192.165.148 with SMTP id m20csp540326imm; Fri, 27 Apr 2018 03:30:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr6RRm/yL7qxEFNyDk9NAQUeGcmvfNE3wiVpuDCohuNwEpELAbwKN9MP/q/4I89vMquZ4I5 X-Received: by 10.98.139.146 with SMTP id e18mr1720779pfl.60.1524825030723; Fri, 27 Apr 2018 03:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524825030; cv=none; d=google.com; s=arc-20160816; b=oaCYjQnUo3DWpP+fLUEOiX8nsvsu5rHBw2zOEoFgrWUOYL+oa5da/siYOM+jZJQkl5 7fHnZ7FZ/xpODx+pxnOQ0VfiXZsFI+g3ybavt/T+UwyhQXMJ5Z+kMcZOMLi7XCHygRxc Srhw/QnIHCpsIKk5eqVxAhwbFESJQa7jlGcuPPLp+FsAxr3bciW1Jp4tTWeoeun4vJMB VNccSkEQPq0y+3WIg8HUPM9/MXiiBweKCNKI4H1iXBWXqLszWRrq2IHgHEqbXcmE3CaV CeiDzkz/gj4nidw+BbEhzLLBtTMJlGucpSqHfqxkf3wMN2/IoFemkJ9Nurf/ZRCk7dzW DTkw== 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:arc-authentication-results; bh=ZQpUvBqyuA6DAt8wRiAv6A7+tDPlESZxhWNuj1pDMYo=; b=D2TwC28bcbL+tzG3lSyGp5k8QDOBELiIKWCNqrWAlGgOVw2E4p5qcrzBZCYMHqWd26 U2SluT83F+pyiJ37AY7u/D142YGjwnbt3tXBZzmrPD/OPDRfVgdoQ7zYQ3Mt/a0fTOOU khHqWu+HsXpPDxesOWG48lePUo5Dxf71Ce6ezQHiXlj++Nlnmxys7s0NP+79DmbfbBns EtkBnGq3UkU9jA1ZemW8Jw6pnrauuFA+kJnPLJ9oAEstSn7Xs32N3ErooiaiAAallXHg /QDjaLV/sVfUFodQ+X2JYKUdLrtW0s82nTCtSBgPZVWCDOjv6RiSMCGi7D0q/NHX17Bq Y/5g== 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 r2-v6si1023567pli.370.2018.04.27.03.30.16; Fri, 27 Apr 2018 03:30:30 -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 S1757967AbeD0K3I (ORCPT + 99 others); Fri, 27 Apr 2018 06:29:08 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:38222 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757609AbeD0K3G (ORCPT ); Fri, 27 Apr 2018 06:29:06 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5D24215AD; Fri, 27 Apr 2018 03:29:06 -0700 (PDT) Received: from armageddon.cambridge.arm.com (armageddon.cambridge.arm.com [10.1.206.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B26FF3F487; Fri, 27 Apr 2018 03:29:03 -0700 (PDT) Date: Fri, 27 Apr 2018 11:29:01 +0100 From: Catalin Marinas To: Chintan Pandya Cc: will.deacon@arm.com, mark.rutland@arm.com, toshi.kani@hpe.com, linux-arch@vger.kernel.org, arnd@arndb.de, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, kristina.martsenko@arm.com, takahiro.akashi@linaro.org, james.morse@arm.com, tglx@linutronix.de, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v8 2/4] arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable Message-ID: <20180427102900.4e63lo4eksk23vtn@armageddon.cambridge.arm.com> References: <1522742446-5084-1-git-send-email-cpandya@codeaurora.org> <1522742446-5084-3-git-send-email-cpandya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522742446-5084-3-git-send-email-cpandya@codeaurora.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 03, 2018 at 01:30:44PM +0530, Chintan Pandya wrote: > Add an interface to invalidate intermediate page tables > from TLB for kernel. > > Signed-off-by: Chintan Pandya > --- > arch/arm64/include/asm/tlbflush.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h > index 9e82dd7..6a4816d 100644 > --- a/arch/arm64/include/asm/tlbflush.h > +++ b/arch/arm64/include/asm/tlbflush.h > @@ -209,6 +209,12 @@ static inline void __flush_tlb_pgtable(struct mm_struct *mm, > dsb(ish); > } > > +static inline void __flush_tlb_kernel_pgtable(unsigned long addr) > +{ > + addr >>= 12; > + __tlbi(vaae1is, addr); > + dsb(ish); > +} > #endif Please use __TLBI_VADDR here as it does some additional masking. -- Catalin