From patchwork Mon Dec 9 09:42:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenhua Huang X-Patchwork-Id: 13899147 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 05C07E7717D for ; Mon, 9 Dec 2024 09:43:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9342A6B03EC; Mon, 9 Dec 2024 04:43:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8E3276B03ED; Mon, 9 Dec 2024 04:43:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 783D16B03EE; Mon, 9 Dec 2024 04:43:06 -0500 (EST) 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 591A36B03EC for ; Mon, 9 Dec 2024 04:43:06 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id DC908C0307 for ; Mon, 9 Dec 2024 09:43:05 +0000 (UTC) X-FDA: 82874930460.20.8392BCA Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by imf21.hostedemail.com (Postfix) with ESMTP id 936941C0005 for ; Mon, 9 Dec 2024 09:42:24 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=immPB09I; spf=pass (imf21.hostedemail.com: domain of quic_zhenhuah@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_zhenhuah@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733737369; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Tqbr13cTVpmFqpleZm78ZDOWuVR4wFo0Qdc8LscuVcA=; b=Yn+cE+jTXUKhflXqiwBylwSlU5cnr+43QAEVb7zbBv3iMyBowbY81DOYurj4Hiqjo9nCJc Zga8L2QlVP5vFjCZYlcUmgkaNqp4N/K9xHDr342GnJcvsIFWY0DbVcSGm329UKmJpPvk/O 7O+vwix/Nxymv4dQdIc/0559YU34Gdw= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=immPB09I; spf=pass (imf21.hostedemail.com: domain of quic_zhenhuah@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_zhenhuah@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733737369; a=rsa-sha256; cv=none; b=fRTPcwJx95ZFwiVmdHBQ8KFNJ9DuqxpO/ExtJGTplgerdT24jRpGngaozs4wboB2QKK2hm 7f9lOEKoYrWLM0vPqm7SZiRcORARnwUJ2N3FunjoJaEck8RN7xsEX3NlSXn2UtUExV9S6o t6kfKuHTFWsswZpECELemSu3ierWmcQ= Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B8NkrgO019407; Mon, 9 Dec 2024 09:42:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Tqbr13cTVpmFqpleZm78ZDOWuVR4wFo0Qdc8LscuVcA=; b=immPB09IHqdJ86ly Wt5sEZWvGhCy3KNGq40HOAuAcKo+CFcCg5agk6CeGJBseyHXs18IpTs2Yw96+HRJ /qNIyAry9Vj00yiPO+78nct5dI40owyBOnwYmERKtSEk9M0IHjMnqyNbQfViiIpk frhftXVoSs44Gw8MA+NWdBeOQoFiodZuZPq1ifoMkbbeXoj6Z+InNfDb7ETI8xj1 qvsCfPwaiTQWcEi+qVfoqnS1mPUkJ11/OYkLtWTUvG9EacsEmRZrQVC7K0SuyUn9 Ia6tGuR/LErbV3YG1Y4zALTxh1XG/7vjliIThRRpthLWbZLmRXSomB7lq5RUg4Q9 wosV2g== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43cc2ecb4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Dec 2024 09:42:57 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4B99guef019069 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 9 Dec 2024 09:42:56 GMT Received: from ap-kernel-sh01-lnx.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 9 Dec 2024 01:42:53 -0800 From: Zhenhua Huang To: , , , , , , , , , CC: , , , Zhenhua Huang Subject: [PATCH v2 1/2] arm64: mm: vmemmap populate to page level if not section aligned Date: Mon, 9 Dec 2024 17:42:26 +0800 Message-ID: <20241209094227.1529977-2-quic_zhenhuah@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241209094227.1529977-1-quic_zhenhuah@quicinc.com> References: <20241209094227.1529977-1-quic_zhenhuah@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 4-q_SRzBcq3Y4hdw5tH8DRWs14OCq0fu X-Proofpoint-GUID: 4-q_SRzBcq3Y4hdw5tH8DRWs14OCq0fu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 mlxlogscore=822 priorityscore=1501 impostorscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1011 suspectscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412090075 X-Rspamd-Server: rspam05 X-Stat-Signature: 18hjjhkqya8uy5uc5p7fps88cwqoptag X-Rspamd-Queue-Id: 936941C0005 X-Rspam-User: X-HE-Tag: 1733737344-357791 X-HE-Meta: U2FsdGVkX1+K5Igzeh/qcVxsYNy2uwpxneF+IIUtxhFWCWE9NJ0jAHjCINo4CH4XXtz7Wo5ZTc3msGqBVqcmXhlDa8+2DQbrle7RPjHi4QYU/BQEyr3hYoQW77vcS8noDk535evWy4vpIU5hRx/YfPZfSMMNoq8Lt99CZFC8Qvm+rE41zZ3HUhc9zUq9w94smezCOVCb2lZ12zuwggJjTvtsujvDo0OEVZkf4ULc90BLTicqf6xGTxjfHe9YoboRtg8Eh3iCEnCn9O3GRZfAdPbEn/MoBACV/dgRAhdEmKWfDHgbxQo/XoinQCB9J+q/3faNFSRj6VEBR8JkVdD3MEC5hehmIp3MN6Kqo0JYyhciO2t9MBx91cjnO4q8H+0MT9+RvPRDSIo7D2SwRFfUSu+mEN2vOO1rns62fBKJesTToH25svsvt9q7dncBV4HN5e8/dgvbwtP3dhmL/L5wYcruVsb2RGSrUNAyXNW8POmQrSdNoX0v9Taue+CxZm1YxCyMpUBv62Q8W6JqWxjlste4XM3X3Q5gsS25zw/eMeSiPn94QzSnUu1IsICae10Yir38HuW8wkX71TF9dTjVo66bt4FaYB+2AeLHjFBf8QY7S6N7qFDH9dzx0BwzCv+MyBiwO7cfQC0ww2mgwm8rezz2KiLgfJEQ9fdAd83B6hVcS3gqhwACGlHl6gUDHcIEx1paO0IYViocCxPaKcRr6ahCi2tcbXz7kq0OdO5Aph7ktvU/HMAjmVxwjHe03qESmR9eWMpT6YnR+lHgI/c2n+afe68bZTUYiOf5hwA3v0P736MiNTtHim+9N9lfDOv8K8KLRCmSFwsmCpPrbt3ckftucBSzrPLvLvGG0rhUdlM+LP7XuXvL4d8xze9dOLHGYmP8ri7MQxG2FDBpxQdwRHahYkNrWf5SGcmTQsK2RCdZyRFQ4MSoW4lnvffyeu2TR6crI8lh+fYZQJA7hfZ Xsp28AQx hnGB980lRmSHdog6uAMU+5jVTpQ1kfni+32WPettCpIQlCA5Y7cGdgRDul9E5VsE1Q8cGHPSXI3jSM9jI+K/VDMucEjogrzK8Q9S2/BSwHTH+CtjS73+C661eyUW68sKSwZaO40szFTDaGHAeMw/ZTTca0WLXmGuqpEzAvZfQsecdh7qc6w9Nvo2SWcfLb/RbuurighQGBX/OGfPANdJxy1LdEUvQ47ZhaUnVbDo7aks3GqFhvhvP39XDJXPprO03SV8MYkedofMzSxNmRGseli2U8TK+FgzhcRfn/gT6e6hfuc6wdBd/3Gd8uBYZOQ7O8zn/ 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: List-Subscribe: List-Unsubscribe: Commit c1cc1552616d ("arm64: MMU initialisation") optimizes the vmemmap to populate at the PMD section level. However, if start or end is not aligned to a section boundary, such as when a subsection is hot added, populating the entire section is wasteful. For instance, if only one subsection hot-added, the entire section's struct page metadata will still be populated.In such cases, it is more effective to populate at page granularity. This change also addresses mismatch issues during vmemmap_free(): When pmd_sect() is true, the entire PMD section is cleared, even if there is other effective subsection. For example, pagemap1 and pagemap2 are part of a single PMD entry and they are hot-added sequentially. Then pagemap1 is removed, vmemmap_free() will clear the entire PMD entry, freeing the struct page metadata for the whole section, even though pagemap2 is still active. Fixes: c1cc1552616d ("arm64: MMU initialisation") Signed-off-by: Zhenhua Huang --- arch/arm64/mm/mmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index e2739b69e11b..fd59ee44960e 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1177,7 +1177,9 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, { WARN_ON((start < VMEMMAP_START) || (end > VMEMMAP_END)); - if (!IS_ENABLED(CONFIG_ARM64_4K_PAGES)) + if (!IS_ENABLED(CONFIG_ARM64_4K_PAGES) || + !IS_ALIGNED(page_to_pfn((struct page *)start), PAGES_PER_SECTION) || + !IS_ALIGNED(page_to_pfn((struct page *)end), PAGES_PER_SECTION)) return vmemmap_populate_basepages(start, end, node, altmap); else return vmemmap_populate_hugepages(start, end, node, altmap); From patchwork Mon Dec 9 09:42:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenhua Huang X-Patchwork-Id: 13899148 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 B4775E77173 for ; Mon, 9 Dec 2024 09:43:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C59E6B03EE; Mon, 9 Dec 2024 04:43:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 475586B03EF; Mon, 9 Dec 2024 04:43:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33D836B03F0; Mon, 9 Dec 2024 04:43:12 -0500 (EST) 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 13F376B03EE for ; Mon, 9 Dec 2024 04:43:12 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B7A7280257 for ; Mon, 9 Dec 2024 09:43:11 +0000 (UTC) X-FDA: 82874931762.18.F5D46AC Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf15.hostedemail.com (Postfix) with ESMTP id 9E0A6A0011 for ; Mon, 9 Dec 2024 09:42:48 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=c1hrRAJJ; spf=pass (imf15.hostedemail.com: domain of quic_zhenhuah@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_zhenhuah@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733737374; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LtABRAQ0YEr/CI1X8BieMgHVTu9h5oCNjef5fZpS0XE=; b=IlNrvpfFQSh8fqjLnt97LSmeZWabWmcoP8iccLlSxtGTqyCtLAulASlT2Y8fZMnZ7efJ5t RDU8r/WTN4EcKJMDOIE9WUA9zNlQn49EdS7APL2czX+RR1Tb/NnZKY718l94bnSfEtnB1c Dn5OZvYXvXkv1YcHRxX1tV0nS0IUGwo= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=c1hrRAJJ; spf=pass (imf15.hostedemail.com: domain of quic_zhenhuah@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_zhenhuah@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733737374; a=rsa-sha256; cv=none; b=I69gKCnJGxUcQnPDjOb/lBVibwRN5IFVBkcSf1U4Kn79+wWX7hYoph0sUWOITVF/E5PdO/ bx7BrNXARvWSIjHGylHT4f+dc6RUnBAXM33gVXzCPKNPmSvf++FttCWw/KjPvRbavnHIAJ y8gUr4X/xphilq5bTEHw44iNVU1c5sc= Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B8MMWYR012704; Mon, 9 Dec 2024 09:43:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LtABRAQ0YEr/CI1X8BieMgHVTu9h5oCNjef5fZpS0XE=; b=c1hrRAJJUL8NJMcq bM+hWcCgUlXoeumzTI0rTfVNnCGanA1GHZUX0iaNAVx0gTD65t7S2hVMHqz/1228 dxZWbR1IC0FpQGAERJJdktQWQDsyF0F5i6wFdOgAODynMMZvo+mtumH+Q2NXpomQ FXfo3RfJbC2L7C9TBvfRz+7QpoiZwP0jDDftWf0hXY0xkjTfwmRWnu1Ra+Z62SgJ 7lS3wvzcfqJbggRwcMEsoh648vPKW9STcPvOHllQGBN14YKsCcA4uR468o5wsBG2 dcxSyy195O1lQyHJPTVumAWygsFdC3PEVuGLXChRKtJ+fvedB93NbkGUWuHVKh0k 4yPoKw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43ceetm41g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Dec 2024 09:43:04 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4B99h322017647 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 9 Dec 2024 09:43:03 GMT Received: from ap-kernel-sh01-lnx.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 9 Dec 2024 01:42:59 -0800 From: Zhenhua Huang To: , , , , , , , , , CC: , , , Zhenhua Huang Subject: [PATCH v2 2/2] arm64: mm: implement vmemmap_check_pmd for arm64 Date: Mon, 9 Dec 2024 17:42:27 +0800 Message-ID: <20241209094227.1529977-3-quic_zhenhuah@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241209094227.1529977-1-quic_zhenhuah@quicinc.com> References: <20241209094227.1529977-1-quic_zhenhuah@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: gs-sJae984RW_OSNds3kolLIBqleNwa7 X-Proofpoint-ORIG-GUID: gs-sJae984RW_OSNds3kolLIBqleNwa7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 spamscore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxlogscore=497 bulkscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412090075 X-Rspamd-Queue-Id: 9E0A6A0011 X-Rspamd-Server: rspam12 X-Stat-Signature: hbsci45m891tu9xezui4esdnasnpg6hg X-Rspam-User: X-HE-Tag: 1733737368-922877 X-HE-Meta: U2FsdGVkX18GMMsOnW7Zt5MQUKvrHHLh94R70Ie4RmJ2ittcDjI3Nh9dZuHBP7Kqjoj4BW/GJROB91tLuSIOYm3+6311sXJGDRtbhwQXDLEoq6rK1lkvyiOqrXgWY8SuRgFExF/F5/40XVhgLtT5WD5zKUJShO7VCmJ+IQijZYiBtHUyZSKCkgeKrIg7nJOYuLz1mjQtJq27J+XQ0wxLexZcII+Y9RHV4kxjuL1+nbuNRcc9CvuWWtjwckS8Q+Qj49Iwez/ALfe4UU/H8EbmdEaxJzBo1VJMlz+5+p9pkpkndLuAoz/Qvbq3d4BMxNiZrG1i/N+QxO/hVjUNgl3/Bl2kc82CWFJF76lJ1LkC9cQZZNRwY5vvND74kZxd/duOwUJYllqOW66SwznTYGsD4XATIwm4WkTHdl81IXxQlMPevAP9NP/OkLDpkggtSSw2Azvg8Uzg+66JyQoyH4am1IZTEy2PIHafMiGRuslIb4nV80EUN/kPcolg5L2gQZADhdl9kDKIILMW7YIwo+XCO36hWaC7B3kyENeWYlklyLFQ9zKRk+qZU+u5/GN6lRzToVvOUqEs6WBsA0MHQCNDE9pzcYPYiHllyn3UwGAfZ9kQc0RpwBXgxEWLYR+Guvi0VqtaKCfr7gquXYSpHAzwJnv8sBszXR7nOKWkHPNUTZx/dSfiJoBMGld4RblHMixfLRt5ZEWKWLHlPrDTahDkkngDcp8pyV09Wd2Vr9LYI3A6C2atdHK5IiBsIWpQ/w9IeXcC6Y0ulS3YkgvgbrFpOkGjUxQc7jrubuqp3ygx16JtQrC0RcqnXRnPslke9Ar6lRJ5IWTN2yxbdUF+pCyrbQCAxiEy+xTQhtU6a7+5kjiCEhVVbb+DHYBKEI1Q+n/lf/ye0l6DM5D4ueKm2n8QXvoHUTflFmIE1XjlJD3f9ccl9Tqxv/UPtWUhLNaAL4XtQKDd9nllbUE0K7AUjx4 c8a+mgBC Hw8v3VryABMC0hu9wxzeARdP46PaiOXy5KqeFNIBKtJcnGtviPAY17ophh+jKBEIQWmWDG2Oo1fiBLxPKtoAPl8h5QhgGmCpNz/6VwJmnprNsI5WP+s9kM42/50ltHI9NzVeljcF95k4y+/Qxbtytt5UnpwSLi0y0zPSThlNN3Nw/48aRhkQqGZz4yXyw9cOv+T3J08obH+IVzMeTkjr5Q9U/LUz0zw3N7gx3MpE8LlznpJJWtwHJDIJ5C0bAJzwiIUfvM+psl/VlFt5IKYyozFaVi8VL3xRLaEu5iDU3VBrPQo4Xy26/NnVA4CXJTYZ8DdXAKD8mxEw+NZSyHPJ91nNgcFPfgJEK1ns1lzw+uRlGg2c= 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: List-Subscribe: List-Unsubscribe: vmemmap_check_pmd() is used to determine if needs to populate to base pages. Implement it for arm64 arch. Fixes: 2045a3b8911b ("mm/sparse-vmemmap: generalise vmemmap_populate_hugepages()") Signed-off-by: Zhenhua Huang --- arch/arm64/mm/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index fd59ee44960e..41c7978a92be 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1169,7 +1169,8 @@ int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node, unsigned long addr, unsigned long next) { vmemmap_verify((pte_t *)pmdp, node, addr, next); - return 1; + + return pmd_sect(*pmdp); } int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,