From patchwork Thu Mar 26 08:28:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 6096991 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BE1F3BF90F for ; Thu, 26 Mar 2015 08:38:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EAEDB2041C for ; Thu, 26 Mar 2015 08:38:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BF5220173 for ; Thu, 26 Mar 2015 08:38:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yb3GH-0001KI-L5; Thu, 26 Mar 2015 08:35:33 +0000 Received: from mail-pd0-f169.google.com ([209.85.192.169]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yb3BF-0003XB-Vs for linux-arm-kernel@lists.infradead.org; Thu, 26 Mar 2015 08:30:23 +0000 Received: by pdbop1 with SMTP id op1so55878940pdb.2 for ; Thu, 26 Mar 2015 01:30:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uY1uESiQ5/VsNe9AySzgYO1QhZ9B1ubJnUQa1qrHo7I=; b=h9MtuadG+tzwGtxc3SEkA0Hqh5UG4Qbmdmj84jHQ75lfx3DAdrnvfsuVw4i3rrL8P0 uHJ0oHlnyKuws9cfkOqPm/x8sSgG8yemeX+Bq5Ndoz4sFi5VHpQ4snjokFHUIdB69mip OSZROhuQ5TwGLsfrAwGG8Qhep1ItgwGtreveLOIZlauhAtSP/04Pa55c66ttQnk+Chnz Zxxq0xnIuY+Ozqn+dfH+87V/V9CtfzUXuwjYqdyV6ALIkdoQXlF29rq2QSdRmiKr4tm7 k3pRbpCZEWixS/Y5RSzhd+/1YI7I/wSSdqdm4/sN9kmggincCDgMajHGX1Lsi3jh3NfH eAnQ== X-Gm-Message-State: ALoCoQmiCPpgWfIEIBK94Gtb8wIfelcbya8IV+MLWL4PmdTDhEVRBlc3NB+KiEBMjTZq+BHD8fyp X-Received: by 10.70.90.133 with SMTP id bw5mr24649166pdb.93.1427358601122; Thu, 26 Mar 2015 01:30:01 -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.29.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 01:30:00 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, vgoyal@redhat.com, hbabus@us.ibm.com Subject: [PATCH 3/5] arm64: kdump: do not go into EL2 before starting a crash dump kernel Date: Thu, 26 Mar 2015 17:28:51 +0900 Message-Id: <1427358533-3754-4-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150326_013022_095078_7F2F462A X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: linaro-kernel@lists.linaro.org, geoff@infradead.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro , broonie@kernel.org, david.griego@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Unlike normal kexec case, we don't have a chance to reset EL2 context in a generic way because bad exceptions may directly invoke crash_kexec(). (See die().) Kvm is not useful on crash dump kernel anyway, and so we let it un-initialized across rebooting. Signed-off-by: AKASHI Takahiro --- arch/arm64/kernel/process.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index d894d3e..9859f5c 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -64,7 +65,11 @@ void soft_restart(unsigned long addr) setup_mm_for_reboot(); cpu_soft_restart(virt_to_phys(cpu_reset), - is_hyp_mode_available(), addr); +#ifdef CONFIG_KEXEC + !in_crash_kexec && +#endif + is_hyp_mode_available(), + addr); /* Should never get here */ BUG();