From patchwork Thu Jul 6 08:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 13303385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAB89EB64DD for ; Thu, 6 Jul 2023 08:59:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6919E8E0002; Thu, 6 Jul 2023 04:59:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 644058D0001; Thu, 6 Jul 2023 04:59:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E2D68E0002; Thu, 6 Jul 2023 04:59:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3F83C8D0001 for ; Thu, 6 Jul 2023 04:59:50 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0AFD61C8F27 for ; Thu, 6 Jul 2023 08:59:50 +0000 (UTC) X-FDA: 80980589340.29.2FD3494 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf27.hostedemail.com (Postfix) with ESMTP id 988FC40012 for ; Thu, 6 Jul 2023 08:59:47 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=aM1pXunm; spf=pass (imf27.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688633987; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=6kxLrFH9O/dgnOxiwQllt1opEKBmkSY2lqJtQlTEuI8=; b=F2I3nVUcgWD4P/RA8MZWapS5UxezA1ux/pWhSZY9y5b+unZzkSrhVOitiVgUkva0nIntL1 NgNppqT8r133dnxVv9LkKBpcElHqOAl6l4s7SO5IQccaqoQwgOTyi4l/GPXlecRkGTkj5h CK7X9NvtFKPtY6LnL/t3MjKDVkhiKeQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688633987; a=rsa-sha256; cv=none; b=Bdu0ZKLegeY5h5M15zYSsaGD2WbXMN5VVpsxBwetcfbYEbZNK6uD3XXbVqCEcsmHHN7i0a V5o6KEavYkXqMm9lr9LdjMcItzD//zs1afzTn0oCS8rtEIIhA6DI5ZCcX/a8QXKotW2R5f WQE3IoqocGeGvTjpD66QVrItUKFVNDs= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=aM1pXunm; spf=pass (imf27.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3668lcjn027656; Thu, 6 Jul 2023 08:59:37 GMT 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=6kxLrFH9O/dgnOxiwQllt1opEKBmkSY2lqJtQlTEuI8=; b=aM1pXunmJrh1gwpCx6J3gcZns+AA7zOZ2rwspLHOD7dDdCtQz4VWJqqNSALhVh7o4lqY C/9H+6Lbqtwx7gRZleqAauJ3VTrsZlKj1qE9l29VhAcwLxXkUATRiozHE1TPFPlEEXvL T/c6nufLglrpusoAC3wecmfSreaMQWrC60iuTzdjmfAXSgWX0pfqHuP10m9CBrMTeIDu fq5nVUs3Yd6/l16Y1z1S0MDr+yHf9aTSsXU7uU4KXsGBcXfj50aDUuNhwWgsknNxpiBw hdE51QhPjVna5XmSRhjnV9uaJncLBj26pCHqzjVpdoEznSAkuJH0JdTWvjcgKgfeTN1J ow== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rntdpg8ca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 08:59:37 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3668laYu027524; Thu, 6 Jul 2023 08:59:36 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rntdpg8by-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 08:59:36 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3668Y8GK001878; Thu, 6 Jul 2023 08:59:35 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([9.208.130.100]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3rjbs583t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 08:59:35 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3668xYXN55640546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Jul 2023 08:59:34 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A6135805D; Thu, 6 Jul 2023 08:59:34 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9FE9258057; Thu, 6 Jul 2023 08:59:29 +0000 (GMT) Received: from skywalker.in.ibm.com (unknown [9.109.212.144]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 6 Jul 2023 08:59:29 +0000 (GMT) From: "Aneesh Kumar K.V" To: linux-mm@kvack.org, akpm@linux-foundation.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, christophe.leroy@csgroup.eu Cc: Oscar Salvador , Mike Kravetz , Dan Williams , Joao Martins , Catalin Marinas , Muchun Song , Will Deacon , "Aneesh Kumar K.V" Subject: [PATCH v3 12/13] powerpc/book3s64/radix: Remove mmu_vmemmap_psize Date: Thu, 6 Jul 2023 14:28:18 +0530 Message-ID: <20230706085819.827761-13-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706085819.827761-1-aneesh.kumar@linux.ibm.com> References: <20230706085819.827761-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: I6yQXQ_t4WZHt1CiojNjaT6B5BTrhU44 X-Proofpoint-GUID: RPQhsPkU4-f7pY4ofFUewyBBCePrbR4k X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-06_05,2023-07-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 priorityscore=1501 adultscore=0 lowpriorityscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 suspectscore=0 bulkscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307060075 X-Stat-Signature: xkoifea7djn8u13qugwab9o9fs15s9k3 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 988FC40012 X-Rspam-User: X-HE-Tag: 1688633987-474178 X-HE-Meta: U2FsdGVkX1+ozClX/delvCPjx65/Ti05pW5S4UN4qpnlTT5kxpFBekzxqGVKxE7z7lEuXKAEtNA827pW1aZX2zS6S6DtFmvRNZxcbBtOZ6ezZWICCAEiG7p3hchkPyixJ4u1shuK4DLikEOeftREHWObdzRKXctt+Me11p7N1zPYU/596ZPVNYGQW2NSr7yu/4618yuFP6yJT6h+pl5nnLDs/1Oiqwbowpnb02sI+GGIhzMe3c7PEnjecODsmLvwSOybfTz4EqtC98qUfcaWbvl+IG/lbZRwhnNVgeQW3DsQsOF+LWxeQoZjQ5YE3Hd7Yih8itobyuwxkXY0bQGoA9y+ZUDIoMW/jqAxfor2jIJSSv+SsmIY1/7VCT1nwmy+Me5uBq47555YSRWZ3TTeOJIBZMMIDBFYpOa0CbDr9yi3tiB/ZjP7gatJVUomYHcXpy8zbDrvrhPGmeN/MHcmCnnta6svXU+PhbVMbtsLnrGqghIuW+TS5bq8abPiWDaFqfwExW4GkkLEhjyrTf2wSp4nBXqXqdI/VwkGL42AdKHuSliPwQhws4V3LlMcTLdkmcLk9zxcbJKxKZhU5bYczNv69WXBAEJj7ytQWXd7rg2X/ChjXHCcJMaYXaA7fLa1nOWciI+cjFGKZd4q1PxEO/7lyNkqA5pzthlFsHjWvFIytqflHbvSR/lNvmjSn7Uy212Yx/w6rUJnRFlccdH8PvZJ78lJThmVC6XFl1TSPH12Rsv4OvOtjIAyDBxTWFFlIUZhwkC2QMhR6053L2pzWkyyvUg5ba5pu+HiyEcPJSIRseieqQ27DiD4TWooKcM7qVcbdAuxyjVVEjqMZRMA+7PD/TXPFf+OaJmppFZpt3eEQOMEhy5/A/GFDOuQ92kiCZfijTEVZLrDNIPBOrLo79UpxxK4ZVICFkOXncAzy0I6fMxE14gm0YIe8JKZ25OPJJEvyxrRHeJgQgjgah3 BqQwqGHo Rp+72XDK46PZa0lYvPCmbdZUFuEiGAIiALD2GoISUj7yBm/7GQlkZx5QxtwyOah1nHIzJUnIbT0RIcsm+LCCLrOt9ltCvAdK4hXkaK4NLC6uNWbcQiWoNPYF1VP7nlttNbvW4Ba+0SkQDMN6BaqqARy0+Q0FEsYTLgBXPwnCxEV+zKi1P5EcqhzMaWK+i4UGrYhFsTXWb7FST+JaGTEhXO+0sDUzPEDwynomwgRRyg3SYkPAChf8BQbVFsYTWyXuTLxOiuthQOTqrQBDLvfBrI8wDPA== 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: This is not used by radix anymore. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_pgtable.c | 11 ----------- arch/powerpc/mm/init_64.c | 21 ++++++++++++++------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c index c05783466562..dac56c883099 100644 --- a/arch/powerpc/mm/book3s64/radix_pgtable.c +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -601,17 +601,6 @@ void __init radix__early_init_mmu(void) #else mmu_virtual_psize = MMU_PAGE_4K; #endif - -#ifdef CONFIG_SPARSEMEM_VMEMMAP - /* vmemmap mapping */ - if (mmu_psize_defs[MMU_PAGE_2M].shift) { - /* - * map vmemmap using 2M if available - */ - mmu_vmemmap_psize = MMU_PAGE_2M; - } else - mmu_vmemmap_psize = mmu_virtual_psize; -#endif #endif /* * initialize page table size diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 5701faca39ef..6db7a063ba63 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c @@ -198,17 +198,12 @@ bool altmap_cross_boundary(struct vmem_altmap *altmap, unsigned long start, return false; } -int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, - struct vmem_altmap *altmap) +int __meminit __vmemmap_populate(unsigned long start, unsigned long end, int node, + struct vmem_altmap *altmap) { bool altmap_alloc; unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift; -#ifdef CONFIG_PPC_BOOK3S_64 - if (radix_enabled()) - return radix__vmemmap_populate(start, end, node, altmap); -#endif - /* Align to the page size of the linear mapping. */ start = ALIGN_DOWN(start, page_size); @@ -277,6 +272,18 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, return 0; } +int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, + struct vmem_altmap *altmap) +{ + +#ifdef CONFIG_PPC_BOOK3S_64 + if (radix_enabled()) + return radix__vmemmap_populate(start, end, node, altmap); +#endif + + return __vmemmap_populate(start, end, node, altmap); +} + #ifdef CONFIG_MEMORY_HOTPLUG static unsigned long vmemmap_list_free(unsigned long start) {