From patchwork Tue May 16 06:38:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13242575 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 365BEC7EE31 for ; Tue, 16 May 2023 06:21:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B08BA900003; Tue, 16 May 2023 02:21:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A2B6E280002; Tue, 16 May 2023 02:21:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BE0C900004; Tue, 16 May 2023 02:21:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 41CD0900003 for ; Tue, 16 May 2023 02:21:37 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0E4AC121420 for ; Tue, 16 May 2023 06:21:37 +0000 (UTC) X-FDA: 80795121834.15.00A79C9 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf17.hostedemail.com (Postfix) with ESMTP id A60F140008 for ; Tue, 16 May 2023 06:21:34 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684218095; 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; bh=XG2h2gjUuFBkWBOKj6fIiOCuPiWC+zCcN3M4anUpp64=; b=fXKZ4GEgUh1AC7A1g0BEKHTBpKVYiljFF019FP24xS29YoPKt5c+bZ+LI0PfZvnDOZepKZ MNKmdYzigfbBGJgtMGwL7JGQ20dd256XZ7JHpOa2YAClziU2bfNgxCvZGjNypieXUZwai/ tJNbB4iwPoNwmMRVm/4YJyOFJrL/UnI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684218095; a=rsa-sha256; cv=none; b=NLSXOOvgKzMqfTSqmey0QUes7XaHz3sK3mKZJwMzWhfKIL2fmajE9SNhhMpQ0vylPVS//a rQHxEWoIkhX6vl2lskjCfndndQ7yK1zvgz4asMsC1FpTkhtpnHQRuu0SRBn5hOVCmxVur4 vmWD+3ahVqM6G1bnJQSRjDc+pyxYnJk= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QL5cR4KDBz18Lc3; Tue, 16 May 2023 14:17:11 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 16 May 2023 14:21:29 +0800 From: Kefeng Wang To: Andrew Morton , Mike Rapoport , CC: David Hildenbrand , Oscar Salvador , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Luis Chamberlain , Kees Cook , Iurii Zaikin , , , , , Kefeng Wang Subject: [PATCH v2 01/13] mm: page_alloc: move mirrored_kernelcore into mm_init.c Date: Tue, 16 May 2023 14:38:09 +0800 Message-ID: <20230516063821.121844-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230516063821.121844-1-wangkefeng.wang@huawei.com> References: <20230516063821.121844-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Stat-Signature: cufko7x3tn9tbunrp9y83djjtzdrp18i X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: A60F140008 X-HE-Tag: 1684218094-899857 X-HE-Meta: U2FsdGVkX1+jbR20VRKcops3KIpBkEqpcMZh8B2DeWZMYcVC/BVkIahhbTtFuMOBZCtKwcZv2y6FQE2XzxjBl9KCVzJUgVB/fAQNwAi43mxrsxppL+oGQ/VOOLjUa5r+gJJZyZa1euP3rz9COHqKI2H/BkuUh/FLcF92Jk3bcVzYJQ9koHyyWmFECE9gwdcLpDePYv/RgbWQL43UJbkJhp0dervZxQamvTtSrmlLtgo3mkC/nbALRpdJGyX5zqHdzTXmOfJFYfBq1K0CM5q+YmXOHBJtclm8wB94pPsT+PZIHRTx6lK34Wy+x4V5T9zuXmnRps4ft69inTBzaTAs1Vp5n/B2UUyuKsdrwCkoVVfKqfwLKazVDFAR/EyxMy0BMQqGW+mZAkZMwnfIoCvFH/wtFyuP2vJlH0l6oBrCt5Mt++/+ySvrGMygbb22YHJeYEtAWLtAP5ABf5fao0NQjY2iEZv1qLyC+fstkJyx6WbLObg4MkPcengF3z0tnsrLvIbqEcaxDaLiWV08c+K1BE3UTAD3uE4kGoCX0hmVz1GtWY6zSLAdwR1oAUKIIOo1R37GKYiZPJUlOD3/gS+gTDaGFNam2fqeHwhWeGCKZ5SSRO5JeIGG6o70ld+s36OdKZHBufR5kZ9cv6TatZR5zCU/MrckVaadgeswZ8ObbDQ8b77mGbVoHnPjU8DILSyXhWJB8yugQ6T1pGm5z6mGv2FbxOb6f8nyWzPOl7ymNR/q85gv6WWetu6Us5NlbINUGqGzEdmGy7DjjYOvwdSypILTyJiOvb+qk+hURxNnDc7WPMabfdIqobF9jk09X0SZAsKwaqg7BFF7RoD6DwEkzbg2Ag+s9JXU8w/F9BMmPf5vL2/GIEWXkxKrNpP9fKEoBALc4G5EHYPJnAIQxcSR3YtFltN8toYS9FXFC3WQ/ICMuH38Dtc4KmRRVmA66w6EDE6ddxHBzjvMbDHsdUe ZBI9ooeb JgOBi299uvAfuntV8i9HqCRGWiGuTbNIV2V8kNBnO/2LmuRpC3OpjtMwJIVUEncWqNVVlGOTRrQ0LJZWAeK9QSGIdXFPfnx3kUD/68t6K1zo3q/OOgZi+h69Vfnn66ER0VGLRS3XKksGPyZ49eeV+MjHgVRU7gBKG1srfSDzl3cn8L6K6BX24urdW9mbgE6Unc4R1atnPL0jEiN2Ql1d8CXynWz2Xn5GfV9G0VxUTfkhRk0WboZhDthvZnA== 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: Since commit 9420f89db2dd ("mm: move most of core MM initialization to mm/mm_init.c"), mirrored_kernelcore should be moved into mm_init.c, as most related codes are already there. Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Kefeng Wang --- mm/mm_init.c | 2 ++ mm/page_alloc.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index 7f7f9c677854..da162b7a044c 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -259,6 +259,8 @@ static int __init cmdline_parse_core(char *p, unsigned long *core, return 0; } +bool mirrored_kernelcore __initdata_memblock; + /* * kernelcore=size sets the amount of memory for use for allocations that * cannot be reclaimed or migrated. diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1d6419cd3f37..4b4188cff820 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -374,8 +373,6 @@ int user_min_free_kbytes = -1; int watermark_boost_factor __read_mostly = 15000; int watermark_scale_factor = 10; -bool mirrored_kernelcore __initdata_memblock; - /* movable_zone is the "real" zone pages in ZONE_MOVABLE are taken from */ int movable_zone; EXPORT_SYMBOL(movable_zone);