From patchwork Mon Sep 3 14:24:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 1400151 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 0D4DDDF280 for ; Mon, 3 Sep 2012 14:28:39 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T8Xaa-0003BD-SG; Mon, 03 Sep 2012 14:25:20 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T8XaX-0003Az-Jk for linux-arm-kernel@lists.infradead.org; Mon, 03 Sep 2012 14:25:18 +0000 Received: by pbbrq8 with SMTP id rq8so8576476pbb.36 for ; Mon, 03 Sep 2012 07:25:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=vXTH5/9xPQri23nvq7qMOb4r/JDX4mrVCptraJnm1HM=; b=nrd1L+ZQR8TuHW/D+RoiET6h2kV2+/X8lMOR9fYv1G6wbixxvOqCl/QfGYq9gh7xFH 9vtXMxuexYDYeeyVDxcjwydr09Yn8Rl/Wn3zM+SvGjApmub9WyD2JZUlPvNJGE3uqqUG aX6fAGvfmBYnIhT9JaTlstT2FWcoZVpBpa1qX67PjJKm86yxh2HTrcdGpIjNs1bcY5lH Jft7Kdm4HoCa8ZmV2ojO94PT/Qyd/GsIlswUOa4XhIpAcjPGlgm7Rv3G5ayThiXHgm/U 9amZGrnTKZ30yY/ykqicMMj9dC7Xz8tZa9ASWdl1KqPAcF3sPb/GqytLKtJxG5N1DCrl +Q0A== Received: by 10.68.204.169 with SMTP id kz9mr10833544pbc.39.1346682314659; Mon, 03 Sep 2012 07:25:14 -0700 (PDT) Received: from localhost.localdomain ([221.225.141.243]) by mx.google.com with ESMTPS id kp3sm10019337pbc.64.2012.09.03.07.25.10 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 07:25:13 -0700 (PDT) From: Shawn Guo To: linux-kernel@vger.kernel.org Subject: [PATCH] kernel/sys.c: call disable_nonboot_cpus in kernel_restart Date: Mon, 3 Sep 2012 22:24:58 +0800 Message-Id: <1346682298-13958-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.5.4 X-Gm-Message-State: ALoCoQkPd1OzEPvK6Uxh3HHHOSGG97kw2VXN9srphkePP0gLUsUDZQE8yzwnqJfLADOn4Uy7OmiS X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.4 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] 2.2 RCVD_IN_NJABL_PROXY RBL: NJABL: sender is an open proxy [221.225.141.243 listed in combined.njabl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Andrew Morton , Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Like kernel_power_off calls disable_nonboot_cpus, we may want to have kernel_restart call disable_nonboot_cpus as well. Doing so can help the machines that require boot cpu be the last alive cpu during reboot to survive with kernel restart. Signed-off-by: Shawn Guo --- kernel/sys.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index 241507f..6fab59a 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -368,6 +368,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier); void kernel_restart(char *cmd) { kernel_restart_prepare(cmd); + disable_nonboot_cpus(); if (!cmd) printk(KERN_EMERG "Restarting system.\n"); else