From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by kanga.kvack.org (Postfix) with ESMTP id 7032E6B026F for ; Wed, 6 Apr 2016 02:58:11 -0400 (EDT) Received: by mail-wm0-f53.google.com with SMTP id u206so31906531wme.1 for ; Tue, 05 Apr 2016 23:58:11 -0700 (PDT) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com. [2a00:1450:400c:c09::241]) by mx.google.com with ESMTPS id in5si1617421wjb.155.2016.04.05.23.58.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2016 23:58:10 -0700 (PDT) Received: by mail-wm0-x241.google.com with SMTP id i204so10399575wmd.0 for ; Tue, 05 Apr 2016 23:58:10 -0700 (PDT) Date: Wed, 6 Apr 2016 08:58:06 +0200 From: Ingo Molnar Subject: Re: [PATCH 10/10] arch: fix has_transparent_hugepage() Message-ID: <20160406065806.GC3078@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Hugh Dickins Cc: Andrew Morton , "Kirill A. Shutemov" , Andrea Arcangeli , Andres Lagar-Cavilla , Yang Shi , Ning Qu , Arnd Bergman , Ralf Baechle , Vineet Gupta , Russell King , Will Deacon , Michael Ellerman , "Aneesh Kumar K.V" , Martin Schwidefsky , Gerald Schaefer , David Miller , Chris Metcalf , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org * Hugh Dickins wrote: > --- a/arch/x86/include/asm/pgtable.h > +++ b/arch/x86/include/asm/pgtable.h > @@ -181,6 +181,7 @@ static inline int pmd_trans_huge(pmd_t p > return (pmd_val(pmd) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE; > } > > +#define has_transparent_hugepage has_transparent_hugepage > static inline int has_transparent_hugepage(void) > { > return cpu_has_pse; Small nit, just writing: #define has_transparent_hugepage ought to be enough, right? In any case: Acked-by: Ingo Molnar Another nit, this: > --- a/include/asm-generic/pgtable.h > +++ b/include/asm-generic/pgtable.h > @@ -806,4 +806,12 @@ static inline int pmd_clear_huge(pmd_t * > #define io_remap_pfn_range remap_pfn_range > #endif > > +#ifndef has_transparent_hugepage > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > +#define has_transparent_hugepage() 1 > +#else > +#define has_transparent_hugepage() 0 > +#endif > +#endif Looks a bit more structured as: #ifndef has_transparent_hugepage # ifdef CONFIG_TRANSPARENT_HUGEPAGE # define has_transparent_hugepage() 1 # else # define has_transparent_hugepage() 0 # endif #endif BYMMV. Thanks, Ingo -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org