From patchwork Mon May 8 07:11:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13234120 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 CB95EC7EE24 for ; Mon, 8 May 2023 06:54:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B81B6B007E; Mon, 8 May 2023 02:54:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F3A1900002; Mon, 8 May 2023 02:54:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D0166B0081; Mon, 8 May 2023 02:54:55 -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 2AC806B007E for ; Mon, 8 May 2023 02:54:55 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id EA561C0CEE for ; Mon, 8 May 2023 06:54:54 +0000 (UTC) X-FDA: 80766175308.21.5F53019 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf26.hostedemail.com (Postfix) with ESMTP id 73A9F140003 for ; Mon, 8 May 2023 06:54:52 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 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=1683528893; 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=rcVR99SxxrcTRKdzQe8S81O5MJzdlt01YSkJ0mja9MQ=; b=rc2uL0H8fSe4FQa6XGMzbbp6iYv0bh/p/kzGfM71Pua7R7btUnPDzXkA68koIkCYXD0biT pqlO6iN61eVpdvHwbrUj6lsb7jbg3Govxy+hyaKG+aTa2urPUeS3EuZ87xX3sbqRvhiZJi dZZN1DcQ+sUmjopXPt/U0qn8lxXaGSc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683528893; a=rsa-sha256; cv=none; b=hA75V6IkgvtkemRViQ0MFp53ReatjvTWfIK2ebMPowYg+JDVhvmnK9ivDHAofols93NgTd 9NRzcEtb0Y3p4Ki709jYBGqfSqa0qtP83B1b5LFp6RQdE16Bfs8s3G9dDT1HdRQc9m6WJc dM54OYaFyv/xS+MesshIOFzX/8Oq4Yg= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 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.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QFBkj5rRmzpSyw; Mon, 8 May 2023 14:50:37 +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; Mon, 8 May 2023 14:54:45 +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 01/12] mm: page_alloc: move mirrored_kernelcore into mm_init.c Date: Mon, 8 May 2023 15:11:49 +0800 Message-ID: <20230508071200.123962-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230508071200.123962-1-wangkefeng.wang@huawei.com> References: <20230508071200.123962-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 73A9F140003 X-Stat-Signature: zgqoir39zrbdirwghetmy9t3pkkp8s5f X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1683528892-367759 X-HE-Meta: U2FsdGVkX18w+h+1iaew4WVvqlMeuU3JkBXoGdwqfcUkojIByduGiLjpZBOvD07YIp7Lrd19rMiWynPY7cZiEk+Kv+jwlihk3xVFQWGguehxQnJ4IYDzKdDwwcyfWgUWsuwwS1nyAv0kuxDrlcKCEqYJzgGjOboH4dv/T4d6diNcj8HosdJTbHNWBqQaQlDQqk+f40hHoK6JyHzBu2L/ef9+seb1QBQV+2JBFPIBu+vwdwmQJpoZup+mLoSGGmIiybJdoP43H7Ny01cvSg5lJnbeE7jJrcid4YtlZkcQTzKfp0df6R12f3hKL91RI9pTLVZcwOm4nCI5JVID84YUuoVx/Pgu43Lll4sGNL/6NWKACdoh30zWFLvhdisrRXR7+hACVs8A5rMwK2kRuHHtrvmSilKHw8gyCaLSfBKH2oyDN7Z7J+Oss0BwfqDsj41Gly1oNC6nF6kssJZYrKDkPDGmyVkkM4JKRPZImOfu22LnUtUvWuC5ZHvodzqB8PZUo0nZTjDlCrRFZOFBmxK+CMh/S9CcjYYPRUX+tEm858u9nBDblrxvYHMLqB7iC9RYf3Dhs8U6t8yPoNBKkHa1HZyKb1S9MnEOgTL5GyQdGtnQQEZD3yAQfB4lqCStfURWlU31uLW58QM2jbzcAznVQvU4W1VIE07gcZ6FGeMz/9vGWDyfLMkzSbY0YMB1bKl/UqU9C4ur1zZBYEoArotRjzKMyDXAmJXVd6ZNJPrJZycELhBjZYql7X4PG/c53LuN5In6ZuuKr/DfpgzeCpdprB/gy1lXOcLYLkNEVzCQwAMEfwpmlntOEwe+HP/i0y1tZfE5f7BeVrlpZN+BWdyZnESC20ni06EtsPDvm4rzMZixHg9GOyq8HRxfavJyYuxWbBAL6HH6zDicxN1MaFu9J6YdBtiKxdcDFItNroPNNI2bBV6jC+imVl/ZSkd7QFez8pNiRcl6SyBLlNA0+a0 0GE8iYBS KwvtiP6mvaXZGG69gtfcTx2uZRz+PJdfJy1bHc2aU/huK7uFI44pAJpsvt8XBG8xnH442i4dloznb5J2ZJTqzyiylHSnhVe2eimH4bQZ1t1i6F0gYaRLMfQJZnQxkXuOWezxeMVD9CJh6hiH3ulJVra587T1SFfSjBDy6ZhcQHmTuVjUA5T5Fp5BiVo0m0r/0zP2kGjrQu7Sa6fdiUAF5i9ccHB3tbpVQFVJ1it6a3T1av5M= 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. Signed-off-by: Kefeng Wang Reviewed-by: Mike Rapoport (IBM) --- 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 af9c995d3c1e..d1086aeca8f2 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);