From patchwork Mon Apr 30 07:41:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chintan Pandya X-Patchwork-Id: 10371025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6165B6032A for ; Mon, 30 Apr 2018 07:43:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5130228775 for ; Mon, 30 Apr 2018 07:43:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E89828947; Mon, 30 Apr 2018 07:43:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A2BC628775 for ; Mon, 30 Apr 2018 07:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=K+uLle5fLKFYD/wWwb4HLPEmAHNorwDkUI2VKCb+so0=; b=CZ2Yu5lFD7zfIdneOSZ+rogywk Oc82o+yJVGbG8GLyXXSj++u+coz29TRHfDHhgHh0EbS1Fj9+KFS7cWCsXtXAReo+WRV07FuxqjJrl 4msnLJpNZfgxLKqymIoNmaopkZU6UwsERgI8WjdCnGq7PmLu9uILUNyirD5175YQzQSydd+5Hn01J 2M9gQR5BOa5eklMuxRmyL/Vz5GOzzSoCz7khYxIhepspGQLGUkJZMmNweTh/tGTKPvsJGsn2sPPrS WCZRqP+POA+NpnQycrYHVU4GbbW7Pp0atvtC770zvpknEc2keaDk9h3rzzif6HvTfiwcR95Mc3pM7 3GfEZVYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fD3TE-0003LA-1h; Mon, 30 Apr 2018 07:43:36 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fD3S8-0002oD-JY for linux-arm-kernel@lists.infradead.org; Mon, 30 Apr 2018 07:42:30 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7308D60F94; Mon, 30 Apr 2018 07:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525074137; bh=/aHwZ/uqbLnb3M+q55cvGM7jbTc9D8hO2GSNyXFVsIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ku79jfWn8MjlgrIGvY5XsFCgBbauCZKt0B3ZUb2BEhrMjSjnBj2MoDh0yD0Fl0C+F Z7gHVwb7nhF2mm+eHYC5ibot/orcU/L2MVdzORkXjDOzSxafJXn15RlnPJSImHjDp+ RnP475bzcNDlzjA9ndBZ2EiVTIgd6FM2S5EVqtsk= Received: from cpandya-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5694460F5C; Mon, 30 Apr 2018 07:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525074130; bh=/aHwZ/uqbLnb3M+q55cvGM7jbTc9D8hO2GSNyXFVsIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZwS5BkKV5hXWQGSYug+E8w6RQ9hNmL2+Gf1boeJOuHG0DhAbNgpQH/LxL7cb22COn a+NVo4UBI+mS5ZEAQH9lmpd7jSg/ec2aQ6i3cys0fx4rwbtUq3dYAmk88AkMZ16Mzu DMTY4YInBr8LgWpNq3twlPUWuVHhpc38oxxfXcmg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5694460F5C 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 From: Chintan Pandya To: Will Deacon , Arnd Bergmann , Mark Rutland , Ard Biesheuvel , Marc Zyngier , Andrew Morton Subject: [PATCH v9 2/4] arm64: tlbflush: Introduce __flush_tlb_kernel_pgtable Date: Mon, 30 Apr 2018 13:11:32 +0530 Message-Id: <1525074094-25839-3-git-send-email-cpandya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525074094-25839-1-git-send-email-cpandya@codeaurora.org> References: <1525074094-25839-1-git-send-email-cpandya@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180430_004228_718940_223E3222 X-CRM114-Status: GOOD ( 11.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Philip Elcan , Chintan Pandya , Toshi Kani , Greg Kroah-Hartman , Joerg Roedel , Dave Hansen , linux-kernel@vger.kernel.org, Kristina Martsenko , Ingo Molnar , James Morse , "H. Peter Anvin" , Thomas Gleixner , Vitaly Kuznetsov , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add an interface to invalidate intermediate page tables from TLB for kernel. Signed-off-by: Chintan Pandya --- arch/arm64/include/asm/tlbflush.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index dfc61d7..a4a1901 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -218,6 +218,13 @@ static inline void __flush_tlb_pgtable(struct mm_struct *mm, dsb(ish); } +static inline void __flush_tlb_kernel_pgtable(unsigned long kaddr) +{ + unsigned long addr = __TLBI_VADDR(kaddr, 0); + + __tlbi(vaae1is, addr); + dsb(ish); +} #endif #endif