From patchwork Tue Jun 8 08:34:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 12305795 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 3AE8DC47082 for ; Tue, 8 Jun 2021 08:25:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AFE856128B for ; Tue, 8 Jun 2021 08:25:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFE856128B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 099286B006C; Tue, 8 Jun 2021 04:25:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 048EA6B006E; Tue, 8 Jun 2021 04:25:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E52D66B0070; Tue, 8 Jun 2021 04:25:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0206.hostedemail.com [216.40.44.206]) by kanga.kvack.org (Postfix) with ESMTP id B55266B006C for ; Tue, 8 Jun 2021 04:25:57 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 47383181AEF1A for ; Tue, 8 Jun 2021 08:25:57 +0000 (UTC) X-FDA: 78229873554.28.36DC9D2 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf16.hostedemail.com (Postfix) with ESMTP id B61B78019344 for ; Tue, 8 Jun 2021 08:25:53 +0000 (UTC) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Fzjqf0gZpzWsj1; Tue, 8 Jun 2021 16:21:02 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 16:25:52 +0800 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.2176.2; Tue, 8 Jun 2021 16:25:52 +0800 From: Kefeng Wang To: Andrew Morton , CC: , Kefeng Wang Subject: [PATCH v3 resend 00/15] init_mm: cleanup ARCH's text/data/brk setup code Date: Tue, 8 Jun 2021 16:34:03 +0800 Message-ID: <20210608083418.137226-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Authentication-Results: imf16.hostedemail.com; dkim=none; spf=pass (imf16.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=none) header.from=huawei.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: B61B78019344 X-Stat-Signature: yjsw9i4mzwe7kd4ymybxzwz8r7tymz4h X-HE-Tag: 1623140753-378620 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: Add setup_initial_init_mm() helper, then use it to cleanup the text, data and brk setup code. v3: - resend all and fix x86 warning - make helper declaration in mm.h, implemention in init-mm.c, suggested by Mike - collect ACKs v2: - change argument from "char *" to "void *" setup_initial_init_mm() suggested by Geert Uytterhoeven - use NULL instead of (void *)0 on h8300 and m68k Kefeng Wang (15): mm: add setup_initial_init_mm() helper arc: convert to setup_initial_init_mm() arm: convert to setup_initial_init_mm() arm64: convert to setup_initial_init_mm() csky: convert to setup_initial_init_mm() h8300: convert to setup_initial_init_mm() m68k: convert to setup_initial_init_mm() nds32: convert to setup_initial_init_mm() nios2: convert to setup_initial_init_mm() openrisc: convert to setup_initial_init_mm() powerpc: convert to setup_initial_init_mm() riscv: convert to setup_initial_init_mm() s390: convert to setup_initial_init_mm() sh: convert to setup_initial_init_mm() x86: convert to setup_initial_init_mm() arch/arc/mm/init.c | 5 +---- arch/arm/kernel/setup.c | 5 +---- arch/arm64/kernel/setup.c | 5 +---- arch/csky/kernel/setup.c | 5 +---- arch/h8300/kernel/setup.c | 5 +---- arch/m68k/kernel/setup_mm.c | 5 +---- arch/m68k/kernel/setup_no.c | 5 +---- arch/nds32/kernel/setup.c | 5 +---- arch/nios2/kernel/setup.c | 5 +---- arch/openrisc/kernel/setup.c | 5 +---- arch/powerpc/kernel/setup-common.c | 5 +---- arch/riscv/kernel/setup.c | 5 +---- arch/s390/kernel/setup.c | 5 +---- arch/sh/kernel/setup.c | 5 +---- arch/x86/kernel/setup.c | 5 +---- include/linux/mm.h | 3 +++ mm/init-mm.c | 9 +++++++++ 17 files changed, 27 insertions(+), 60 deletions(-)