From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D822C433DF for ; Fri, 21 Aug 2020 08:39:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0E603207DA for ; Fri, 21 Aug 2020 08:39:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E603207DA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 868216B009B; Fri, 21 Aug 2020 04:39:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 81BA16B009C; Fri, 21 Aug 2020 04:39:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 731746B009D; Fri, 21 Aug 2020 04:39:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id 606866B009B for ; Fri, 21 Aug 2020 04:39:31 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 218734DA4 for ; Fri, 21 Aug 2020 08:39:31 +0000 (UTC) X-FDA: 77173926942.25.brick64_300693027037 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id E51871804E3A1 for ; Fri, 21 Aug 2020 08:39:30 +0000 (UTC) X-HE-Tag: brick64_300693027037 X-Filterd-Recvd-Size: 3175 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 08:39:30 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A493A30E; Fri, 21 Aug 2020 01:39:29 -0700 (PDT) Received: from [10.163.67.49] (unknown [10.163.67.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BD0633F66B; Fri, 21 Aug 2020 01:39:27 -0700 (PDT) Subject: Re: [PATCH v2 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support. To: "Aneesh Kumar K.V" , linux-mm@kvack.org, akpm@linux-foundation.org Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org References: <20200819130107.478414-1-aneesh.kumar@linux.ibm.com> <20200819130107.478414-5-aneesh.kumar@linux.ibm.com> From: Anshuman Khandual Message-ID: <16de7c34-4c43-9cb6-adb4-8d218a7b0d2e@arm.com> Date: Fri, 21 Aug 2020 14:08:56 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200819130107.478414-5-aneesh.kumar@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E51871804E3A1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 08/19/2020 06:30 PM, Aneesh Kumar K.V wrote: > ppc64 supports huge vmap only with radix translation. Hence use arch helper > to determine the huge vmap support. > > Signed-off-by: Aneesh Kumar K.V > --- > include/linux/io.h | 12 ++++++++++++ > mm/debug_vm_pgtable.c | 4 ++-- > 2 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/include/linux/io.h b/include/linux/io.h > index 8394c56babc2..0b1ecda0cc86 100644 > --- a/include/linux/io.h > +++ b/include/linux/io.h > @@ -38,6 +38,18 @@ int arch_ioremap_pud_supported(void); > int arch_ioremap_pmd_supported(void); > #else > static inline void ioremap_huge_init(void) { } > +static inline int arch_ioremap_p4d_supported(void) > +{ > + return false; > +} > +static inline int arch_ioremap_pud_supported(void) > +{ > + return false; > +} > +static inline int arch_ioremap_pmd_supported(void) > +{ > + return false; > +} > #endif > > /* > diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c > index 57259e2dbd17..cf3c4792b4a2 100644 > --- a/mm/debug_vm_pgtable.c > +++ b/mm/debug_vm_pgtable.c This would need an explicit inclusion of in order to prevent build failure in some cases. > @@ -206,7 +206,7 @@ static void __init pmd_huge_tests(pmd_t *pmdp, unsigned long pfn, pgprot_t prot) > { > pmd_t pmd; > > - if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP)) > + if (!arch_ioremap_pmd_supported()) > return; > > pr_debug("Validating PMD huge\n"); > @@ -320,7 +320,7 @@ static void __init pud_huge_tests(pud_t *pudp, unsigned long pfn, pgprot_t prot) > { > pud_t pud; > > - if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP)) > + if (!arch_ioremap_pud_supported()) > return; > > pr_debug("Validating PUD huge\n"); >