From patchwork Mon Jul 10 16:08:41 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: 13307374 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 CEC24EB64D9 for ; Mon, 10 Jul 2023 16:10:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F6428E0008; Mon, 10 Jul 2023 12:10:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A5F98E0001; Mon, 10 Jul 2023 12:10:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56ED48E0008; Mon, 10 Jul 2023 12:10:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 44B708E0001 for ; Mon, 10 Jul 2023 12:10:30 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id ECB2D1401B6 for ; Mon, 10 Jul 2023 16:10:29 +0000 (UTC) X-FDA: 80996189778.02.DABECE6 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf29.hostedemail.com (Postfix) with ESMTP id 6DAF7120018 for ; Mon, 10 Jul 2023 16:10:27 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=CgvRAlcw; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf29.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689005427; 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=Uid4soVR4vf6s+0fcrZuIzbN65q5Imh7atR87IkTTko=; b=hS3YZKjBDy+AISEcXEvPBeoyflQtgJk8cjQdQoz3YZkRRMv/ZfJLoGrulXMymHqB6Jy8az ErbtaNSEIWTfXm+j+5DlSKRDZt2cNKmCI9oJE8Jq4iwVoCFdfa+kMt2fo3AbkPHB+5Tfeq P5pkPN4/UknypJ03MGsjlD1myMuzBms= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=CgvRAlcw; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf29.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689005427; a=rsa-sha256; cv=none; b=TM3A3WzmZxcp2isFJNU+fUBDW+ZRjEUvruSskEOHJJt6RAhEZKIs6GblsfqYHa+RgXOg26 zUWfRh6N8mOAqaiAzlu2kRV4/4BSIIzXjBm79so8REAGKExvXH9GtQ0E1EfNuw1/Jz5DXW k80sX1yKOnaYwtFuO7fjLNvjyAoEnNM= 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 36AG6u0x022271; Mon, 10 Jul 2023 16:10:15 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=Uid4soVR4vf6s+0fcrZuIzbN65q5Imh7atR87IkTTko=; b=CgvRAlcwyba1I197R2EOhpJQIIQVKF+9IGqLiULxMDRskJR9D/inatzkhGOQZ2GPG9J+ rdm+mnfXhmoixwMMQvMbpnD58/0K9DEOviooBXEq72y+M9jM95GjX+T+71dvg+YCjk27 GacmcR0bESDn7l3XaHVIFP+Ax4ysvCTz6lAkX3TWpupX4o1PPl6bQe1uMfJ0k1z48Trj oriBxHPl4hcFuUYxMOWXLP1olwqYRzOg6fx2MJI0OaN8uNwCO8hWb0oOdTXuefA3vRm+ fQcrOWNukJ3Y8FhQDHiE+O4eTj9DYQTjwV3vio+TWt8hQgDy4D0HNVdrUesTShWFsJ2n NA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rrmxh8h4r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jul 2023 16:10:15 +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 36AG6xaN022700; Mon, 10 Jul 2023 16:10:14 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rrmxh8h3t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jul 2023 16:10:14 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36AG0ZUt014443; Mon, 10 Jul 2023 16:10:12 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([9.208.130.101]) by ppma05wdc.us.ibm.com (PPS) with ESMTPS id 3rpye5jnjq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jul 2023 16:10:12 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36AGACGF1376908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Jul 2023 16:10:12 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EBB7458056; Mon, 10 Jul 2023 16:10:11 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 656F85803F; Mon, 10 Jul 2023 16:10:05 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.9.86]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 10 Jul 2023 16:10:05 +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 v4 12/13] powerpc/book3s64/radix: Remove mmu_vmemmap_psize Date: Mon, 10 Jul 2023 21:38:41 +0530 Message-ID: <20230710160842.56300-13-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230710160842.56300-1-aneesh.kumar@linux.ibm.com> References: <20230710160842.56300-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: VUzHjfLKFHgqXDBi2xMZTPUKtkSnUPyD X-Proofpoint-ORIG-GUID: vs491LrjLAIg5rN828IjzCyS8EodEKDd 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-10_12,2023-07-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307100145 X-Rspamd-Queue-Id: 6DAF7120018 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: cwhtkh1fh5oj91r3k38kdw3ssgieqk6n X-HE-Tag: 1689005427-766338 X-HE-Meta: U2FsdGVkX19EyGM+sbUv7dIaUNOx1ExbXzG+1moZxXSJLd31is32duyCAdEtgWMt7oAeyAC6yTFExITum36MsdFW5jJ6+v02iLksFEGes20Nxlp6Zjbi3rOT0YbujdD8jApwBO/+Ua+8MAQxYd0+GbxmVGG4sLnsHGFpZKvY0xgJw6KR8Zvr3Cvw33X4VsNnSs/fVq2ut2/Pbq+oHKJbrXQfKF3fsrN6IBWCeJPY1Psk8U2cayEpykULTNmw2JTdIe2s24ao7d5l8oGI9HjbVtUQCus3ycOZUOk5cSfW3F6nI0cIDGYnYj/eeeh+Uc/jcgakJjr2ykuBm6RKW6TJjlV/JXWANnZd7swHXloFsV5MQ9WojkwvBxFHcy5Kg8PCcY4rwUvhtqeyG8NJIRCPVEz7wIdvjtA6iunpM1Cy/VzpxF9fqy8YOYM2gi7MeZkJZ7HAfyctHAFrOuYJwv8HLh69gwuGKQyNAIGEMvqyFxjoUbFIvMEex3lfwmy3fBbgh87sMbCRinfdsYA/K5XOjw11ZOvBwAixM92fxo/tf0YRuZtGeNYus1h2iFAu8F8UUUJRVCwQqp3scM01AjcMrNw6hPebiEgmePyzTjTxyx6tYhg3kx+9rxXkLn1Lb5CbdedzGcFirZMn4bl0mgTs0pRW0xNdh3qHSeiWXKwkdQNQOvW3/x3HBfj0Zk1Rzq95mMZTuqlrtGsZFm6rrB0KHSwGfBMx/9uqmde+QC6saBdDBsyaP6l7WJGblp8l3+CItBffAFtQdHTx7ers5hRLqqLNgexGzyWKs+zva0Sca394ng1zfeDM46IV7AMtQBPBeZGaDVFSZi9CmaRW6Cv+vuxlzJAefkbc9mTCuar3DmowoO86pxYB2Vs/DbfoDmASlWZpT2DhvA+HrN6fXhvuNDlodvE6uHRngoyag6FIHsHF5Ea0s9102WHS1it7r/CBm2KQWL1ZLRa/AgfdFLf y2rQoOZX OD6tKGlnWFSwRcFC0NpTFpy79yp306vaqoVwTZ5kZrE2dDSbwwhDOU4da3dZ82LTZ0Bm4fdo4XyxrxpFHxQCl1iwaKyf9UWvlAgqbjxk62ZD1SHh/RMBsdWTV2mL7Mz4Rki2Z/7zdyUotuBJLILhjsM8UfgnI4OKe6bb9IjRA4uwMNreB2+J2i8vmZqRgHOj47pkq 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 b492b67c0b7d..73d0987369ff 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) {