Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2927237yba; Tue, 16 Apr 2019 00:34:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqym8c9QdfKfm3lE0p7fpBabtAwEfA6OAm6DkQgpuY7ma7s8sBEr7eowy64fGzNW8W82VYtV X-Received: by 2002:a17:902:801:: with SMTP id 1mr5048669plk.14.1555400049186; Tue, 16 Apr 2019 00:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555400049; cv=none; d=google.com; s=arc-20160816; b=u8lnxFXzP9sq0FfXokO2VXlJlyqAXZJYta3Dw+LZJxPKKbqx44+UOBpgc0PVZC69Ss y8RxwNF9HwmehXNAW+ayujF/UCm1R4AV76w5rh/HuvZbmHDWjZbqFaikyVjbKpdMgnEU P6d6l5nL5eFb1YYn9jKWt4D5j/HLuVMCDAc5o8LSpaSuG1m/JL8Gb6g+wIBplue9GNph +9hBOH7ZHS0f9a8pR/C1NjndFAssco2vyW+dUlmmmrhWeIPvAcs/fHtOnAqNQtbIJvpK 7wGhYki1sTnjvU2FCU6YwPX7pzD6OADLkGYOZA/lfUtCkT/Zv4IHZFDGYGv1a2ng0Luw BT8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=0e/Kik8QKptIKPHVVpP81WoAaJgyAjI4Sa78KHNZsw8=; b=Vh/tj12kS/Ff+yra6e0Ud6ARUme2Y7dSpzyop+t7U62vsT7nYaccMoZyfL3qucrJqK PMSZL9Dnit5PgV+BBONka8abtKa1U8/kGU4FgXVX0h9JZMvjgcN/T3EiXJYo2zFe9s+7 d0do7lem9whhT4x8rf5qFeoa2LUfEynu1CkYrbsUGz6qH1HEgG8rvRJCJn6f78HCx7Wh 4s/TvBkuwy15Xvk4NHl4FdkfoFoXeL/38mktwMXYavbWhnTGblfuEKAFLNAZZGkk4zpX DpuwLHn1+WKGMPoBN/XOAtBkuqc+uf6OaD0Btp+OBRJUV7EwTs5C5+zgxAPieumSk4HO tI2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 195si46603958pga.312.2019.04.16.00.33.53; Tue, 16 Apr 2019 00:34:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728524AbfDPHdR (ORCPT + 99 others); Tue, 16 Apr 2019 03:33:17 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6191 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728446AbfDPHdQ (ORCPT ); Tue, 16 Apr 2019 03:33:16 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 13A0EA6391B7F7874980; Tue, 16 Apr 2019 15:33:14 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Tue, 16 Apr 2019 15:32:55 +0800 From: Chen Zhou To: , , , , , , , , CC: , , , , , , , Chen Zhou Subject: [PATCH v5 0/4] support reserving crashkernel above 4G on arm64 kdump Date: Tue, 16 Apr 2019 15:43:25 +0800 Message-ID: <20190416074329.44928-1-chenzhou10@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When crashkernel is reserved above 4G in memory, kernel should reserve some amount of low memory for swiotlb and some DMA buffers. So there may be two crash kernel regions, one is below 4G, the other is above 4G. Crash dump kernel reads more than one crash kernel regions via a dtb property under node /chosen, linux,usable-memory-range = . Besides, we need to modify kexec-tools: arm64: support more than one crash kernel regions(see [1]) Changes since [v4] - reimplement memblock_cap_memory_ranges for multiple ranges. Changes since [v3] - Add memblock_cap_memory_ranges for multiple ranges. - Split patch "arm64: kdump: support more than one crash kernel regions" as two. One is above "Add memblock_cap_memory_ranges", the other is using memblock_cap_memory_ranges to support multiple crash kernel regions. - Fix some compiling warnings. Changes since [v2] - Split patch "arm64: kdump: support reserving crashkernel above 4G" as two. Put "move reserve_crashkernel_low() into kexec_core.c" in a separate patch. Changes since [v1]: - Move common reserve_crashkernel_low() code into kernel/kexec_core.c. - Remove memblock_cap_memory_ranges() i added in v1 and implement that in fdt_enforce_memory_region(). There are at most two crash kernel regions, for two crash kernel regions case, we cap the memory range [min(regs[*].start), max(regs[*].end)] and then remove the memory range in the middle. [1]: http://lists.infradead.org/pipermail/kexec/2019-April/022792.html [v1]: https://lkml.org/lkml/2019/4/8/628 [v2]: https://lkml.org/lkml/2019/4/9/86 [v3]: https://lkml.org/lkml/2019/4/15/6 [v4]: https://lkml.org/lkml/2019/4/15/273 Chen Zhou (4): x86: kdump: move reserve_crashkernel_low() into kexec_core.c arm64: kdump: support reserving crashkernel above 4G memblock: extend memblock_cap_memory_range to multiple ranges kdump: update Documentation about crashkernel on arm64 Documentation/admin-guide/kernel-parameters.txt | 4 +- arch/arm64/include/asm/kexec.h | 3 ++ arch/arm64/kernel/setup.c | 3 ++ arch/arm64/mm/init.c | 59 ++++++++++++++++------ arch/x86/include/asm/kexec.h | 3 ++ arch/x86/kernel/setup.c | 66 +++---------------------- include/linux/kexec.h | 5 ++ include/linux/memblock.h | 2 +- kernel/kexec_core.c | 56 +++++++++++++++++++++ mm/memblock.c | 44 ++++++++--------- 10 files changed, 144 insertions(+), 101 deletions(-) -- 2.7.4