Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2634325pxm; Mon, 28 Feb 2022 03:10:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJzprnuDCoYUsWxu4BAoJ02LrtyIHUbI+IefALj7iRFGj7flsIRBv/3U7s7JABsra0PAeiGB X-Received: by 2002:a17:906:30d1:b0:6cf:c116:c9d3 with SMTP id b17-20020a17090630d100b006cfc116c9d3mr13901431ejb.245.1646046633308; Mon, 28 Feb 2022 03:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646046633; cv=none; d=google.com; s=arc-20160816; b=OQvJwXZ/H0lbGFfLLVxz4Sy9OImqbNmo9cAnpghJupwvFJUTsxFqLNkDYpQDKv4JAD 8CBVjRowA/zuRLWDPlam5vUKfW+3NLPeAqMeWCVctZwYiJOkLicPsoF70y4LN2r8UclC F51Lw6hObrCAyi/5KgccyumwgSoL4Ow/MLoZ0r6BwtaFXJK515dKWmd5Lv7Y1nMp7syd QQIhI3bIfyWx9+4oPOtERc4Zyw0DGl7ODYEiOV+xSKI0ituJR7c/tGvAlwU5pInVToam UMRr9WMJiD4tVpVFxrQOTNsa3i/NHAkKJrRQURdqdsQH8YbG5i6Gt7PrAhDBOXCGh1Qy CMVA== 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=LVsWGxyVeLr3eIgEyWTRvHp+8QxGbHga0q37Ql+Yi0s=; b=Z/iYvWxPA3cnRh/OvX3a+LEyTfBe6yl5eSMaX8SwJuSvrnqHqWP9Ea5SkCXTqy3G6K joRSqfT/5cy/C9HFGN/rTHv65eapROLGdLmQIpXdgaVJDKayVHSzr5b8I6wTYWagpa96 RErD3XF5hO4R6TLeBMI2stuP+pSBRNp1r1WmsjR5TmZV2Z1hAAV7zsV/LK/iwIb67wwe qZ9jADsJwKyGZgC74Hl8aO+YSrlg6rk/QMLH2wctrZR0y8U1Xm4aqT44iXmuaz1yAE9V qAmZ4G770MgMtIxEBCQ1u+Tr0Lk4FhA/8TeqyNjllZgUbp8bUjryoyHDlXq4qpPLMIDH O/6Q== 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 g22-20020a170906521600b006d0876dbddasi5303133ejm.587.2022.02.28.03.10.11; Mon, 28 Feb 2022 03:10:33 -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 S233204AbiB1GcA (ORCPT + 99 others); Mon, 28 Feb 2022 01:32:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbiB1Gb7 (ORCPT ); Mon, 28 Feb 2022 01:31:59 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0E2FD66AE4; Sun, 27 Feb 2022 22:31:17 -0800 (PST) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxGMkrbBxiQxMIAA--.10334S2; Mon, 28 Feb 2022 14:31:07 +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 v2 0/4] MIPS: Modify mem= and memmap= parameter Date: Mon, 28 Feb 2022 14:31:02 +0800 Message-Id: <1646029866-6692-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9DxGMkrbBxiQxMIAA--.10334S2 X-Coremail-Antispam: 1UD129KBjvdXoWrKr4xGFyxXr17Zw1DCF45KFg_yoWfKrb_tF Z09F9rGw4UGF43XFWrtFs8XFW7tr4UZw4FyFn7G3yxKr9rAF4rGF4a93yaqr1vvFyvy3W5 J3s0vr93tr129jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbckFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK67AK6r47 MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr 0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0E wIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJV W8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI 42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JUkhLnUUUUU= 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. 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 | 71 ++++++++++++------------------------------------ include/linux/memblock.h | 1 + mm/memblock.c | 9 ++++-- 3 files changed, 25 insertions(+), 56 deletions(-) -- 2.1.0