From mboxrd@z Thu Jan 1 00:00:00 1970 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 B449FC4743E for ; Sun, 6 Jun 2021 21:29:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B2E0613EF for ; Sun, 6 Jun 2021 21:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbhFFVbJ (ORCPT ); Sun, 6 Jun 2021 17:31:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:51778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbhFFVbJ (ORCPT ); Sun, 6 Jun 2021 17:31:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 953E4613B6; Sun, 6 Jun 2021 21:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623014959; bh=4t5DawWhLmQPAFGRKhX1jFE4WEqbArxXgmERWe2C0xQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wu/fyJA4UR/3OsXx5PdnZuKJmqUDl6cQ0I5qOPmOobYB/YwD3loa7CHDMxmjDs7+O /+vTonUI3DKMDg+OJCEqqvIqeoGeqCBaFfCM6MGkwmW6KvTZO5CLkleOMNy5KmfR4d PteqC/M3+gPE1uiUsTSHvYSMYrpSkJ75a30BXywU3cSKzUfAv/A0+aJ76/IGuUYyhl S6LUi9EmnHUL5lEcDnAewWs8EsYomaOBUCef/cImLCqjaabNrEeHJoCWkyMWvCEGV1 9+bVS1xXN0QGlOiLh2r3UXefQeesEuK/PQnscumw1S0RmHISk2eF6NrfUP8ytWcSpP sTzKK7DJdkKEw== Date: Mon, 7 Jun 2021 00:29:09 +0300 From: Mike Rapoport To: Kefeng Wang Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Message-ID: References: <20210604070633.32363-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210604070633.32363-1-wangkefeng.wang@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-csky@vger.kernel.org Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: > Add setup_initial_init_mm() helper, then use it > to cleanup the text, data and brk setup code. > > 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 > - collect ACKs > > Cc: linux-snps-arc@lists.infradead.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-csky@vger.kernel.org > Cc: uclinux-h8-devel@lists.sourceforge.jp > Cc: linux-m68k@lists.linux-m68k.org > Cc: openrisc@lists.librecores.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-riscv@lists.infradead.org > Cc: linux-sh@vger.kernel.org > Cc: linux-s390@vger.kernel.org > 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() I might be missing something, but AFAIU the init_mm.start_code and other fields are not used really early so the new setup_initial_init_mm() function can be called in the generic code outside setup_arch(), e.g in mm_init(). > 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_types.h | 8 ++++++++ > 16 files changed, 23 insertions(+), 60 deletions(-) > > -- > 2.26.2 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 5E1F6C4743D for ; Sun, 6 Jun 2021 21:29:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24C5661432 for ; Sun, 6 Jun 2021 21:29:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24C5661432 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5cgob1DPdlm49Zt3yWVrM6sKiD0sVEvzDCtFedmIbxk=; b=XKD8+pDTqSVp4u In51voCQWu4I3VQFanR4dl+5iakfziJVFYLSvKMMPQQWlRCDtZMjygctx2UyEE7v9jrvI7753TJrn RCBt11spi0L+nSbdnGoge55GlhdTm/sKHd4IrsEVsZlrBi38LtYn/uU7hM+GD/96XVi6Xpae6FEkh dXXBr9BUEAX67BFOeJ3Xlg6LLbdZF+ajQda7sQQ4bZtTN3v5ouy8SxsMOrP9Az9xAfqMbHqJ8hZQV jdTEpHgqdywL0Zlei66PRfpDbWNXrTka0GmAJUuJNF+2dL12lxmq0P7cMFWz+ZSeMApEjYAYgMsxB i8fEXFS86XxtS7mXeugw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lq0Ks-000qbO-W3; Sun, 06 Jun 2021 21:29:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lq0Ke-000qa1-Aq; Sun, 06 Jun 2021 21:29:21 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 953E4613B6; Sun, 6 Jun 2021 21:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623014959; bh=4t5DawWhLmQPAFGRKhX1jFE4WEqbArxXgmERWe2C0xQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wu/fyJA4UR/3OsXx5PdnZuKJmqUDl6cQ0I5qOPmOobYB/YwD3loa7CHDMxmjDs7+O /+vTonUI3DKMDg+OJCEqqvIqeoGeqCBaFfCM6MGkwmW6KvTZO5CLkleOMNy5KmfR4d PteqC/M3+gPE1uiUsTSHvYSMYrpSkJ75a30BXywU3cSKzUfAv/A0+aJ76/IGuUYyhl S6LUi9EmnHUL5lEcDnAewWs8EsYomaOBUCef/cImLCqjaabNrEeHJoCWkyMWvCEGV1 9+bVS1xXN0QGlOiLh2r3UXefQeesEuK/PQnscumw1S0RmHISk2eF6NrfUP8ytWcSpP sTzKK7DJdkKEw== Date: Mon, 7 Jun 2021 00:29:09 +0300 From: Mike Rapoport To: Kefeng Wang Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Message-ID: References: <20210604070633.32363-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210604070633.32363-1-wangkefeng.wang@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210606_142920_428987_F29A5452 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: > Add setup_initial_init_mm() helper, then use it > to cleanup the text, data and brk setup code. > > 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 > - collect ACKs > > Cc: linux-snps-arc@lists.infradead.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-csky@vger.kernel.org > Cc: uclinux-h8-devel@lists.sourceforge.jp > Cc: linux-m68k@lists.linux-m68k.org > Cc: openrisc@lists.librecores.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-riscv@lists.infradead.org > Cc: linux-sh@vger.kernel.org > Cc: linux-s390@vger.kernel.org > 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() I might be missing something, but AFAIU the init_mm.start_code and other fields are not used really early so the new setup_initial_init_mm() function can be called in the generic code outside setup_arch(), e.g in mm_init(). > 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_types.h | 8 ++++++++ > 16 files changed, 23 insertions(+), 60 deletions(-) > > -- > 2.26.2 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Sincerely yours, Mike. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 0385EC4743E for ; Sun, 6 Jun 2021 21:29:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BAE48613B6 for ; Sun, 6 Jun 2021 21:29:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAE48613B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PfbvooloTSynd5JNzZ73FOJm3PXLbHkinKimH17Xorg=; b=PcKD41yZ0Hk7T3 0wI/VNNFjO838tH7njAQCckaGSxIMAOaJQv5H3mXOzSDJAEr292UztmCmYTJ17H4Ak6eU2TPtG/Z4 xW8EcV2vB8CmIcOmHepMdmAZO+dp8Yf3fgOiFgv1/5XnEwogNmoM0b/IiudOPqpiJhTvRN/DJaFHI PPnOzA2QyrAIsP/XTWBu7AR/By8uG0HVd5KeJ1gtYagobeYKIB5Yv36Y+IQcRhlkZDpEorticAY67 YIV5CoocpQpPrU6w+BlDsew1+Vo9uVWp8bC4oK2KX042QYodkJLL5nkZ8MaG5f86aW1Rnh+Uah/Qt W2fDLK2qm4KkOpBPQ9dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lq0Ku-000qbb-7P; Sun, 06 Jun 2021 21:29:36 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lq0Ke-000qa1-Aq; Sun, 06 Jun 2021 21:29:21 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 953E4613B6; Sun, 6 Jun 2021 21:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623014959; bh=4t5DawWhLmQPAFGRKhX1jFE4WEqbArxXgmERWe2C0xQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wu/fyJA4UR/3OsXx5PdnZuKJmqUDl6cQ0I5qOPmOobYB/YwD3loa7CHDMxmjDs7+O /+vTonUI3DKMDg+OJCEqqvIqeoGeqCBaFfCM6MGkwmW6KvTZO5CLkleOMNy5KmfR4d PteqC/M3+gPE1uiUsTSHvYSMYrpSkJ75a30BXywU3cSKzUfAv/A0+aJ76/IGuUYyhl S6LUi9EmnHUL5lEcDnAewWs8EsYomaOBUCef/cImLCqjaabNrEeHJoCWkyMWvCEGV1 9+bVS1xXN0QGlOiLh2r3UXefQeesEuK/PQnscumw1S0RmHISk2eF6NrfUP8ytWcSpP sTzKK7DJdkKEw== Date: Mon, 7 Jun 2021 00:29:09 +0300 From: Mike Rapoport To: Kefeng Wang Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Message-ID: References: <20210604070633.32363-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210604070633.32363-1-wangkefeng.wang@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210606_142920_428987_F29A5452 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: > Add setup_initial_init_mm() helper, then use it > to cleanup the text, data and brk setup code. > > 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 > - collect ACKs > > Cc: linux-snps-arc@lists.infradead.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-csky@vger.kernel.org > Cc: uclinux-h8-devel@lists.sourceforge.jp > Cc: linux-m68k@lists.linux-m68k.org > Cc: openrisc@lists.librecores.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-riscv@lists.infradead.org > Cc: linux-sh@vger.kernel.org > Cc: linux-s390@vger.kernel.org > 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() I might be missing something, but AFAIU the init_mm.start_code and other fields are not used really early so the new setup_initial_init_mm() function can be called in the generic code outside setup_arch(), e.g in mm_init(). > 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_types.h | 8 ++++++++ > 16 files changed, 23 insertions(+), 60 deletions(-) > > -- > 2.26.2 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Sincerely yours, Mike. _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Date: Mon, 7 Jun 2021 00:29:09 +0300 Subject: [OpenRISC] [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code In-Reply-To: <20210604070633.32363-1-wangkefeng.wang@huawei.com> References: <20210604070633.32363-1-wangkefeng.wang@huawei.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: > Add setup_initial_init_mm() helper, then use it > to cleanup the text, data and brk setup code. > > 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 > - collect ACKs > > Cc: linux-snps-arc at lists.infradead.org > Cc: linux-arm-kernel at lists.infradead.org > Cc: linux-csky at vger.kernel.org > Cc: uclinux-h8-devel at lists.sourceforge.jp > Cc: linux-m68k at lists.linux-m68k.org > Cc: openrisc at lists.librecores.org > Cc: linuxppc-dev at lists.ozlabs.org > Cc: linux-riscv at lists.infradead.org > Cc: linux-sh at vger.kernel.org > Cc: linux-s390 at vger.kernel.org > 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() I might be missing something, but AFAIU the init_mm.start_code and other fields are not used really early so the new setup_initial_init_mm() function can be called in the generic code outside setup_arch(), e.g in mm_init(). > 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_types.h | 8 ++++++++ > 16 files changed, 23 insertions(+), 60 deletions(-) > > -- > 2.26.2 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 8A309C4743F for ; Sun, 6 Jun 2021 21:29:52 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BCA361380 for ; Sun, 6 Jun 2021 21:29:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BCA361380 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FyqQk1q9Tz3btG for ; Mon, 7 Jun 2021 07:29:50 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Wu/fyJA4; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=rppt@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Wu/fyJA4; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FyqQC1C23z2ypn for ; Mon, 7 Jun 2021 07:29:23 +1000 (AEST) Received: by mail.kernel.org (Postfix) with ESMTPSA id 953E4613B6; Sun, 6 Jun 2021 21:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623014959; bh=4t5DawWhLmQPAFGRKhX1jFE4WEqbArxXgmERWe2C0xQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wu/fyJA4UR/3OsXx5PdnZuKJmqUDl6cQ0I5qOPmOobYB/YwD3loa7CHDMxmjDs7+O /+vTonUI3DKMDg+OJCEqqvIqeoGeqCBaFfCM6MGkwmW6KvTZO5CLkleOMNy5KmfR4d PteqC/M3+gPE1uiUsTSHvYSMYrpSkJ75a30BXywU3cSKzUfAv/A0+aJ76/IGuUYyhl S6LUi9EmnHUL5lEcDnAewWs8EsYomaOBUCef/cImLCqjaabNrEeHJoCWkyMWvCEGV1 9+bVS1xXN0QGlOiLh2r3UXefQeesEuK/PQnscumw1S0RmHISk2eF6NrfUP8ytWcSpP sTzKK7DJdkKEw== Date: Mon, 7 Jun 2021 00:29:09 +0300 From: Mike Rapoport To: Kefeng Wang Subject: Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Message-ID: References: <20210604070633.32363-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210604070633.32363-1-wangkefeng.wang@huawei.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: uclinux-h8-devel@lists.sourceforge.jp, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, linux-mm@kvack.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Andrew Morton , linux-snps-arc@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: > Add setup_initial_init_mm() helper, then use it > to cleanup the text, data and brk setup code. > > 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 > - collect ACKs > > Cc: linux-snps-arc@lists.infradead.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-csky@vger.kernel.org > Cc: uclinux-h8-devel@lists.sourceforge.jp > Cc: linux-m68k@lists.linux-m68k.org > Cc: openrisc@lists.librecores.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-riscv@lists.infradead.org > Cc: linux-sh@vger.kernel.org > Cc: linux-s390@vger.kernel.org > 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() I might be missing something, but AFAIU the init_mm.start_code and other fields are not used really early so the new setup_initial_init_mm() function can be called in the generic code outside setup_arch(), e.g in mm_init(). > 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_types.h | 8 ++++++++ > 16 files changed, 23 insertions(+), 60 deletions(-) > > -- > 2.26.2 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 28E7CC4743E for ; Sun, 6 Jun 2021 21:30:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0BAF61380 for ; Sun, 6 Jun 2021 21:30:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0BAF61380 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LsrDcParqY0YisDn9FcXJrWXeJ6qdjLfXyNN8Rbwqik=; b=18GOzrrQ5B99MS 2NGG6Xt6pPBggxi+GzF8fPWz3s9hkkPEdgAAzwBQziWxODF8Iaei/sjH9Nu7N0pSeTNJwkKiWXC02 Jxd5Q90wS7Ti+GTsRRdm32iWyrUt1kVry3tqdzrt+tfFEpi06OthTj1gF+xjom3zDpxkVI4OrKKYN AgCHErqgsBIwrypo6gw3SMVNCwi8/8w0wdV73q8mBsgN0qgdmnzVPW+qrwo9nA2dZVN+3ZnX53Ctg D9hFuFKxKFF1Fl0ZHVWRX+YH5G8q7JroCYnw1d7xqCN1iKu0fgSjIUsyCuRqwTHf1U/vz5ufnATHB KUJcjL70HYUDPRZcKjbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lq0Ki-000qaa-E3; Sun, 06 Jun 2021 21:29:24 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lq0Ke-000qa1-Aq; Sun, 06 Jun 2021 21:29:21 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 953E4613B6; Sun, 6 Jun 2021 21:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623014959; bh=4t5DawWhLmQPAFGRKhX1jFE4WEqbArxXgmERWe2C0xQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wu/fyJA4UR/3OsXx5PdnZuKJmqUDl6cQ0I5qOPmOobYB/YwD3loa7CHDMxmjDs7+O /+vTonUI3DKMDg+OJCEqqvIqeoGeqCBaFfCM6MGkwmW6KvTZO5CLkleOMNy5KmfR4d PteqC/M3+gPE1uiUsTSHvYSMYrpSkJ75a30BXywU3cSKzUfAv/A0+aJ76/IGuUYyhl S6LUi9EmnHUL5lEcDnAewWs8EsYomaOBUCef/cImLCqjaabNrEeHJoCWkyMWvCEGV1 9+bVS1xXN0QGlOiLh2r3UXefQeesEuK/PQnscumw1S0RmHISk2eF6NrfUP8ytWcSpP sTzKK7DJdkKEw== Date: Mon, 7 Jun 2021 00:29:09 +0300 From: Mike Rapoport To: Kefeng Wang Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Message-ID: References: <20210604070633.32363-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210604070633.32363-1-wangkefeng.wang@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210606_142920_428987_F29A5452 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: > Add setup_initial_init_mm() helper, then use it > to cleanup the text, data and brk setup code. > > 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 > - collect ACKs > > Cc: linux-snps-arc@lists.infradead.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-csky@vger.kernel.org > Cc: uclinux-h8-devel@lists.sourceforge.jp > Cc: linux-m68k@lists.linux-m68k.org > Cc: openrisc@lists.librecores.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-riscv@lists.infradead.org > Cc: linux-sh@vger.kernel.org > Cc: linux-s390@vger.kernel.org > 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() I might be missing something, but AFAIU the init_mm.start_code and other fields are not used really early so the new setup_initial_init_mm() function can be called in the generic code outside setup_arch(), e.g in mm_init(). > 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_types.h | 8 ++++++++ > 16 files changed, 23 insertions(+), 60 deletions(-) > > -- > 2.26.2 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel