Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3724777yba; Tue, 9 Apr 2019 03:32:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOyDaWCr9ElVW2xZlb8pAsj1zRY/2NJwPUPrfWwWC8ZUCoAbejGLMKwUmM4C611KziRaln X-Received: by 2002:a63:78ce:: with SMTP id t197mr33988350pgc.314.1554805932199; Tue, 09 Apr 2019 03:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554805932; cv=none; d=google.com; s=arc-20160816; b=egXetcWO+njg073BzVexslUWAw+jCt4sOzj7sx//lx8ID02l+HF/R6FQxKb6igrYBv NxOdYVP2n5YZJgPPe7wEFVH7ZbdT7gOuDDP3+Jk25cflTRBxCfl6fLKH0oTP+fnlog7/ murCpIUaxlSSZr2MWUx5lrCpwCX2OXob8a/7v5rFoOcs+I98oDbwSOSxX1OoZPxvUwGI DQz1q7vwl1Wq4kUYG1jz+fP+/e9W7ZcK3BQmgqbL+3MjJZpRQoWXYzd7Zhx3oTstBNhx vIJehp8rfXtNUjNf/xUKMJxDCwln9ZXuwIjEUgERw0RB324Xc2KS5cHsv+t2FLQQ1AnJ Plcw== 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=jwI1StMgIsnE0cAW6qX6SjVPmfs/b6UNzNgGTT/RmL8=; b=UD5ZEKA3GhPbkL9S7m8XtKy3bn4Cl6ERzaGj78KFrcmB54Y8pAoVFEJHs54OIvrJJP TU4IxbP0NWnaqZMtEaT3q8cGbCNmo9roPknUMY5UogmLTvv0R8KHjZ8yDLxgUe5P99Qo LQu9RxZE7m2RmEzm8gCPOXHW5cYBOYc7WRsXy/SfWxq937+yFDXQmACb28sLGth1/1yM NGl9W/QW6Y/F76BDaOtgctAnCTQ52k17EqUnVn9uPUL820woPgcPByl1CvWNw4GF8gPT u+U95id50sjhc6JyhB+LD9a9zvmBcA88kra3Onx78k3Hq04LAwGJG4EFrJLd8o2aIb7R t+nw== 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 q190si12459789pfc.215.2019.04.09.03.31.56; Tue, 09 Apr 2019 03:32:12 -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 S1726513AbfDIKaY (ORCPT + 99 others); Tue, 9 Apr 2019 06:30:24 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6714 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726129AbfDIKaY (ORCPT ); Tue, 9 Apr 2019 06:30:24 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3B36332E131E4A5A35B3; Tue, 9 Apr 2019 18:17:26 +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, 9 Apr 2019 18:17:19 +0800 From: Chen Zhou To: , , , , , , , , CC: , , , , , , , Chen Zhou Subject: [PATCH v3 0/4] support reserving crashkernel above 4G on arm64 kdump Date: Tue, 9 Apr 2019 18:28:15 +0800 Message-ID: <20190409102819.121335-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 [v2] - Split patch "arm64: kdump: support reserving crashkernel above 4G" as two. Put "move reserve_crashkernel_low() into kexec_core.c" in a seperate 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 Chen Zhou (4): x86: kdump: move reserve_crashkernel_low() into kexec_core.c arm64: kdump: support reserving crashkernel above 4G arm64: kdump: support more than one crash kernel regions 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 | 92 +++++++++++++++++++++---- arch/x86/include/asm/kexec.h | 3 + arch/x86/kernel/setup.c | 66 ++---------------- include/linux/kexec.h | 1 + include/linux/memblock.h | 6 ++ kernel/kexec_core.c | 53 ++++++++++++++ mm/memblock.c | 7 +- 10 files changed, 159 insertions(+), 79 deletions(-) -- 2.7.4