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: 94448 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp213040vqo; Mon, 15 May 2023 23:27:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CE4eZZG9ILA916uwjs2QV7qfrhKxfX3rRUzNWyoi8bYLGJ6mrXiTca+QxtP4IWnUn+p01 X-Received: by 2002:a05:6a20:3d95:b0:101:36b8:f077 with SMTP id s21-20020a056a203d9500b0010136b8f077mr29579430pzi.28.1684218442839; Mon, 15 May 2023 23:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684218442; cv=none; d=google.com; s=arc-20160816; b=jmVH8DaEw5I5dn7QRi7fQQS1DDZyciRNS9IJTxHVJn4yj++vcdSwgFXDHG7m735D2c OYUCeFUmGuuntTtuSryEQvY+2MEstKDUruXn9MX6EuQDBc+brnlujDLS2MQfEGT/NY+f iCcNXwgdVnKPBYsYrao/ePBE1BpA1wOtCYi43JUPI1c1Hle/Wk0Hj9EL4bOWU+T8YMh0 frjAtYl/Y/bVFH+0FT/XlTCMpvjlHiSx0gjNWs7xSFyJBd+zIT66AJivdf4sWe9m6qwt hXcFmQgDbr6OmE8exzDjnrpfcVd19/o8RaNDOLl1RCo6MJDcy4+14sNByXJw5ybZUYvl w7Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XG2h2gjUuFBkWBOKj6fIiOCuPiWC+zCcN3M4anUpp64=; b=Nzd0UUJi4j+V1bf/avh3E+iffzk6+6W71kogRp1B+EifzxUrjKp6jf6FkMyBrZsDj3 j3u0Ncwd/EcfoEKo6g2K98Vcf8MFV1W4Y2ua+O/hulncpGbEzqlmATwFeVDyvq0dRJwp JmqW7UQDEtLFPilP/S2GmJecBpc4+2FeJkNdNjhsX3S7IswG4lZXnNYGrezsc7f/0BGB zDNQr3e8C8dtHlNIUjtEuRl2XsuTBFudflUz897AwDZ6X4K3kTPYZHOZgfW2x0rSY91v FPUNgHfwfNZK2TICRZ2MGhLhC+en9t1lR55FoxsQ/u+HZ1EvusqCL+f2KljNvjwc6o9d atMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j20-20020a633c14000000b005303c1de315si18521515pga.853.2023.05.15.23.27.09; Mon, 15 May 2023 23:27:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbjEPGVm (ORCPT + 99 others); Tue, 16 May 2023 02:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbjEPGVe (ORCPT ); Tue, 16 May 2023 02:21:34 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EBE42D43; Mon, 15 May 2023 23:21:33 -0700 (PDT) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766031037947671548?= X-GMAIL-MSGID: =?utf-8?q?1766031037947671548?= 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);