Message ID | 20191016200034.1342308-17-pasha.tatashin@soleen.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=CACD=YJ=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E1FB15AB for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 16 Oct 2019 20:01:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3A48621A49 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 16 Oct 2019 20:01:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="CiaFl7Mk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A48621A49 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C5E868E0015; Wed, 16 Oct 2019 16:01:04 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C0EE88E000C; Wed, 16 Oct 2019 16:01:04 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AFD508E0015; Wed, 16 Oct 2019 16:01:04 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id 8660F8E000C for <linux-mm@kvack.org>; Wed, 16 Oct 2019 16:01:04 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 3170718482265 for <linux-mm@kvack.org>; Wed, 16 Oct 2019 20:01:04 +0000 (UTC) X-FDA: 76050716448.30.wound63_94514fc0bf03 X-Spam-Summary: 2,0,0,e9e5b79b24493aae,d41d8cd98f00b204,pasha.tatashin@soleen.com,:pasha.tatashin@soleen.com:jmorris@namei.org:sashal@kernel.org:ebiederm@xmission.com:kexec@lists.infradead.org:linux-kernel@vger.kernel.org:corbet@lwn.net:catalin.marinas@arm.com:will@kernel.org:linux-arm-kernel@lists.infradead.org:marc.zyngier@arm.com:james.morse@arm.com:vladimir.murzin@arm.com:matthias.bgg@gmail.com:bhsharma@redhat.com::mark.rutland@arm.com:steve.capper@arm.com:rfontana@redhat.com:tglx@linutronix.de,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1359:1381:1437:1515:1534:1541:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:4605:5007:6261:6653:6737:8660:9592:10004:11026:11473:11658:11914:12043:12048:12294:12297:12438:12517:12519:12555:12895:13069:13148:13230:13311:13357:13894:14181:14384:14394:14721:21080:21212:21444:21627:30025:30054:30079:30090,0,RBL:209.85.160.194:@soleen.com:.lbl8.mails hell.net X-HE-Tag: wound63_94514fc0bf03 X-Filterd-Recvd-Size: 4949 Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by imf10.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Wed, 16 Oct 2019 20:01:03 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id w14so37961422qto.9 for <linux-mm@kvack.org>; Wed, 16 Oct 2019 13:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2dB/JT7cpleUq4odQT8133EyCdo3KLVbNGsuR1ejXK0=; b=CiaFl7Mk/0Ai1uwEa1O2lGNLVpZo5+wb8v4pxmTWNb/dm2ro8mnYZnV8Edb/RXkgRm ki9I2+kYEPNZ+agtblWoi4KTtibPFfC2vJiQksWU9jlWzvdVmWqdIkA4Lb0g30wQcKQL vpQgAcBEBz8iFcDhWcWOcJFD4aLtX8PKUsr7KjYk5pXKwhCAV4dpCJ/hfY7qSm7PN9TL O2WTpHeLIh+12Q279PtAXhUhmTU/kr03dDQNBMsaRp6U/XSuSZ//IdFVQofebNWXkdPb 7sUSw+IThgjUN6desgaUOBQdZufgn2uDSC9v6BTW3ULEOcUHxK+y1y0yRmtPvPsMsmeI wKMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2dB/JT7cpleUq4odQT8133EyCdo3KLVbNGsuR1ejXK0=; b=lsasU03brw3nGX6zLJAO+mnyld9+maVuI+wDi8bTOUMMMTKt92kNPrGSwPK4Ubkag6 xzHknc9k4fLzaCN3q2AG8cYo+Li9uF9i0Z/ati8hk9LBjvsaAYi/ygFbwMCifjvDr89Z N+enza8pQhkmWOgg3IKG4MIcyJixs8tjNzGeK1+jLmrPk9d6NyTjuwOSpfBv3HxcX4N1 DlE3J/7GqcAa/NZpFEhm81BqCsvGz71jZMbD4m2MWYtsbZJol0gDcrW5OXdduOixuSid kI0ZjRGPpSe/2BodJuA2gL2fETNCTgCt5W5MEa2NWvJZPIlKsYnONZeWZY7Hr98rHnt1 5hSw== X-Gm-Message-State: APjAAAX6mJh08I4KTVYukJ/uW5081iZcNA1nB2XJeEgh6F2PwA8ULl9A n9xDlqdEKEvb+J6g7xlP5e64ibY40ns= X-Google-Smtp-Source: APXvYqwMAUjRlLpWrrpgx3tDKuFsAxRFXePefh3P5/JOzZtFez2e3nLHNDhNVIJG5zsuWzwbBLXj9g== X-Received: by 2002:ad4:51cc:: with SMTP id p12mr29646954qvq.243.1571256062832; Wed, 16 Oct 2019 13:01:02 -0700 (PDT) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id c204sm13342030qkb.90.2019.10.16.13.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 13:01:02 -0700 (PDT) From: Pavel Tatashin <pasha.tatashin@soleen.com> To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com, james.morse@arm.com, vladimir.murzin@arm.com, matthias.bgg@gmail.com, bhsharma@redhat.com, linux-mm@kvack.org, mark.rutland@arm.com, steve.capper@arm.com, rfontana@redhat.com, tglx@linutronix.de Subject: [PATCH v7 16/25] arm64: kexec: call kexec_image_info only once Date: Wed, 16 Oct 2019 16:00:25 -0400 Message-Id: <20191016200034.1342308-17-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016200034.1342308-1-pasha.tatashin@soleen.com> References: <20191016200034.1342308-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
arm64: MMU enabled kexec relocation
|
expand
|
diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index 46718b289a6b..f94119b5cebc 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -66,6 +66,7 @@ int machine_kexec_post_load(struct kimage *kimage) memcpy(reloc_code, arm64_relocate_new_kernel, arm64_relocate_new_kernel_size); kimage->arch.kern_reloc = __pa(reloc_code); + kexec_image_info(kimage); return 0; } @@ -80,8 +81,6 @@ int machine_kexec_post_load(struct kimage *kimage) */ int machine_kexec_prepare(struct kimage *kimage) { - kexec_image_info(kimage); - if (kimage->type != KEXEC_TYPE_CRASH && cpus_are_stuck_in_kernel()) { pr_err("Can't kexec: CPUs are stuck in the kernel.\n"); return -EBUSY; @@ -167,8 +166,6 @@ void machine_kexec(struct kimage *kimage) WARN(in_kexec_crash && (stuck_cpus || smp_crash_stop_failed()), "Some CPUs may be stale, kdump will be unreliable.\n"); - kexec_image_info(kimage); - /* Flush the reboot_code_buffer in preparation for its execution. */ __flush_dcache_area(reboot_code_buffer, arm64_relocate_new_kernel_size);
Currently, kexec_image_info() is called during load time, and right before kernel is being kexec'ed. There is no need to do both. So, call it only once when segments are loaded and the physical location of page with copy of arm64_relocate_new_kernel is known. Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> --- arch/arm64/kernel/machine_kexec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)