From patchwork Thu Jul 27 05:06:45 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: 13328737 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 238B2EB64DD for ; Thu, 27 Jul 2023 05:07:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 565476B0072; Thu, 27 Jul 2023 01:07:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 515706B0074; Thu, 27 Jul 2023 01:07:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B6778D0001; Thu, 27 Jul 2023 01:07:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2C5706B0072 for ; Thu, 27 Jul 2023 01:07:12 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id E20271C9725 for ; Thu, 27 Jul 2023 05:07:11 +0000 (UTC) X-FDA: 81056207862.19.A973291 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf15.hostedemail.com (Postfix) with ESMTP id 3BDF5A0003 for ; Thu, 27 Jul 2023 05:07:08 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=tFEsGvrt; dmarc=pass (policy=none) header.from=ibm.com; 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690434429; a=rsa-sha256; cv=none; b=bZ1tgRhAHjCkwfePjhuIBtbmU5JdqS1AFrSxhMsSiSSVeIoCC3m8qbKcLnsyuOmogBwzGR C5OE2K9wDnUPKw8jJegaiDoQjuiIpZsLmNNWl+4uVb0LG0xv7bMhmWYNBrQaG0LCWR8Rje 3MoCWzLiFlVd05LSNf8uzg+OTvCw89g= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=tFEsGvrt; dmarc=pass (policy=none) header.from=ibm.com; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690434429; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZRmrXjtwrCFgelRk+lTxAIReeEev3k3Qbshsmvf5Vpc=; b=AfFV9MXHo4+YSUha5s3sThKVCoS11w1CermXhfANjXVhv4HgEF2zYt8gIAfaqx/A8N2EvY chFEYD5pmbIBo1QR6aKdGS9+8mPIclX0wcBGxqp4zDqlqRc/NoQOYG2/7EVg2x2gkg0X1c kaL7rUXnL/iKyb8x3+oFpdBQhoJIkZY= Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36R55lp5032382; Thu, 27 Jul 2023 05:06:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=ZRmrXjtwrCFgelRk+lTxAIReeEev3k3Qbshsmvf5Vpc=; b=tFEsGvrt+AEozlat3DYUApjolPhCBrjDQ7OIJMditKg3/q4jPeEuhobmc6RsoPCmlVab e433oSLOc06yuX5mH+a+TaVrs9pfCv6MEri2FEx9jLFJaKTEk1B2BRc7thmBQOdHlbrm n3lKvLDgPV33Lsm1EDSk5zVAQBhoNR815Bzd7rPyIJ4V9SphLY+faa29JXr2Ga4otcRr D2wtNvsUe+6AkeVNG+VEVUzIJRMGvDWVVvcg5ps24yT5QkShZVGvv1DMK+g8GmamShk3 qREBv88x9c1Cyj8NY5A9J7zSXOjtrKHutJPu6k0xCmMePcFSYT0mqU3+nwAFdpMIPCv1 Vw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3s3hty0c88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Jul 2023 05:06:55 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36R56E6V002031; Thu, 27 Jul 2023 05:06:54 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3s3hty0c75-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Jul 2023 05:06:54 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36R405ug003714; Thu, 27 Jul 2023 05:06:52 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([172.16.1.74]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3s0txkagjs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Jul 2023 05:06:52 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36R56qNs64946544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jul 2023 05:06:52 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 403B258051; Thu, 27 Jul 2023 05:06:52 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C4E205805A; Thu, 27 Jul 2023 05:06:47 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.109.212.144]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 27 Jul 2023 05:06:47 +0000 (GMT) X-Mailer: emacs 29.0.91 (via feedmail 11-beta-1 I) 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 Subject: [PATCH v6 10/13 -fix] powerpc/book3s64/vmemmap: Switch radix to use a different vmemmap handling function In-Reply-To: <20230724190759.483013-11-aneesh.kumar@linux.ibm.com> References: <20230724190759.483013-1-aneesh.kumar@linux.ibm.com> <20230724190759.483013-11-aneesh.kumar@linux.ibm.com> Date: Thu, 27 Jul 2023 10:36:45 +0530 Message-ID: <87edkuvt7e.fsf@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: xHn9Uh0XayuDHJYGfvdcWpFLAz4HNTdQ X-Proofpoint-ORIG-GUID: _cL_E65yOdvgMaTZOEy15pxCaHBE8O9Y 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-26_08,2023-07-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 spamscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307270046 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3BDF5A0003 X-Stat-Signature: dbxnsmnr9yb9uw6xgtqihx6o8b86zbyh X-HE-Tag: 1690434428-467622 X-HE-Meta: U2FsdGVkX1+QO9YItBRA2mPKUg2mWRp3FVUI0X+TpGUtHgFviy0pvEoFXDNsReSUTzIv6SkUoeJu3AMCd46OChJXbWdxu/JXCN4bEm/XIf7+6HPuj9vJu5o8qcvpDQ9IfC8xNbMoI/atAmStehLUu4luhDQmU8AqYpqZxAfEgoKFF4lIBIPjrjTOL927U2aRCDIPa3vuTSRmCiwdx3GMRmY5hlcsoTMw9n900e9OK+HzIWs8wuQx/ZYaYPHIRlOtxyRx4NvMTsC9kCAUdaLRIKgwefaVzpuLDCyY8usArx035rr9ljKjHejhtoBy9+K6lqv/fS/ynBBji53gnAxyQJAS5XG47jk7LxoGh9NzyBXZ+6V2UkqPOcWf9g9S05o0J9V2g43HjypbCkmwNTm8QgwngdKGPNj5enJTh2Rcu0f3h9XsfkD9OKEc/zEPhW7QiNsesu3rbt17/i4EfyHwdxssxiuYuN0lM5/xsjj23KfdTi4DKVpqNO5BQvDv9GaEEeAtNnuOPke5ODRjlDixHuIZPhodt/d/KzTejPqDGRQ3ug36Ude7sMr0KrxCKOJ4lAembmSG6f8kaH86GPP1kQ09Y6FDVaRFReDsNtyqobfeyZy15fyXnuXKw7Tu7QGYRgtMnNxG4NQU8vF8VvLcBwENKGA0/s9Fqa2FRTDBCLIl2KMA6+U4Cd9ECmm8se7Fo3WgUKmQSMddt0DWGVss4QdqT4pqFXvDOtDe3UmVqaTS18KpwrihD6e0pa1VisrGPWnJZ19mgDVlSaxTFk+VlNi30A4hPC/+qTm7lCD0VNPfr8AavRGJqx/81eO0orwNOoYBm2gVGVSfS7bVTpf8TTLggPuu+PSCIheqwW+vl1/L4gYhNElGT+YmfvuK1zpF2bxM2Bi/g0EbA8A+hprMis1kgZTlUAAo0SJIGisWpe65OcSSqHRuos3NKsSaYwWDi4EATM0a264pyS+J3ft +9GpBbsg lHW1QuIep319gaPpVWqS7Y8bUgB1hFuSS86TLM6MKr8epYxjNaBQYytlzN+pWvFL/bOruuhvPCQYA3OdZJBSfaET9yJBczDyPJflX2q7XWAzWT+0= 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: From 9125b1815758ab3b83966aeead6f486c0708ea73 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Thu, 27 Jul 2023 10:02:37 +0530 Subject: [PATCH] powerpc/mm: Fix section mismatch warning remove_pte_table is only called from remove_pmd_table which is marked __meminit. These functions are used only during memory hotplug and they also call functions marked __meminit. Mark remove_pte_table also with __meminit so that we can avoid the section mismatch warning below. WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x230 (section: .text.remove_pte_table) -> free_vmemmap_pages (section: .meminit.text) WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x43c (section: .text.remove_pte_table) -> vmemmap_populated (section: .meminit.text) WARNING: modpost: vmlinux: section mismatch in reference: remove_pte_table+0x4a4 (section: .text.remove_pte_table) -> free_vmemmap_pages (section: .meminit.text) Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_pgtable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c index 53f8340e390c..6d04dd579d03 100644 --- a/arch/powerpc/mm/book3s64/radix_pgtable.c +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -793,9 +793,9 @@ static void __meminit free_vmemmap_pages(struct page *page, free_pages((unsigned long)page_address(page), order); } -static void remove_pte_table(pte_t *pte_start, unsigned long addr, - unsigned long end, bool direct, - struct vmem_altmap *altmap) +static void __meminit remove_pte_table(pte_t *pte_start, unsigned long addr, + unsigned long end, bool direct, + struct vmem_altmap *altmap) { unsigned long next, pages = 0; pte_t *pte;