From patchwork Fri Jun 1 12:39:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chintan Pandya X-Patchwork-Id: 10443243 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 C5D6B602BD for ; Fri, 1 Jun 2018 12:41:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B681328C0E for ; Fri, 1 Jun 2018 12:41:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA74E28C28; Fri, 1 Jun 2018 12:41:21 +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 0AB0E28C0E for ; Fri, 1 Jun 2018 12:41:21 +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=B3SK3pHkVhrtXqPQnNlER1aOkAUBEK/nMWIT8ItZbBM=; b=Pvd2z0zFsY4LUPBU5uOtumlen8 P3RS4w/oFTxOMZ1bKlybUZqRJgwvuPsq4k+fR9AfRIQ3jbvGeVLgKThw/sb1QG3cJB4uRujscu4TF +MQvGrxrKJgNglsWrTLOrDJZ2L9nv+mO95D5V5dm+hM0TKYpBdAMHBG4XSVzxFjkANJSMNW+SMIT5 Kj0+ixeD/be38MEZA6NGps8OtNLPQdVEppWt0T1wz/lFyXXye9YCsIZOEp+YUD4fm0czYCBte8PGW 9r5ynvS/++ClQ9/jOn7Rc9I/Saw0k8WiX8ma1NoV3258PiYyD6WZVUhPKppIdixBYZIWzMSiiwo1D 1qSY1P1Q==; 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 1fOjMi-0003Vg-Df; Fri, 01 Jun 2018 12:41:08 +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 1fOjLX-0001gJ-8A for linux-arm-kernel@lists.infradead.org; Fri, 01 Jun 2018 12:40:12 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D9A3360249; Fri, 1 Jun 2018 12:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527856787; bh=e44tfVl7ZnxDs0fIXC4yWnJ0yJ9ozZjdivargEJjMDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DcBLZNmq/KORG45bB6rr3StbdGvcq7YB52PiCNsnNN+TUBpudorjS5awvWEitRIKq K5lHNdPMZddhbeCLmk4xSwHRL3hDiVJf4F0QUIp2e7aKaxd4EhtvyrcFxSH480I7pA Y3g5YnenubfMr7l1QeSCHppHTV4ElRs6JA+3qjzY= 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 6EA02607E2; Fri, 1 Jun 2018 12:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527856787; bh=e44tfVl7ZnxDs0fIXC4yWnJ0yJ9ozZjdivargEJjMDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DcBLZNmq/KORG45bB6rr3StbdGvcq7YB52PiCNsnNN+TUBpudorjS5awvWEitRIKq K5lHNdPMZddhbeCLmk4xSwHRL3hDiVJf4F0QUIp2e7aKaxd4EhtvyrcFxSH480I7pA Y3g5YnenubfMr7l1QeSCHppHTV4ElRs6JA+3qjzY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6EA02607E2 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@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, akpm@linux-foundation.org Subject: [PATCH v12 3/5] arm64: pgtable: Add p*d_page_vaddr helper macros Date: Fri, 1 Jun 2018 18:09:16 +0530 Message-Id: <1527856758-27169-4-git-send-email-cpandya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1527856758-27169-1-git-send-email-cpandya@codeaurora.org> References: <1527856758-27169-1-git-send-email-cpandya@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180601_053955_335684_6FFD9D6B X-CRM114-Status: GOOD ( 10.76 ) 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: Chintan Pandya , linux-arm-kernel@lists.infradead.org, toshi.kani@hpe.com, linux-kernel@vger.kernel.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 helper macros to give virtual references to page tables. These will be used while freeing dangling page tables. Signed-off-by: Chintan Pandya --- arch/arm64/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 7c4c8f3..ef4047f 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -580,6 +580,9 @@ static inline phys_addr_t pgd_page_paddr(pgd_t pgd) #endif /* CONFIG_PGTABLE_LEVELS > 3 */ +#define pmd_page_vaddr(pmd) __va(pmd_page_paddr(pmd)) +#define pud_page_vaddr(pud) __va(pud_page_paddr(pud)) + #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) /* to find an entry in a page-table-directory */