From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752203AbcDOPRJ (ORCPT ); Fri, 15 Apr 2016 11:17:09 -0400 Received: from foss.arm.com ([217.140.101.70]:50331 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbcDOPRF (ORCPT ); Fri, 15 Apr 2016 11:17:05 -0400 Date: Fri, 15 Apr 2016 16:17:04 +0100 From: Will Deacon To: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, marc.zyngier@arm.com, christoffer.dall@linaro.org, mark.rutland@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Steve Capper Subject: Re: [PATCH v2 04/17] arm64: Introduce pmd_thp_or_huge Message-ID: <20160415151703.GP22906@arm.com> References: <1460640065-27658-1-git-send-email-suzuki.poulose@arm.com> <1460640065-27658-5-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460640065-27658-5-git-send-email-suzuki.poulose@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 14, 2016 at 02:20:52PM +0100, Suzuki K Poulose wrote: > Add a helper to determine if a given pmd represents a huge page > either by hugetlb or thp, as we have for arm. This will be used > by KVM MMU code. > > Suggested-by: Mark Rutland > Cc: Catalin Marinas > Cc: Steve Capper > Cc: Will Deacon > Acked-by: Christoffer Dall > Signed-off-by: Suzuki K Poulose > --- > arch/arm64/include/asm/pgtable.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index 989fef1..dda4aa9 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -290,6 +290,8 @@ static inline pgprot_t mk_sect_prot(pgprot_t prot) > #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) > #define pmd_mknotpresent(pmd) (__pmd(pmd_val(pmd) & ~PMD_TYPE_MASK)) > > +#define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd)) Acked-by: Will Deacon Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v2 04/17] arm64: Introduce pmd_thp_or_huge Date: Fri, 15 Apr 2016 16:17:04 +0100 Message-ID: <20160415151703.GP22906@arm.com> References: <1460640065-27658-1-git-send-email-suzuki.poulose@arm.com> <1460640065-27658-5-git-send-email-suzuki.poulose@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, marc.zyngier@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu To: Suzuki K Poulose Return-path: Content-Disposition: inline In-Reply-To: <1460640065-27658-5-git-send-email-suzuki.poulose@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu List-Id: kvm.vger.kernel.org On Thu, Apr 14, 2016 at 02:20:52PM +0100, Suzuki K Poulose wrote: > Add a helper to determine if a given pmd represents a huge page > either by hugetlb or thp, as we have for arm. This will be used > by KVM MMU code. > > Suggested-by: Mark Rutland > Cc: Catalin Marinas > Cc: Steve Capper > Cc: Will Deacon > Acked-by: Christoffer Dall > Signed-off-by: Suzuki K Poulose > --- > arch/arm64/include/asm/pgtable.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index 989fef1..dda4aa9 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -290,6 +290,8 @@ static inline pgprot_t mk_sect_prot(pgprot_t prot) > #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) > #define pmd_mknotpresent(pmd) (__pmd(pmd_val(pmd) & ~PMD_TYPE_MASK)) > > +#define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd)) Acked-by: Will Deacon Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Fri, 15 Apr 2016 16:17:04 +0100 Subject: [PATCH v2 04/17] arm64: Introduce pmd_thp_or_huge In-Reply-To: <1460640065-27658-5-git-send-email-suzuki.poulose@arm.com> References: <1460640065-27658-1-git-send-email-suzuki.poulose@arm.com> <1460640065-27658-5-git-send-email-suzuki.poulose@arm.com> Message-ID: <20160415151703.GP22906@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Apr 14, 2016 at 02:20:52PM +0100, Suzuki K Poulose wrote: > Add a helper to determine if a given pmd represents a huge page > either by hugetlb or thp, as we have for arm. This will be used > by KVM MMU code. > > Suggested-by: Mark Rutland > Cc: Catalin Marinas > Cc: Steve Capper > Cc: Will Deacon > Acked-by: Christoffer Dall > Signed-off-by: Suzuki K Poulose > --- > arch/arm64/include/asm/pgtable.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index 989fef1..dda4aa9 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -290,6 +290,8 @@ static inline pgprot_t mk_sect_prot(pgprot_t prot) > #define pmd_mkyoung(pmd) pte_pmd(pte_mkyoung(pmd_pte(pmd))) > #define pmd_mknotpresent(pmd) (__pmd(pmd_val(pmd) & ~PMD_TYPE_MASK)) > > +#define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd)) Acked-by: Will Deacon Will