Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2863874pxm; Mon, 28 Feb 2022 07:29:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM6s1AcVcmZL1JymPBBsvBLWUKR6r9RJNXMf2M31hN9/KPto9Og7MmyAhNSPhlhA2GSAdj X-Received: by 2002:a17:902:6b0c:b0:151:41d2:7f84 with SMTP id o12-20020a1709026b0c00b0015141d27f84mr13875217plk.51.1646062186182; Mon, 28 Feb 2022 07:29:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646062186; cv=none; d=google.com; s=arc-20160816; b=Zg19guvmCT0zZDW7hN85PrSMAzAz44xDCeB/4bxBK8OUikDb3L457X0LYyDg9rH97p Oo8RCkhk3cke7LFHpuibhcPf1waA3A4S5u0BN8eUTr35MVZ0Gg6A2J8GYr9l7TCPl6/L 45MQt6GxgcnYcwH04rAvkDj7yx77RCDep2UhvnaPWejsHW4ZcW5Xon0Sk/IH5iu7VHRM pVujFGfXXJxU2maXgry86wnXuKYnESfAIPFqWzr0NuREu3BcneosWT4lODJAu5Qys7w0 BO2TFQYYRRw8hn2TPvPRjwH4x/WJ7L8eyeq/z4S83X9ovj4xeXP9s/7os9oW9YBG0SGp Ss9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=ADy3dQYLskoUZvhiC7zU5X9lwaqUujxBg4pT2LBJ0Hc=; b=X8uRA0iWGuxUPfRvL/X58/AHrMUnCUE4SepXVlI6iGc4t32ImSq/ozFNzMcykysyZy hOnefsuRaJq1OBgr3kYLLE80XIsZ0HyPoyw1iurngbCsjPDlwxcUlTQbSQlX9VuSUpi9 AYkgcOw80NfNX5IP51vtqcT2Btb+74dkLUMSJR1h43ka+0LJVS6F+Y8P5oNSmTPgvGuC 0lt4DbiBtjdtWA1fELCKPxnA3uR4UfAMwnD/DkIM9+g1iKxNK/PL7/sFLjMBqYeP7PkZ so+zmnO3MVKZdcNzJbzobvOcJ8auC4gxpfnojPnoLDgXonObELi+UpSJL3D1BH9wJi9/ RE3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a170902d34a00b0014ed48490a8si9289003plk.576.2022.02.28.07.29.29; Mon, 28 Feb 2022 07:29:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235757AbiB1NY3 (ORCPT + 99 others); Mon, 28 Feb 2022 08:24:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235696AbiB1NYZ (ORCPT ); Mon, 28 Feb 2022 08:24:25 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2301826AD6; Mon, 28 Feb 2022 05:23:44 -0800 (PST) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxeMjazBxiKEAIAA--.10706S2; Mon, 28 Feb 2022 21:23:38 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer , Mike Rapoport , Andrew Morton Cc: Xuefeng Li , linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/4] MIPS: Modify mem= and memmap= parameter Date: Mon, 28 Feb 2022 21:23:33 +0800 Message-Id: <1646054617-16799-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9DxeMjazBxiKEAIAA--.10706S2 X-Coremail-Antispam: 1UD129KBjvdXoWrKr4xGFyxXr17Zw1DCF45KFg_yoWDKrb_tF WY9F9rGw47GF43WFWrtF43XFyxtr4UXw4rtFn7K3yxKr9rAF45GF43u3yavr1vvFyvv3W5 J3s8Z3s3tr129jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbc8FF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s 1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0 cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8Jw ACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK67AK6ry8MxAI w28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr 4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxG rwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8Jw CI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY 6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfU1NVyUUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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