From patchwork Thu Jul 8 01:08:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12364413 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=unavailable 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 299A2C11F69 for ; Thu, 8 Jul 2021 01:08:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D150161CDB for ; Thu, 8 Jul 2021 01:08:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D150161CDB 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 C65F26B008A; Wed, 7 Jul 2021 21:08:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C3CF46B008C; Wed, 7 Jul 2021 21:08:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A68C76B0092; Wed, 7 Jul 2021 21:08:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0177.hostedemail.com [216.40.44.177]) by kanga.kvack.org (Postfix) with ESMTP id 847E46B008A for ; Wed, 7 Jul 2021 21:08:54 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E1E2F824C442 for ; Thu, 8 Jul 2021 01:08:53 +0000 (UTC) X-FDA: 78337636146.05.F5A7546 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf08.hostedemail.com (Postfix) with ESMTP id 4990730000A5 for ; Thu, 8 Jul 2021 01:08:53 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 5ACBB61CD3; Thu, 8 Jul 2021 01:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1625706532; bh=uKWWoA3nRbhSfqbwBw6QR79fTaF/sulh1yVGe8V40+w=; h=Date:From:To:Subject:In-Reply-To:From; b=sIU5M2IjVH7YS3bpofEz78ISEDaIgbxpUAxifD8f41/0M5H2iDXKh+LGGrnXoVvVs BzLsueqMa9sBQ2q4qjyZGcPYIGwQIADb4onTJqDu4gb4URXzF/srH5q2UJu4CIgXm4 UqgM3zdpLotNyKp7n/OtJwt6Qg0F49yjuXmP+jLA= Date: Wed, 07 Jul 2021 18:08:51 -0700 From: Andrew Morton To: akpm@linux-foundation.org, benh@kernel.crashing.org, christophe.leroy@csgroup.eu, jrdr.linux@gmail.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, mpe@ellerman.id.au, torvalds@linux-foundation.org, wangkefeng.wang@huawei.com Subject: [patch 26/54] powerpc: convert to setup_initial_init_mm() Message-ID: <20210708010851.Nu7rJ1_vQ%akpm@linux-foundation.org> In-Reply-To: <20210707175950.eceddb86c6c555555d4730e2@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Stat-Signature: rdx6ecezzdgakjfd3gg3z8ze9j7u7y1y X-Rspamd-Queue-Id: 4990730000A5 X-Rspam-User: nil X-Rspamd-Server: rspam01 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=sIU5M2Ij; dmarc=none; spf=pass (imf08.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1625706533-207844 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: powerpc: convert to setup_initial_init_mm() Use setup_initial_init_mm() helper to simplify code. Note klimit is (unsigned long) _end, with new helper, will use _end directly. Link: https://lkml.kernel.org/r/20210608083418.137226-12-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Souptick Joarder Cc: Christophe Leroy Signed-off-by: Andrew Morton --- arch/powerpc/kernel/setup-common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/arch/powerpc/kernel/setup-common.c~powerpc-convert-to-setup_initial_init_mm +++ a/arch/powerpc/kernel/setup-common.c @@ -926,10 +926,7 @@ void __init setup_arch(char **cmdline_p) klp_init_thread_info(&init_task); - init_mm.start_code = (unsigned long)_stext; - init_mm.end_code = (unsigned long) _etext; - init_mm.end_data = (unsigned long) _edata; - init_mm.brk = (unsigned long)_end; + setup_initial_init_mm(_stext, _etext, _edata, _end); mm_iommu_init(&init_mm); irqstack_early_init();