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: 46353 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 305AD21584 for ; Thu, 26 Mar 2015 08:31:09 +0000 (UTC) Received: by wghr3 with SMTP id r3sf2976569wgh.0 for ; Thu, 26 Mar 2015 01:31:08 -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=3um3n7CQpCVREKrq9F2QtW2k9J3FuOLJIN55GbWNk50=; b=MNyRz1qkzhNLgQ1MEHfb3W+KFs835hl+ATOJ9Xff/SgWt/GS9ezJlxJnT7MX1jbUAX 9Avd3O71XYdlJueZfUS3bHLgjrQVTYAsIXOV5hAOXWo5mYn5czY+ID6ezC8HlaIjcPs8 fijLDtuySoed9WI2vnB3k/wD1ihz+BcrVRB2e+Az9nBgXCdZP/W5cz96SJAhPbYm8yJp jxI92sPlyINAC8FwZW9rKjhUHflHSmHxBbiSYsjLhJFjndhxmHV9i8Xs5KTXCFDiF/Zi 0e65bplLxJISvzr9QfQIyLZW4fq8fNhztDCYwMYkymMdkLyZqm8pu+JF9XtMjcRlSpYM 12dg== X-Gm-Message-State: ALoCoQneiFo0WxjdorLEZblhB8++vZ7JLlbOPk2v+eQfqmSBN7A7yK+aukrZHES/41m4zNGOS17v X-Received: by 10.112.235.70 with SMTP id uk6mr375148lbc.24.1427358668489; Thu, 26 Mar 2015 01:31:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.5 with SMTP id e5ls190979lab.37.gmail; Thu, 26 Mar 2015 01:31:08 -0700 (PDT) X-Received: by 10.152.45.37 with SMTP id j5mr12362362lam.31.1427358668229; Thu, 26 Mar 2015 01:31:08 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id f2si345865laa.142.2015.03.26.01.31.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 01:31:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by labe2 with SMTP id e2so39506339lab.3 for ; Thu, 26 Mar 2015 01:31:07 -0700 (PDT) X-Received: by 10.112.29.36 with SMTP id g4mr3787825lbh.56.1427358667817; Thu, 26 Mar 2015 01:31:07 -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 k9csp457092lbq; Thu, 26 Mar 2015 01:31:07 -0700 (PDT) X-Received: by 10.68.68.130 with SMTP id w2mr24243493pbt.120.1427358666114; Thu, 26 Mar 2015 01:31:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wy1si7302950pab.171.2015.03.26.01.31.04; Thu, 26 Mar 2015 01:31:06 -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 S1752597AbbCZIbA (ORCPT + 27 others); Thu, 26 Mar 2015 04:31:00 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:34910 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbbCZIaB (ORCPT ); Thu, 26 Mar 2015 04:30:01 -0400 Received: by pdbop1 with SMTP id op1so55878939pdb.2 for ; Thu, 26 Mar 2015 01:30:01 -0700 (PDT) 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 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 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> 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.215.50 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: , 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();