From patchwork Tue Sep 9 22:49:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 4873191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8395D9F32E for ; Tue, 9 Sep 2014 22:52:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C42A12018B for ; Tue, 9 Sep 2014 22:52:38 +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 EC4792017E for ; Tue, 9 Sep 2014 22:52:37 +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 1XRUEz-0006pV-Kv; Tue, 09 Sep 2014 22:50:25 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRUDi-0004c7-Bf; Tue, 09 Sep 2014 22:49:06 +0000 Received: from geoff by merlin.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1XRUDh-0007SO-CN; Tue, 09 Sep 2014 22:49:05 +0000 Message-Id: In-Reply-To: References: From: Geoff Levand Patch-Date: Tue, 9 Sep 2014 12:35:13 -0700 Subject: [PATCH 10/13] arm64/kexec: Revert change to machine_shutdown() To: Catalin Marinas , Will Deacon Date: Tue, 09 Sep 2014 22:49:05 +0000 Cc: marc.zyngier@arm.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, christoffer.dall@linaro.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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 Commit 90f51a09ef83 ("arm64: Fix machine_shutdown() definition") changed the implementation of machine_shutdown() from calling smp_send_stop() to calling disable_nonboot_cpus(). Revert that part of the commit so that machine_shutdown() once again calls smp_send_stop(). With the application of another patch in this series, (arm64: Use cpu_ops for smp_stop), smp_send_stop() will do the correct thing for a kexec reboot. This change also corrects the source code comment for the machine_shutdown() routine. Signed-off-by: Geoff Levand --- arch/arm64/kernel/process.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 0a3414b..cd0ae9d 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -101,15 +101,12 @@ void arch_cpu_idle_dead(void) /* * Called by kexec, immediately prior to machine_kexec(). * - * This must completely disable all secondary CPUs; simply causing those CPUs - * to execute e.g. a RAM-based pin loop is not sufficient. This allows the - * kexec'd kernel to use any and all RAM as it sees fit, without having to - * avoid any code or data used by any SW CPU pin loop. The CPU hotplug - * functionality embodied in disable_nonboot_cpus() to achieve this. + * This must shutdown all secondary CPUs. The functionality + * embodied in smp_send_stop() will achieve this. */ void machine_shutdown(void) { - disable_nonboot_cpus(); + smp_send_stop(); } /*