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: 90957 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1958213vqo; Sun, 7 May 2023 23:55:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/+22n0iwt9NJP+s9Ou2RrthTjzBBz0U8WBns7b73cM+AziNpVthQuMntXdKwMq7rzcFN1 X-Received: by 2002:a05:6a20:ab98:b0:f6:3548:e4af with SMTP id da24-20020a056a20ab9800b000f63548e4afmr9508632pzb.25.1683528959291; Sun, 07 May 2023 23:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683528959; cv=none; d=google.com; s=arc-20160816; b=fBG9qkBlMPbBp9XTe3rVHHRusRz6EhP496LkDVJkSj1zFCKQV8g0PAqD+JQZAnzbsT KP2z8TQGuUA7mEa6RfH46E296csyoD7Z+lCde4mX031hDf7/ZFRd3q53ecnN8ebHENgm CHUD63YBggN0vrHtQlcd6i4fK5KeT66kz8cLqktVUYpU+9REquwsuIwXXrwTHr+vxFBD 0P98qHAlfHtvZKMmtTPHcfqPj/Jkh7LOhD1Z1j7nOAl1/8hx2aJw8TG+8xO+u0gE/r+Z BvqYZAtG71EQm/cQDgBDjUTCTUipVITlu+HJc5MBVGq63DEEXTuwisODBguQYdmICvvx HvNg== 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=rcVR99SxxrcTRKdzQe8S81O5MJzdlt01YSkJ0mja9MQ=; b=iUFTEWKdlILlWJp5iARwVDqdACsM4ta8ox2Gr6CH5fRU+JrdNUWklY7bZ8esOIcBZ3 KY+uDvzmTTXOkU3i0Wnnvk+RYv97nJGMZbG0xNb7qLq300a6I0wnGN4bhJUoJ0UEV4Q1 cpNS0OKxfpTBw7qdg6gUGQWdpjFdY3oWHnOo4bLrog6tU6OvJ4rPvLL2RN518z9FmzRF gyZnGc5aBhiWcBq0txk9Xsby9xkOHOQiJJbrJhNPkkd6SKrGVao2k4g7pDWe/JBlF8aa E9x1/Kg+OQEEF/44AZwv0I3qdw7uFmJRPOvyjLeP3Tpyqc82ezKwp+3LnkaBZ9/DJTlQ Z/Qg== 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 q7-20020aa79827000000b0063d2e0cf58esi3370583pfl.10.2023.05.07.23.55.46; Sun, 07 May 2023 23:55:59 -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 S232973AbjEHGyx (ORCPT + 99 others); Mon, 8 May 2023 02:54:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjEHGyt (ORCPT ); Mon, 8 May 2023 02:54:49 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96983A5DE; Sun, 7 May 2023 23:54:48 -0700 (PDT) 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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?1765308061902744809?= X-GMAIL-MSGID: =?utf-8?q?1765308061902744809?= 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);