Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3529249imm; Mon, 4 Jun 2018 05:14:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK8m8oAoTn0WhSPubB0fdj6/0pnHUQeFIiZuDaTSXzUT7xAb7KneJ5mwtJMQPzFrLwoVS8G X-Received: by 2002:a62:5d48:: with SMTP id r69-v6mr17393916pfb.84.1528114477251; Mon, 04 Jun 2018 05:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528114477; cv=none; d=google.com; s=arc-20160816; b=peOGj28H7eNCDXKEODG6wuFXhCzwWl/jEcDxAAmXXntVWtVP7vu7yZPBHX+wrFEUgP C94ReLZmQZPSEB0OEurtfUYc2bYki5uhQjJ1xvJ9p2c/hd2w0mMqkAOvuegUQYWPwK+b MOc4Ib12vnEEkLf7MFSRGsUDWGlat2ANO/MgrdU0h4k18q/0YScSuYK7RUb1RbI2lxis EHGXAP3G8YcBMMUZ7EXwE12kYwSl/G6GqBhgEpUIECmS0aEewfMi7n+NiMM/sXPMUTMf BpOJEsSY3DqWjqeMvgRdlmRa9Ppd60TbS6K+u1k7NoSRCGnvIDbTSaP3iitMNErM3NC6 GN/A== 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=d94HaZopTSMFtESN6DqoLDEQJ/G55e+/CdYe/ZrDIWM=; b=fyhlI2mx7A+fnTpM+bnEw0K6YBKsGTX52NfEEYmP1p1k9xqvDN+4uGTey0vTztl5/P BAmQfPz2OBo++fIsBLpKztZc/LmukHDcg2CZmI9YXGr47OhV6OQ7hcLs+alfxF40BcCp CcXS+qIPIIe86rS2uDgflWE9Y2PzidltqM/T26S6WBE8dOOxGC7Rw5PSQgLz0xdBUsCO HcUG7acVNO7I+bSXBLebeAk+bIA+viJJ/hdGQxhmrkO6aIEK9wePfpkwgMxckaAMRwGr mgZoAlAS9o3F0JnybClUUyU0QDY54Ap8i9YLuWSZkB8ZIHSetUGztm1ZF5jEYaxNdK4A tuaA== 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 z17-v6si3623892pfn.160.2018.06.04.05.14.22; Mon, 04 Jun 2018 05:14:37 -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 S1752857AbeFDMN0 (ORCPT + 99 others); Mon, 4 Jun 2018 08:13:26 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42382 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752733AbeFDMNU (ORCPT ); Mon, 4 Jun 2018 08:13:20 -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 A0CE71435; Mon, 4 Jun 2018 05:13:20 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6FE513F25D; Mon, 4 Jun 2018 05:13:20 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id C5FA01AE1003; Mon, 4 Jun 2018 13:13:51 +0100 (BST) Date: Mon, 4 Jun 2018 13:13:51 +0100 From: Will Deacon To: Chintan Pandya Cc: catalin.marinas@arm.com, mark.rutland@arm.com, akpm@linux-foundation.org, toshi.kani@hpe.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v12 3/5] arm64: pgtable: Add p*d_page_vaddr helper macros Message-ID: <20180604121351.GJ9482@arm.com> References: <1527856758-27169-1-git-send-email-cpandya@codeaurora.org> <1527856758-27169-4-git-send-email-cpandya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527856758-27169-4-git-send-email-cpandya@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 01, 2018 at 06:09:16PM +0530, Chintan Pandya wrote: > 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)) Are these actually needed, or do pte_offset_kernel and pmd_offset do the job already? Will