From patchwork Tue Jan 24 08:46:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 92285 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1611830qgi; Tue, 24 Jan 2017 00:48:25 -0800 (PST) X-Received: by 10.55.159.20 with SMTP id i20mr28041897qke.317.1485247705170; Tue, 24 Jan 2017 00:48:25 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id 14si12657197qkx.336.2017.01.24.00.48.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 00:48:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cVwm7-00068H-GV; Tue, 24 Jan 2017 08:48:23 +0000 Received: from mail-pg0-f54.google.com ([74.125.83.54]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cVwlK-0005iY-Uy for linux-arm-kernel@lists.infradead.org; Tue, 24 Jan 2017 08:47:36 +0000 Received: by mail-pg0-f54.google.com with SMTP id 204so53393738pge.0 for ; Tue, 24 Jan 2017 00:47:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=4Vxe+PMvY/Y2c4coxp80C46K4ULtCAyPT3KWAtP54Vs=; b=Bxf7Cwn3IyiTFMnFOyR3Lh80b5HNFegl2tYYU2mTzpiEzdrQADIeDVCtn5swvMhyXD xOR7l6xxX6EC5JmulajlozcTW5gaIfjtklqdQXmDTPgndw4feq9NdFN3rvxegG6yYpya NjQ3DgT86D1A0oyaTEjdnjQcS9vqGsldY53cE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4Vxe+PMvY/Y2c4coxp80C46K4ULtCAyPT3KWAtP54Vs=; b=IThDAhweDNIFn4/7dCXp+C1LLGkQj6TTysDJ1lBZd3t4ROgR3rOT/oIptSGac/TcX2 htXeKUXEpgDkFko3KD5UPr9WyprdKVIxjf9Pvq+zciviAgLawXQAs6lIwB89lOclaOSv B7I3a+SJi90VvhfuHSyQHE2i3/rK21CCRoHUk79hxjdHVtBtPjn1X66HCl5ZnEfYu2lg dmir9aahfBHcgGYF8W7yguINQtlcAfYnwMBJjmvJibu1nkF3Gb81iuH/JgoXndRoawIb 3ZsnmY27snOOhU0wf6GnXSFGksyHdOf5TKNQDbaRJPThz+6QFd9kYBccc3zKn5ZHgscW 0Ptw== X-Gm-Message-State: AIkVDXL1mH5p9MEsAIls2ivvLO/MtcLpYU7MM/Wqhw04zghGYHKAefwJs3v/j8KFqJ0Jyuhb X-Received: by 10.98.131.136 with SMTP id h130mr37523396pfe.4.1485247573132; Tue, 24 Jan 2017 00:46:13 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id q5sm3536232pgf.45.2017.01.24.00.46.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 00:46:12 -0800 (PST) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v30 00/11] arm64: add kdump support Date: Tue, 24 Jan 2017 17:46:38 +0900 Message-Id: <20170124084638.3770-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170124_004735_023392_0D77BA67 X-CRM114-Status: GOOD ( 15.02 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.83.54 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.83.54 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, geoff@infradead.org, kexec@lists.infradead.org, AKASHI Takahiro , james.morse@arm.com, bauerman@linux.vnet.ibm.com, dyoung@redhat.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This patch series adds kdump support on arm64. To load a crash-dump kernel to the systems, a series of patches to kexec-tools[1] are also needed. Please use the latest one, v5 [2]. For your convinience, you can pick them up from: https://git.linaro.org/people/takahiro.akashi/linux-aarch64.git arm64/kdump https://git.linaro.org/people/takahiro.akashi/kexec-tools.git arm64/kdump To examine vmcore (/proc/vmcore) on a crash-dump kernel, you can use - crash utility (v7.1.8 or later, i.e. master for now) [3] I tested this patchset on fast model and hikey. The previous version, v29, was also: Tested-by: Pratyush Anand (mustang and seattle) Changes for v30 (Jan 24, 2017) o rebased to Linux-v4.10-rc5 o remove "linux,crashkernel-base/size" from exported device tree o protect memory region for crash-dump kernel (adding patch#4,5) o remove "in_crash_kexec" variable o and other trivial changes Changes for v29 (Dec 28, 2016) o rebased to Linux-v4.10-rc1 o change asm constraints in crash_setup_regs() per Catalin Changes for v28 (Nov 22, 2016) o rebased to Linux-v4.9-rc6 o revamp patch #1 and merge memblock_cap_memory_range() with memblock_mem_limit_remove_map() Changes for v27 (Nov 1, 2016) o rebased to Linux-v4.9-rc3 o revert v26 change, i.e. revive "linux,usable-memory-range" property (patch #2/#3, updating patch #9) o minor fixes per review comments (patch #3/#4/#6/#8) o re-order patches and improve commit messages for readability Changes for v26 (Sep 7, 2016): o Use /reserved-memory instead of "linux,usable-memory-range" property (dropping v25's patch#2 and #3, updating ex-patch#9.) Changes for v25 (Aug 29, 2016): o Rebase to Linux-4.8-rc4 o Use memremap() instead of ioremap_cache() [patch#5] Changes for v24 (Aug 9, 2016): o Rebase to Linux-4.8-rc1 o Update descriptions about newly added DT proerties Changes for v23 (July 26, 2016): o Move memblock_reserve() to a single place in reserve_crashkernel() o Use cpu_park_loop() in ipi_cpu_crash_stop() o Always enforce ARCH_LOW_ADDRESS_LIMIT to the memory range of crash kernel o Re-implement fdt_enforce_memory_region() to remove non-reserve regions (for ACPI) from usable memory at crash kernel Changes for v22 (July 12, 2016): o Export "crashkernel-base" and "crashkernel-size" via device-tree, and add some descriptions about them in chosen.txt o Rename "usable-memory" to "usable-memory-range" to avoid inconsistency with powerpc's "usable-memory" o Make cosmetic changes regarding "ifdef" usage o Correct some wordings in kdump.txt Changes for v21 (July 6, 2016): o Remove kexec patches. o Rebase to arm64's for-next/core (Linux-4.7-rc4 based). o Clarify the description about kvm in kdump.txt. See the link [4] for older changes. [1] https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git [2] http://lists.infradead.org/pipermail/kexec/2017-January/018002.html [3] https://github.com/crash-utility/crash.git [4] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/438780.html AKASHI Takahiro (10): memblock: add memblock_cap_memory_range() arm64: limit memory regions based on DT property, usable-memory-range arm64: kdump: reserve memory for crash dump kernel arm64: mm: allow for unmapping memory region from kernel mapping arm64: kdump: protect crash dump kernel memory arm64: kdump: implement machine_crash_shutdown() arm64: kdump: add VMCOREINFO's for user-space tools arm64: kdump: provide /proc/vmcore file arm64: kdump: enable kdump in defconfig Documentation: kdump: describe arm64 port James Morse (1): Documentation: dt: chosen properties for arm64 kdump Documentation/devicetree/bindings/chosen.txt | 37 +++++++ Documentation/kdump/kdump.txt | 16 ++- arch/arm64/Kconfig | 11 ++ arch/arm64/configs/defconfig | 1 + arch/arm64/include/asm/hardirq.h | 2 +- arch/arm64/include/asm/kexec.h | 42 +++++++- arch/arm64/include/asm/mmu.h | 2 + arch/arm64/include/asm/pgtable-hwdef.h | 2 + arch/arm64/include/asm/pgtable-prot.h | 1 + arch/arm64/include/asm/pgtable.h | 4 + arch/arm64/include/asm/smp.h | 2 + arch/arm64/kernel/Makefile | 1 + arch/arm64/kernel/crash_dump.c | 71 +++++++++++++ arch/arm64/kernel/machine_kexec.c | 132 ++++++++++++++++++----- arch/arm64/kernel/setup.c | 7 +- arch/arm64/kernel/smp.c | 63 +++++++++++ arch/arm64/mm/init.c | 150 +++++++++++++++++++++++++++ arch/arm64/mm/mmu.c | 63 +++++++++-- include/linux/memblock.h | 1 + mm/memblock.c | 44 +++++--- 20 files changed, 596 insertions(+), 56 deletions(-) create mode 100644 arch/arm64/kernel/crash_dump.c -- 2.11.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel