Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2039914yba; Mon, 15 Apr 2019 03:47:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqww2PO4Ct7Kz1w0DJXS5OzpLfD8MVDL0Z0cQX+ETEeBLxKWaQ5MqhUjadrGiO6LVKnLM4xM X-Received: by 2002:a63:243:: with SMTP id 64mr69053570pgc.214.1555325272322; Mon, 15 Apr 2019 03:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555325272; cv=none; d=google.com; s=arc-20160816; b=Vv9AuKfZxXms8F/fJBrq6bpuhEDnHIHaENENN8+2Q683XFYRiQkLuoVd97Upe/8nMg 6ca65ac8z07AzncgOyIYPSqG0fYLxa2Tw+RSneVbrZDGvEv6iKpSHMLVyrpitz11ifIL OMGnrbWCfehxDmrP29ce7m+6d9HemGipM5eWH2oF23CryQu+gZ4qckMIgjfv16mzSI+d pY3x1dv5bw4I5dD+LCP8z7PZl3no73xrFL92UQXxA0y0JGn/86sV4FvOUCRRzwHO5ZoR /90iG0skIWuprYf49dPY/hlbbkYHnVsX183H0QIfVYp+wE0zXRr+I1Bke1VtnORTwCqE OdKw== 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=MT54N6K7HQkX/UnqgECWKnYhHLDU09h9rRQC7MD3ml4=; b=sfeeTq/EtPIoU+qGvj4Uw0htO5PC+PAfEpNWkiZtGHx5iFlC3TYyIv6FdVMMIZ1/R2 5hCB6KzbYDKp9W9LoW90ekS9rJVAQA+L+x1HB2vy5Z0dFOs1aW1h9eIlqXt5Z/OPG49R L+T+aCG/3zyIsHIbSy/7tdfvW2qfVSQNoW6XUadpsrXjoqfc/wmvEwqq1zqzWOJyr+pW yQGxgSKOxiev6DlpwPYYGnLAoiXKpe75trMzqndtQgV5RU19+AwXYDVcLGx0FNg3Gd2X y/g8Fh9viNwPIOCUST/lTgwElpCy4DuQ3NSRxL+mS7TbAHl0Kerw3UNo2pmNpqYa7Z5N Zofg== 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 v6si26163633plg.51.2019.04.15.03.47.36; Mon, 15 Apr 2019 03:47:52 -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 S1727135AbfDOKq4 (ORCPT + 99 others); Mon, 15 Apr 2019 06:46:56 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6184 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725939AbfDOKq4 (ORCPT ); Mon, 15 Apr 2019 06:46:56 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 56F919E4758F6FA5716B; Mon, 15 Apr 2019 18:46:53 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Mon, 15 Apr 2019 18:46:45 +0800 From: Chen Zhou To: , , , , , , , , CC: , , , , , , , Chen Zhou Subject: [PATCH v4 0/5] support reserving crashkernel above 4G on arm64 kdump Date: Mon, 15 Apr 2019 18:57:20 +0800 Message-ID: <20190415105725.22088-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 [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 Chen Zhou (5): x86: kdump: move reserve_crashkernel_low() into kexec_core.c arm64: kdump: support reserving crashkernel above 4G memblock: add memblock_cap_memory_ranges for multiple ranges 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 | 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 | 56 +++++++++++++++------ 10 files changed, 166 insertions(+), 91 deletions(-) -- 2.7.4