From patchwork Tue Jul 18 02:29:32 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: 13316681 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 B1D67EB64DC for ; Tue, 18 Jul 2023 02:31:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 553EB6B007B; Mon, 17 Jul 2023 22:31:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 504448D0006; Mon, 17 Jul 2023 22:31:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CC798D0002; Mon, 17 Jul 2023 22:31:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2E81A6B007B for ; Mon, 17 Jul 2023 22:31:08 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id F24E6A06BF for ; Tue, 18 Jul 2023 02:31:07 +0000 (UTC) X-FDA: 81023155374.23.F3818ED Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf23.hostedemail.com (Postfix) with ESMTP id 946C014001F for ; Tue, 18 Jul 2023 02:31:05 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=m+mWrixn; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf23.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=1689647465; 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=FtAwdp6dEZOfkKyOzgbIJsRMzrkfBwsLZrQcGX17DcIzXS/O0rSuUTRbS2xOZ4GP8F69Sr GnFpd5HtmApR9FgoIjZlEC4fE2lsg+VvNAfHx13R0kw2ZKLowwrHuPyNYGcmPxkOl5gyiI StqKZrB/vpZLEMK7Jw/CjT/PIVZg4Jk= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=m+mWrixn; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf23.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=1689647465; a=rsa-sha256; cv=none; b=UDTGDb2oha5WMHXo0QIIyakOclcQO8OEShIGEZgmdK3hSMbJBtiTZxS1NIIaKQPC1sMe5j R5qEMHsGJTLZqXWDIp1Ji0jV1BQNrCwwrSx8Az3L2PB+UnfGYkk/n+3Jyv8sGeZgfPv7Y8 AQp4AwuCgS+J8rcBRHXBk/BMA9eUwpg= 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 36I2Cblc030021; Tue, 18 Jul 2023 02:30:55 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=m+mWrixnmG+s+m8meZqB7ZnZ3/+F7fKSEcKXNajMTpHcJctRyCyd4MCm9g7MD7giQuog lLY/gkI5OsoSdeZ2c3VX9/wIrj6joA4jFzpJ8iS3qTwZh+V5tP2BAHKg1/T1jMyAd1AD 0aDB1K0AkddfPZMbge6dnICq0+nC+aWjxYN116O+Fgx//T9ZbksVE/JYvdEUV8WmfhEw tWjaLGGICLLFcmPzFoEG7IHHdPGCDWou6l+U6N4x2dgY81yTT0t9ZV7/9vvTFQ8JG4s5 hXsbFr3iB6rpAEwYg+YXQhYp1HAcSG3R8T/F1+KBeC+WFRzuDhMMku1Af0FJMBBgqhrW yg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rwhrg8afu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 02:30:54 +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 36I2QSZf001672; Tue, 18 Jul 2023 02:30:54 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rwhrg8afj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 02:30:54 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36HMgqaU004962; Tue, 18 Jul 2023 02:30:52 GMT Received: from smtprelay02.wdc07v.mail.ibm.com ([172.16.1.69]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3rv65xbujy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 02:30:52 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36I2Uq3u2556468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jul 2023 02:30:52 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0FD5658065; Tue, 18 Jul 2023 02:30:52 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0EA5958057; Tue, 18 Jul 2023 02:30:47 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.62.199]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 18 Jul 2023 02:30:46 +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 v5 12/13] powerpc/book3s64/radix: Remove mmu_vmemmap_psize Date: Tue, 18 Jul 2023 07:59:32 +0530 Message-ID: <20230718022934.90447-13-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230718022934.90447-1-aneesh.kumar@linux.ibm.com> References: <20230718022934.90447-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: XhuxBIvxCYtLvXdFiS90EFwKnqILnI7F X-Proofpoint-ORIG-GUID: ZdAlO3lKITPO3qwPPgTFu5iFVCQNkBOR 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-17_15,2023-07-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 phishscore=0 suspectscore=0 priorityscore=1501 adultscore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307180017 X-Rspamd-Queue-Id: 946C014001F X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 1epjn6rqk4qf63zgfonkiy19tb41t9ab X-HE-Tag: 1689647465-181313 X-HE-Meta: U2FsdGVkX1/o2oka0dxJAvFJnNFIgliVgqulH5dUwkGhl2T3mRmOP48XOY1XIHDbU3o+f+52ZrgUJ6sYxA0BRo0ysh3WIkSvUYXYExyID9QDUipZEaGEUsQ4ubSY9ABoF/8ZZzBmJKFWwQXQUSingh/bqREBeCuF4iEVWXrBFYwCN4GCKbTXR22gSFX6IL1af0i+dA5dfQmJOpADjceHmz3EquRR8qEjLLeUV9IaGndgUZ+V02DzIlul0k43oEcWlCjRob1SMy+YiX07Mwv8HvX95LiW+Ux4wYsBpa9BIsMtQYxNBhcGIcJxDVkXy+hJIgOp7ZSVf68H6IHW0E30WUtLLdKTd5+WFjX/CgLQtc3MOXr2HthGfaatTHiPZ2YSCD0PX1rmLhpoLkuNBKO/wLDjv1Lo/+hYO+wdCONnuvRNyQ0Ylr002si0pFq2YbvyGq4i8CyXrvr1anu7ahK44cPacIJY0iMNphpfqkGF/Fl9SbfUASWBFdJzg/pXpYlWW6DJGFHi1Oz9foLxx+mE5CT+0mzrpl+UKui83UovPlHEP4QNCm8RXIA4HdoGGSoqxXwMczn1CpazlmoFXlvCs9hZxugXU8+XvqSTtvyWZk7nA7LInfwuzmWjTxvs8bmKqkyZiun7grIHIV3ZIYv19sjacL+q9whGriIq7oGGANKAA2NrxfSNz0Ehgo+g/Gvcu6X0nXHRXN0jamWuRrzDMLnW1hWixMo5yFB8bT1aAz2tv11CAPzVsiCbXvRoJEine/47aN0gyaTolMmNIUuyyyo8rTQo4CkTa0gIEV6eRRUhxQe7z7kSSuTVi5Od6DCWL0BX22Y6b1oABVSQ01OBkh3LSPEFfLuTPwlNibOPSR4enbLhklmGe2goqFVWmGX/FWIeH+LSXwgooEQte9OzBej+rM87VY61AaJVSmsfA7yWEXfEy9CydlsM5Onqc9FuZR6mige+WHJAP06Uzbz XiXVlwll kEMdeKtqA2ew/whhydMRbmJZB4UGHVcdcFvbswpQzErrEr5KBZ8LIVs/Q3X7SNE+M4J3TJXw8kZWyShiY6qd0LnlrsowaWAiU0KGLKM7lDg2kjJ0xI3EnE7mj/jPShkMOUVY0pn0UiQovzjHnQ79eyBovZ6LCcOX1EMjz4WX9Q+l9lbLXKpIK1dBGJFx/7kPopqnP 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) {