From patchwork Fri Jun 16 11:08:26 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: 13282635 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 16819EB64DA for ; Fri, 16 Jun 2023 11:10:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A96586B0082; Fri, 16 Jun 2023 07:10:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A47AE8E0001; Fri, 16 Jun 2023 07:10:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E72E6B0085; Fri, 16 Jun 2023 07:10:46 -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 79C286B0082 for ; Fri, 16 Jun 2023 07:10:46 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 544D3160B9A for ; Fri, 16 Jun 2023 11:10:46 +0000 (UTC) X-FDA: 80908343292.28.623477F Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf15.hostedemail.com (Postfix) with ESMTP id DF675A001C for ; Fri, 16 Jun 2023 11:10:43 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=U6yWGXqb; spf=pass (imf15.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686913844; a=rsa-sha256; cv=none; b=5mVFILZshWqSll18DZDWGXNya2l7QgsNOtPGICrrCneMpWzJoXn9tbyVAppyNdi/FADFLr YdkQNoJXZRphiNRvbXdLXXnDZuMMIEvlTlAtoXRJFn2X2rFV1cPb8ECiz61SU2uJgitzur lnRk1gBoD82QbBLNaIawVyADngFeWGE= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=U6yWGXqb; spf=pass (imf15.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=1686913844; 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=bXy7ekEYr/1/XXHTn4mE4T1FXjOwT918/Sm/a9WdL+I=; b=kWunxtlI8DcEF36lnSkeoweLyBIK5S/EO9yDuZHpcAQJVLcG4+n50PK8Xa8/xJEa1D/uIM C3anK16Mbugn6SBwVuGQg34ih7ilyDRLgHABOmQ2Wlq8z/CHi7CbkZ8FlJ227zAaqdCQNx ZjQHsPO6eO/JaNWMVezpOG02ZwkBU/8= Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35GAkmR3025344; Fri, 16 Jun 2023 11:10:33 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=bXy7ekEYr/1/XXHTn4mE4T1FXjOwT918/Sm/a9WdL+I=; b=U6yWGXqbZRjUIJV8uncRffYTjkSu4/gM8Y4u+y0OPal6BSAnuqI7p34WAEeAD3zTzZkC sdL2SCJz9cd20jxSm7Q7j3IVoeiSc0MbBkhQ4jfosqbaLpcZyE8D+S6he34WSjBo2MaG lymBcQCwOqqtk5iqXx5NwEQ930V79im2pcceEjAeujvKgy0IujJ/vHrgvj6/rL6sXHSI EylFtGAF1S2pobV1GguGos9qe6Gnnom5tHKOtZg+Dwek0n0/TiqVtrmrc4G3HmTwTkSE clY7NMgzRYoeLMVXhl7O1trs3dm16XfP7Rar0RXoFeInxspdqP7Lb+mG8ooQC3IBh4g3 aw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r8p9nghj8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Jun 2023 11:10:33 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 35GAmUQI028781; Fri, 16 Jun 2023 11:10:32 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r8p9nghhg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Jun 2023 11:10:32 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 35GASRwG014515; Fri, 16 Jun 2023 11:10:31 GMT Received: from smtprelay06.wdc07v.mail.ibm.com ([9.208.129.118]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3r4gt5yk3k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Jun 2023 11:10:31 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay06.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 35GBAUrH55050544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Jun 2023 11:10:30 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFFEE58058; Fri, 16 Jun 2023 11:10:29 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CCD8A58059; Fri, 16 Jun 2023 11:10:23 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.52.24]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Fri, 16 Jun 2023 11:10:23 +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 v2 16/16] powerpc/book3s64/radix: Remove mmu_vmemmap_psize Date: Fri, 16 Jun 2023 16:38:26 +0530 Message-Id: <20230616110826.344417-17-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230616110826.344417-1-aneesh.kumar@linux.ibm.com> References: <20230616110826.344417-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: titP5Y9RHzu9FpseHNpM75xHP-h2c8Jw X-Proofpoint-ORIG-GUID: H2GG3xTaqP7O8WKpAjaaLvyyiU854HaF 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-06-16_07,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 bulkscore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 suspectscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306160099 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: DF675A001C X-Stat-Signature: gpoibmygsxujueyq9oxiaijfkap9ug6a X-Rspam-User: X-HE-Tag: 1686913843-339486 X-HE-Meta: U2FsdGVkX197piTDqVL87Wox0rLuWEihL2dIAOENP92ATmFaG3SmYzslxAfQKCY6SLEk6ZG0ttql7FQYi8HJafVwMn8ZW5kacA13l7oFeJ0HCJJCLYxkis+F5Z58J63BmcN7yVLlquglhqeH33RgafGQwZ7+4jQ0hgvkfd3mdkYNq71K/OAiehAdV/P0aKcaeJECK3Zys/tftUMgM1C01SPGnCXimZzSLDtPh1N2w49+42QkNMreMRxpJDefPzM4izPEn57+LIb8oZAudzcqYpJ1GaOxY1m3+Km5dWXwF1AStinSwjmdtcl5sH5xNkAjAp2bwK8AEDXpW6k/F/3op0PlxEcQvWXhWyNWxEPtqJ4mBCeUAYIpGqUwZATHTwSKH/XBoWSAOnCDoYYsR0JKHAvNzNomYKbZCtT1WL9iY+9qLU2D9WQsQu5KwiseKDTlBnsmuLEzEn69MOKQnNpOQYzi/PvKjzyiWA55i8moTQzLrcxX7X+ju/S3pM9enrM7fG1LpCG5aILHh7f+xDZrN2RDJC+vTPHw5CvzKcVpYq5HltbETJjSM+L5MPq3SAfEtdLa2dhLf0tq1WcQjKw1kOZ950Elm4Y6A3rvWISBkDouU6iU3G0rV+ifRbwuu8rvHMlGL3XFC24i+cRmOWJjRCxqpYeP5Bmn3zPfbhlcS6PtKqD3eAR2DI/83KlGI/GytVlz1vr1TueYtrQMezh7NlrDclPRyq3U2mvX4QFCjvYYs2l5c9sYQT73ip0fY0vtsThcA4sLFpAbgWlOE7Ag9AeM8ALmPvpCcMcKblclTz1kVAqMUAMqBoSaC+apSQjWYhQwTad52wdleyT6lDd6mJTKimXFIzkFOTstK8mhsbwBGO5Xr+mSdmFvjty+nBMv+/Zthoun0DQBmk7Cm0cJiYbRpD9h97vyPqCfzaVNhlsRC1iA2TT+83sj1CCddJwTqbJOezKQpwYDR7TZRCy eGZtDBcr O9nj2BtJ28mnjCi88AC9foXxxOtY7COmv9DuqCehi6G5ozCR/T/vE+xhxb5yCNrhVqQeoyaTmOUqk/k0Z1ZR2INAE995vcouivoHq1bS8puJfbEvomNtz5D3+EtCQB1aTfL8jTcJ5n1fvoTI1hijf22U6s96+fQ8cEJdxS6rW+rAPpX4CM5pHjHO1enC4FGBFAly1 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 | 10 ---------- arch/powerpc/mm/init_64.c | 21 ++++++++++++++------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c index f0527eebe012..d57b4f5d5cb3 100644 --- a/arch/powerpc/mm/book3s64/radix_pgtable.c +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -601,16 +601,6 @@ void __init radix__early_init_mmu(void) 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 /* * 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) {