Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2357703pxb; Mon, 19 Apr 2021 04:00:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSeTP19mgNatYlpVvGCrQJWkg7SGM7zkZN7ynVUlAfkWTTYJddmlm8WMvhT/Z68L9nAMEA X-Received: by 2002:a05:6402:22a4:: with SMTP id cx4mr18980635edb.232.1618830038084; Mon, 19 Apr 2021 04:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618830038; cv=none; d=google.com; s=arc-20160816; b=OPpV75BM7tvCc7nRkpDlPa0VvdFvoKwViAaWI4tKrNDLYCJcZdsXBRIsHkV2Z3SKCJ 6MeSz5FPZzKWnaFz4Z2ssmS/xjRhepYqaMCBV52qH/gQBpDuAumZHj0Ue86QjASOgGIy 2ss/5sqAggJyY3xPWwsVSzqRm6w8REnXmV794e5AZ225b9UJN6WEkRHZVK8JvTqkW0hB XA1yxkDuWvzX4ZvwiKON/Vh59b5Uni7ytq6wsz7iVRe/4sVOpN7fW3beUSSpgTdi/wYE ry0U5c2lVpivZTOn2FFIplCjhFCnyALTly+kFB5rJCStmgai/LF8yBFwdROsuGrC1IbA 84jA== 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=Aax3RVIig6XJM1nmIQxrgaJYPLEdr/7FhIZk3iXVTA8=; b=cegs7EStznXRZIbZtOSy9HsckM03vmuafPlJnRVxAGZcjjYi9To0l82zxs8YCVExqM ebzB0Jbgp28SpVuetnRX6n3QXG+boRc5mhT6QCxQGaBDK+RXgo1GO62wWekF/JLHe6dv HCZsr5HLSCYP2IfkJYXerskC6E2xGlJbi4Erixt01dbwhb5x4xpvQtNUPjsvtIqLtO9f 45JoexJSADLNdIEEM++QC1bBN6BdSSxwveHv2pNO8dVAlScOOJOhKKDv2yC0mddLtWTU yfHB9vB6P5QXjx5dAyTpzN4BW32wFeTq88SriXtki03iV+HgmDz28JV25tn0wYiDftaE GpAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hx28si11236128ejc.720.2021.04.19.04.00.10; Mon, 19 Apr 2021 04:00:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237833AbhDSK5V (ORCPT + 99 others); Mon, 19 Apr 2021 06:57:21 -0400 Received: from mail.loongson.cn ([114.242.206.163]:33656 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236023AbhDSK5V (ORCPT ); Mon, 19 Apr 2021 06:57:21 -0400 Received: from bogon.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx7+3xYX1gdFwKAA--.1753S2; Mon, 19 Apr 2021 18:56:49 +0800 (CST) From: Youling Tang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Huacai Chen Subject: [PATCH] mips: kdump: Crash kernel should be able to see old memories Date: Mon, 19 Apr 2021 18:56:47 +0800 Message-Id: <1618829807-12522-1-git-send-email-tangyouling@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9Dx7+3xYX1gdFwKAA--.1753S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZrWfuFy5GrWDCF15KFyUZFb_yoWkCrg_KF 12vrWkGr1YyF4v9rZxJ34fWFWYkw47XryFk3Z5G3y5Ja45Ja1kGrZ0yasxXrs8Wr4kurn5 C398ZFs09wsFgjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb28YjsxI4VWkCwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z2 80aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAK zVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Gr0_Cr1lOx 8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkIecxEwVAFwVW8twCF04k20xvY 0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I 0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAI cVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcV CF04k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07jO_-9UUUUU= X-CM-SenderInfo: 5wdqw5prxox03j6o00pqjv00gofq/ Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huacai Chen kexec-tools use mem=X@Y to pass usable memories to crash kernel, but in commit a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") all BIOS passed memories are removed by early_parse_mem(). I think this is reasonable for a normal kernel but not for a crash kernel, because a crash kernel should be able to see all old memories, even though it is not supposed to use them. Fixes: a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Huacai Chen Signed-off-by: Youling Tang --- arch/mips/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index b86e241..ac90d3b 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -351,8 +351,10 @@ static int __init early_parse_mem(char *p) */ if (usermem == 0) { usermem = 1; +#ifndef CONFIG_CRASH_DUMP memblock_remove(memblock_start_of_DRAM(), memblock_end_of_DRAM() - memblock_start_of_DRAM()); +#endif } start = 0; size = memparse(p, &p); -- 2.1.0