From patchwork Fri Apr 24 07:53:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 47552 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 3BF7520553 for ; Fri, 24 Apr 2015 07:54:33 +0000 (UTC) Received: by lbos2 with SMTP id s2sf9471483lbo.2 for ; Fri, 24 Apr 2015 00:54:32 -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=UGLrqUJO/qo7D4jdQXywK/wEb8XDo61K1HLfOPzcc+ew/NZFPILBsc65KSWfrW5/dx o26g/RhOi5kFO/bOg+mX3L43/6gYrFJ3tuJG9vpZIanfNYLffEaTvRcPAALTzV06HUuM QS1eUQUzRe8Qf9RUXk99zMg9DQRc9KvfIRJaQD+i38tpmSC1z+dmWyP2ruBOH1W+mJNc cYJfAyCSIyVIzmoxTN8FOJ1e72O5+/qgO0b3x74fzdf+RBi15S2GMoOL0qEO91qhN1X4 HVqmnmLo5B5NN/Y1j3/hIZpFem6U/CH4uiSctj//H2LGenljObo5CeAOVzjcqU1upC8X mNJg== X-Gm-Message-State: ALoCoQmCRiQmoOj9b6Gx2TCEQP7P1nG3Fwc/+whmvBwCf+QBu79vmxujGzhlU2VuY6b7LL7aoutS X-Received: by 10.152.19.67 with SMTP id c3mr3483226lae.7.1429862071939; Fri, 24 Apr 2015 00:54:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.43 with SMTP id xl11ls446726lac.21.gmail; Fri, 24 Apr 2015 00:54:31 -0700 (PDT) X-Received: by 10.153.4.43 with SMTP id cb11mr5957160lad.122.1429862071769; Fri, 24 Apr 2015 00:54:31 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id wv10si7684059lac.79.2015.04.24.00.54.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2015 00:54:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbuc2 with SMTP id uc2so30546697lbb.2 for ; Fri, 24 Apr 2015 00:54:31 -0700 (PDT) X-Received: by 10.112.161.226 with SMTP id xv2mr5859185lbb.106.1429862071680; Fri, 24 Apr 2015 00:54:31 -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.67.65 with SMTP id l1csp1032506lbt; Fri, 24 Apr 2015 00:54:30 -0700 (PDT) X-Received: by 10.68.211.6 with SMTP id my6mr2087253pbc.67.1429862069880; Fri, 24 Apr 2015 00:54:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ag7si16291971pad.120.2015.04.24.00.54.27; Fri, 24 Apr 2015 00:54:29 -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 S1755365AbbDXHyR (ORCPT + 27 others); Fri, 24 Apr 2015 03:54:17 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:36465 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933681AbbDXHyK (ORCPT ); Fri, 24 Apr 2015 03:54:10 -0400 Received: by pabsx10 with SMTP id sx10so41687010pab.3 for ; Fri, 24 Apr 2015 00:54:10 -0700 (PDT) X-Received: by 10.66.149.8 with SMTP id tw8mr12730936pab.69.1429862050517; Fri, 24 Apr 2015 00:54:10 -0700 (PDT) Received: from localhost.localdomain (61-205-1-167m5.grp1.mineo.jp. [61.205.1.167]) by mx.google.com with ESMTPSA id ry2sm10154199pbb.83.2015.04.24.00.54.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Apr 2015 00:54:09 -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: [v2 3/5] arm64: kdump: do not go into EL2 before starting a crash dump kernel Date: Fri, 24 Apr 2015 16:53:06 +0900 Message-Id: <1429861989-8417-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429861989-8417-1-git-send-email-takahiro.akashi@linaro.org> References: <1429861989-8417-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.170 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();