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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95CE6C433EF for ; Tue, 1 Mar 2022 11:51:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 07DD18D0002; Tue, 1 Mar 2022 06:51:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0291F8D0001; Tue, 1 Mar 2022 06:51:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E810F8D0002; Tue, 1 Mar 2022 06:51:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id D953F8D0001 for ; Tue, 1 Mar 2022 06:51:29 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8C76F9BE2C for ; Tue, 1 Mar 2022 11:51:29 +0000 (UTC) X-FDA: 79195652298.28.8960265 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by imf22.hostedemail.com (Postfix) with ESMTP id 2134BC000B for ; Tue, 1 Mar 2022 11:51:27 +0000 (UTC) Received: from [10.130.0.135] (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxn8+7CB5iY2MAAA--.2269S3; Tue, 01 Mar 2022 19:51:23 +0800 (CST) Subject: Re: [PATCH v4 0/4] MIPS: Modify mem= and memmap= parameter To: Mike Rapoport References: <1646108941-27919-1-git-send-email-yangtiezhu@loongson.cn> Cc: Thomas Bogendoerfer , Andrew Morton , Xuefeng Li , linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org From: Tiezhu Yang Message-ID: Date: Tue, 1 Mar 2022 19:51:23 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID:AQAAf9Dxn8+7CB5iY2MAAA--.2269S3 X-Coremail-Antispam: 1UD129KBjvJXoW7Aw18Jr1DCr45uFW7Xr4rGrg_yoW8Ww17pw 1Sqayayr4kXr1IvF1I9w1xXry5Jw18tr97Gry2yrWrCr4YkF1Iqr4xXan5ZFyqv34fGa47 WrsxtF909w1UAaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvm14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCYjI0SjxkI62AI1cAE67vI Y487MxkIecxEwVAFwVW8KwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw C20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAF wI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjx v20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2 z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnU UI43ZEXa7VUjDKsUUUUUU== X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 2134BC000B X-Stat-Signature: jnrqa1j5z71j77x5z6zh9gqdsx6i74qr Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf22.hostedemail.com: domain of yangtiezhu@loongson.cn designates 114.242.206.163 as permitted sender) smtp.mailfrom=yangtiezhu@loongson.cn X-HE-Tag: 1646135487-3667 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: On 03/01/2022 05:55 PM, Mike Rapoport wrote: > Hi, > > On Tue, Mar 01, 2022 at 12:28:57PM +0800, Tiezhu Yang wrote: >> In the current code, the kernel command-line parameter mem= and memmap= >> can not work well on MIPS, this patchset refactors the related code to >> fix them. >> >> For kdump on MIPS, if the users want to limit the memory region for the >> capture kernel to avoid corrupting the memory image of the panic kernel, >> use the parameter memmap=limit@base is the proper way, I will submit a >> patch to use memmap=limit@base for kexec-tools after this patchset is >> applied. > > Sorry, apparently I misread the prevoius version. > What's wrong with the current implementation of mem=limit@base for the > kdump case? In the current code, without this patchset, kernel boot hangs when add mem=3G, mem=3G@64M or memmap=3G@64M to the command-line, it means that the parameter mem= and memmap= have bug on mips. Thanks, Tiezhu > >> v4: Fix some build warnings reported by kernel test robot >> >> v3: Modify patch #3 to maintain compatibility for memmap=limit{$,#,!}base, >> commented by Mike Rapoport, thank you >> >> v2: Add some new patches to support memmap=limit@base >> >> Tiezhu Yang (4): >> MIPS: Refactor early_parse_mem() to fix mem= parameter >> memblock: Introduce memblock_mem_range_remove_map() >> MIPS: Refactor early_parse_memmap() to fix memmap= parameter >> MIPS: Remove not used variable usermem >> >> arch/mips/kernel/setup.c | 69 ++++++++++++++++++++++-------------------------- >> include/linux/memblock.h | 1 + >> mm/memblock.c | 9 +++++-- >> 3 files changed, 40 insertions(+), 39 deletions(-) >> >> -- >> 2.1.0 >> >