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=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 89044C433E1 for ; Wed, 19 Aug 2020 13:06:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 498C02065F for ; Wed, 19 Aug 2020 13:06:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="F7z3gWr4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 498C02065F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DC3108D0031; Wed, 19 Aug 2020 09:06:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D73008D0025; Wed, 19 Aug 2020 09:06:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C62568D0031; Wed, 19 Aug 2020 09:06:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id ADF3A8D0025 for ; Wed, 19 Aug 2020 09:06:55 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 73A988248068 for ; Wed, 19 Aug 2020 13:06:55 +0000 (UTC) X-FDA: 77167343190.05.duck97_5a12d7927028 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 8D25D1802DE00 for ; Wed, 19 Aug 2020 13:06:38 +0000 (UTC) X-HE-Tag: duck97_5a12d7927028 X-Filterd-Recvd-Size: 5215 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Aug 2020 13:06:37 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07JD6IOI148908; Wed, 19 Aug 2020 09:06:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=O/8ieVRIb2iiDoJ8m1Jo1/01zh2ZjlAYVlpwk0k4cAE=; b=F7z3gWr4cH4EAszUBv0/JMMo9F7KBMNWqtAquI0zXKUFI7vl8YYYUPUFPhxZaAmcDJwh bZqPw5NCXJuF2mQ3aeyFf4XLCj6k7sE9Tp9r/Zcw/ueorl2gUbHn+7GUIjVj+U0DvyEj /8i+yaywhRh0pd5cfDK8t1R0QWSYn3Z2HIqS5xLLTTzj5eHfBbRgoecd4E1D+qrSAGce 7KHFd3WSeeDJvx6TEjzRQ/RdIQdIqLM/5szCHhMyxNuYajIGYRR6oRsJzchoIM684BmY 9PcLxNQJnCNw4LQWkebZKfKvEBEnuxqZSf3amOMK9bY+xfBaRA23jvy/M8BPdMazVnDD eg== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 3304sxcpt4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 09:06:29 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07JCxQPA009193; Wed, 19 Aug 2020 13:01:35 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma03dal.us.ibm.com with ESMTP id 3304ccq3ej-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Aug 2020 13:01:35 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07JD1YS741746880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Aug 2020 13:01:34 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6FFFB2066; Wed, 19 Aug 2020 13:01:34 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B8CEB205F; Wed, 19 Aug 2020 13:01:32 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.102.3.58]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 19 Aug 2020 13:01:32 +0000 (GMT) From: "Aneesh Kumar K.V" To: linux-mm@kvack.org, akpm@linux-foundation.org Cc: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, Anshuman Khandual , "Aneesh Kumar K.V" Subject: [PATCH v2 04/13] mm/debug_vm_pgtables/hugevmap: Use the arch helper to identify huge vmap support. Date: Wed, 19 Aug 2020 18:30:58 +0530 Message-Id: <20200819130107.478414-5-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200819130107.478414-1-aneesh.kumar@linux.ibm.com> References: <20200819130107.478414-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-19_04:2020-08-19,2020-08-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 lowpriorityscore=0 bulkscore=0 phishscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008190115 X-Rspamd-Queue-Id: 8D25D1802DE00 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable 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: ppc64 supports huge vmap only with radix translation. Hence use arch help= er 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 =20 /* 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 @@ -206,7 +206,7 @@ static void __init pmd_huge_tests(pmd_t *pmdp, unsign= ed long pfn, pgprot_t prot) { pmd_t pmd; =20 - if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP)) + if (!arch_ioremap_pmd_supported()) return; =20 pr_debug("Validating PMD huge\n"); @@ -320,7 +320,7 @@ static void __init pud_huge_tests(pud_t *pudp, unsign= ed long pfn, pgprot_t prot) { pud_t pud; =20 - if (!IS_ENABLED(CONFIG_HAVE_ARCH_HUGE_VMAP)) + if (!arch_ioremap_pud_supported()) return; =20 pr_debug("Validating PUD huge\n"); --=20 2.26.2