From patchwork Thu Jul 8 01:09:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12364421 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1466DC07E95 for ; Thu, 8 Jul 2021 01:09:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D7BD661CDE for ; Thu, 8 Jul 2021 01:09:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7BD661CDE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CB3D16B0095; Wed, 7 Jul 2021 21:09:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C8AED6B0096; Wed, 7 Jul 2021 21:09:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B7AB66B0098; Wed, 7 Jul 2021 21:09:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0248.hostedemail.com [216.40.44.248]) by kanga.kvack.org (Postfix) with ESMTP id 8FBA46B0095 for ; Wed, 7 Jul 2021 21:09:06 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 245AC8248047 for ; Thu, 8 Jul 2021 01:09:05 +0000 (UTC) X-FDA: 78337636650.21.9DCAEA0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP id AF5DC90000AF for ; Thu, 8 Jul 2021 01:09:04 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id CE4B661CD3; Thu, 8 Jul 2021 01:09:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1625706544; bh=RLTuwmjG0Van34CYjZWL9fGqJSOQhfMV//gUTP/TH1M=; h=Date:From:To:Subject:In-Reply-To:From; b=VCxAQ+HBiBVZj0QTXhwoLiaD4OkjBw9iVdvG4TlQTp6+JfvP8XjbOPl0799REdzEH LEPuPCjlJF7sjbTW4WClAFG6VGLbRe+u6HazclmGnHA5OBfLJGG9z4wzRcXCADg2gE bMFPfPBaYuzd14Pod7PeMiOk+nUGg7AAWB6P2XpY= Date: Wed, 07 Jul 2021 18:09:03 -0700 From: Andrew Morton To: akpm@linux-foundation.org, linux-mm@kvack.org, mingo@redhat.com, mm-commits@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, wangkefeng.wang@huawei.com Subject: [patch 30/54] x86: convert to setup_initial_init_mm() Message-ID: <20210708010903.oR_PTO5mt%akpm@linux-foundation.org> In-Reply-To: <20210707175950.eceddb86c6c555555d4730e2@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=VCxAQ+HB; spf=pass (imf23.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Stat-Signature: faad8pcno1g4knfucx8ws3zm5mb1jmh6 X-Rspamd-Queue-Id: AF5DC90000AF X-Rspam-User: nil X-HE-Tag: 1625706544-239636 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: From: Kefeng Wang Subject: x86: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Link: https://lkml.kernel.org/r/20210608083418.137226-16-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton --- arch/x86/kernel/setup.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/arch/x86/kernel/setup.c~x86-convert-to-setup_initial_init_mm +++ a/arch/x86/kernel/setup.c @@ -847,10 +847,7 @@ void __init setup_arch(char **cmdline_p) if (!boot_params.hdr.root_flags) root_mountflags &= ~MS_RDONLY; - init_mm.start_code = (unsigned long) _text; - init_mm.end_code = (unsigned long) _etext; - init_mm.end_data = (unsigned long) _edata; - init_mm.brk = _brk_end; + setup_initial_init_mm(_text, _etext, _edata, (void *)_brk_end); code_resource.start = __pa_symbol(_text); code_resource.end = __pa_symbol(_etext)-1;