Received: by 10.192.165.148 with SMTP id m20csp659166imm; Fri, 27 Apr 2018 05:32:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoVi3hc85tQXz/mIGUsxkG1LeTnkQ6gSbw9vQjA0GJZNZVrEGcWXjGYZWx3Ny//aX8PHOLO X-Received: by 2002:a65:45c6:: with SMTP id m6-v6mr2031372pgr.244.1524832362777; Fri, 27 Apr 2018 05:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524832362; cv=none; d=google.com; s=arc-20160816; b=cYJJCieH5Pk12Z8FQDD9smiuy9BxRRpcRlOQ7GAwfqf+DwSxI0i3BKlybEsDr/B4pf 39iapBeRfOJXzGVkWOhXKkKsEraucWHNQjLY1J4Mq4rlbt+hBQzZhZ8xAPMpkeuaFNeX nIP5JWV49lCY7ON+N4eNJfq0MJoaSLky+DssbnqV8XLHfYmuUPQD0gKpDgB3dakZS8Wz Xwr6x0gaAjSE5NGzBitag0OFmkV+V6VCTyd57pNG9QxZ1Qn8Wto9LpOWvVIKy4z64RwW MC03du5HhCMbYFPiO9rdfcpyDmIA7Lwno9cGY0kOvCIy2W1kEt2jrF4DU7oXmIAhMT+P 4O8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=gaMfdUArnvWO7+SOnsRpOZo00oud7eGlEdVLaaYNw90=; b=i9aK3IYEgrjF+tvQrGCQGz40fKcSsW5JbnhYd7KBRuAhZmmHqAQirSulM3sRRZthSv qNAEscPhyRPOQRlD1Ry/ldUNHpw/9JijG57KexK0zeWSZgzFARdl/3OS6y7xuFZUTVrS 8zIcEwDhiJSWFhdVw48zv1XehkKsC5zMqZsqjom/5TapbnVegIUC69QT1s92F5FjzNHC ZN5XRnhoFKvi9XeDQGsgP7Vq0EYViqYft8tImsUV041IFczc9vtmZb0D1X7Bsn10tyNa XeQxHCz5RYg/hvTSTeCaO4BzCLm6UsQNft7V2jM8WYdB3kDVtb7qMRNxRD/w8fwMbqcU 8aow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=UNO30LRf; dkim=pass header.i=@codeaurora.org header.s=default header.b=eHS9sCUD; 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 145-v6si1142286pgd.561.2018.04.27.05.32.14; Fri, 27 Apr 2018 05:32:42 -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=pass header.i=@codeaurora.org header.s=default header.b=UNO30LRf; dkim=pass header.i=@codeaurora.org header.s=default header.b=eHS9sCUD; 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 S1758035AbeD0Mag (ORCPT + 99 others); Fri, 27 Apr 2018 08:30:36 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60124 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757716AbeD0Mad (ORCPT ); Fri, 27 Apr 2018 08:30:33 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 54E1A60452; Fri, 27 Apr 2018 12:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524832232; bh=5Rhbe589JIJC0VI7sH9fHCdpDUUMu7iei2N7xqczLv8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UNO30LRfI+iR6To/oio66AJS8P6NFZg20oSL5gwZIF6yOt2zXRjvzhocYT7GnPgdm 7//TToxb35LckFLxtkGsXSQzcl0DzrXFxbe4gp0GpJQiMPNSc2Z8rSMG2jwsxSLK2l Qwzu2LWCe5imLdgyDjyaA1LIfhpLQohjRXX95HO8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.109] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E5CB66034E; Fri, 27 Apr 2018 12:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524832231; bh=5Rhbe589JIJC0VI7sH9fHCdpDUUMu7iei2N7xqczLv8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=eHS9sCUDk1j/9PBpPwmjMl49yKmC8fK00eiX+tG/WomgHAIc+bw/FY6/3tG77Oake jC7/vY5uZ0N4KFkHteaSd50mIqfcyfeI9YXDF0kzowZG4gbjaUyHd6uV3YvBLBRyV9 SauCwEwSE4j1aiOHsGwcNWVejIFB+bvIBp5xUbvE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E5CB66034E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org Subject: Re: [PATCH v8 2/4] arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable To: Catalin Marinas 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 References: <1522742446-5084-1-git-send-email-cpandya@codeaurora.org> <1522742446-5084-3-git-send-email-cpandya@codeaurora.org> <20180427102900.4e63lo4eksk23vtn@armageddon.cambridge.arm.com> From: Chintan Pandya Message-ID: <26d3696d-a298-fe1b-c686-0f12ea94d5a6@codeaurora.org> Date: Fri, 27 Apr 2018 18:00:22 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180427102900.4e63lo4eksk23vtn@armageddon.cambridge.arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/27/2018 3:59 PM, Catalin Marinas wrote: > 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. > Sure. Chintan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project