From patchwork Thu Mar 26 08:28:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 46351 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E44E121584 for ; Thu, 26 Mar 2015 08:30:28 +0000 (UTC) Received: by lbbug6 with SMTP id ug6sf2943448lbb.3 for ; Thu, 26 Mar 2015 01:30:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=4Wbk9v1WLpLrNPYQvkPG1DKRKjDUTCSATZ3GiDX2jnA=; b=dfU2NWyGD3qQzeT96+qorpW0N6+BQGnp/qaHnXHrXgepFv3+vGm2lwu91p0FLFuIDl CwQUUdvJkGdhhQXRLwL+odBoIWzs/PKrBlusjxMwzcdGUCscJ4SUOyra0WvkC6Bs9KOb +uGRa5BNrznciAYXzvtIuEUjBcswkjFSR1saNZcJgdEgZYMP2NYmzd7h2yLJlRtb71bR cTFcTj2/LWcENuS5IYND0A3oIeYA81p7QRG/n35IUtVFwWCCur2+iWKSFBNuKUMI3ApM Tf9PDVwLNvJn2zi0/qfIjhRO7tCu3ELvFZAywr+gefqbThw3WX0aRKxoJBcCCtnoQtSO 6DRg== X-Gm-Message-State: ALoCoQkfZHhCbe382Di8Q8bVE0BaRmP9D/pYd24ML2GY0pp0FKn4pgcr0HuLLMo8RS5zCtU73mGC X-Received: by 10.112.17.105 with SMTP id n9mr3011808lbd.8.1427358627917; Thu, 26 Mar 2015 01:30:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.9 with SMTP id r9ls213604lae.22.gmail; Thu, 26 Mar 2015 01:30:27 -0700 (PDT) X-Received: by 10.152.43.229 with SMTP id z5mr12125362lal.48.1427358627641; Thu, 26 Mar 2015 01:30:27 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id vs2si4006722lac.87.2015.03.26.01.30.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 01:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbcmq2 with SMTP id mq2so35622823lbc.0 for ; Thu, 26 Mar 2015 01:30:27 -0700 (PDT) X-Received: by 10.112.160.227 with SMTP id xn3mr10160013lbb.112.1427358627494; Thu, 26 Mar 2015 01:30:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp456740lbq; Thu, 26 Mar 2015 01:30:26 -0700 (PDT) X-Received: by 10.70.109.197 with SMTP id hu5mr24590208pdb.98.1427358625699; Thu, 26 Mar 2015 01:30:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kp10si7292589pbc.202.2015.03.26.01.30.23; Thu, 26 Mar 2015 01:30:25 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbbCZIaT (ORCPT + 27 others); Thu, 26 Mar 2015 04:30:19 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:33499 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596AbbCZIaO (ORCPT ); Thu, 26 Mar 2015 04:30:14 -0400 Received: by pdnc3 with SMTP id c3so56080841pdn.0 for ; Thu, 26 Mar 2015 01:30:14 -0700 (PDT) X-Received: by 10.66.140.39 with SMTP id rd7mr24178719pab.25.1427358614505; Thu, 26 Mar 2015 01:30:14 -0700 (PDT) Received: from localhost.localdomain (61-205-2-129m5.grp1.mineo.jp. [61.205.2.129]) by mx.google.com with ESMTPSA id sf6sm4716526pbb.82.2015.03.26.01.30.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 01:30:13 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, vgoyal@redhat.com, hbabus@us.ibm.com Cc: geoff@infradead.org, broonie@kernel.org, david.griego@linaro.org, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH 4/5] arm64: add kdump support Date: Thu, 26 Mar 2015 17:28:52 +0900 Message-Id: <1427358533-3754-5-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427358533-3754-1-git-send-email-takahiro.akashi@linaro.org> References: <1427358533-3754-1-git-send-email-takahiro.akashi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: takahiro.akashi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Please read the following commits for arm64-specific constraints: arm64: kdump: reserve memory for crash dump kernel arm64: kdump: do not go into EL2 before starting a crash dump kernel Signed-off-by: AKASHI Takahiro --- Documentation/kdump/kdump.txt | 31 ++++++++++++++++++++++++++++++- arch/arm64/Kconfig | 12 ++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt index bc4bd5a..f9cf6f5 100644 --- a/Documentation/kdump/kdump.txt +++ b/Documentation/kdump/kdump.txt @@ -18,7 +18,7 @@ memory image to a dump file on the local disk, or across the network to a remote system. Kdump and kexec are currently supported on the x86, x86_64, ppc64, ia64, -s390x and arm architectures. +s390x, arm and arm64 architectures. When the system kernel boots, it reserves a small section of memory for the dump-capture kernel. This ensures that ongoing Direct Memory Access @@ -249,6 +249,29 @@ Dump-capture kernel config options (Arch Dependent, arm) AUTO_ZRELADDR=y +Dump-capture kernel config options (Arch Dependent, arm64) +---------------------------------------------------------- + +1) Disable symmetric multi-processing support under "Processor type and + features": + + CONFIG_SMP=n + + (If CONFIG_SMP=y, then specify maxcpus=1 on the kernel command line + when loading the dump-capture kernel, see section "Load the Dump-capture + Kernel".) + +2) Under uefi, the maximum memory size on the dump-capture kernel must be + limited by specifying: + + mem=X[MG] + + where X should be less than or equal to the size in "crashkernel=" + boot parameter. Kexec-tools will automatically add this. + +3) Currently, kvm will not be initialized on the dump-capture kernel even + if it is configured. + Extended crashkernel syntax =========================== @@ -312,6 +335,7 @@ Boot into System Kernel any space below the alignment point may be overwritten by the dump-capture kernel, which means it is possible that the vmcore is not that precise as expected. + On arm64, use "crashkernel=Y@X". Load the Dump-capture Kernel ============================ @@ -334,6 +358,8 @@ For s390x: - Use image or bzImage For arm: - Use zImage +For arm64: + - Use vmlinux If you are using a uncompressed vmlinux image then use following command to load dump-capture kernel. @@ -377,6 +403,9 @@ For s390x: For arm: "1 maxcpus=1 reset_devices" +For arm64: + "1 maxcpus=1 mem=X[MG] reset_devices" + Notes on loading the dump-capture kernel: * By default, the ELF headers are stored in ELF64 format to support diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 5a606d1..06a6ed4 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -537,6 +537,18 @@ config KEXEC but it is independent of the system firmware. And like a reboot you can start any kernel with it, not just Linux. +config CRASH_DUMP + bool "Build kdump crash kernel" + help + Generate crash dump after being started by kexec. This should + be normally only set in special crash dump kernels which are + loaded in the main kernel with kexec-tools into a specially + reserved region and then later executed after a crash by + kdump/kexec. The crash dump kernel must be compiled to a + memory address not used by the main kernel. + + For more details see Documentation/kdump/kdump.txt + config XEN_DOM0 def_bool y depends on XEN