Message ID | 1405668856-13738-4-git-send-email-linux@roeck-us.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9711FC0514 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 Jul 2014 07:37:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCC4E201C0 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 Jul 2014 07:37:29 +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 1DB3F2018E for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 Jul 2014 07:37:29 +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 1X82hL-0008EH-T7; Fri, 18 Jul 2014 07:35:19 +0000 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X82h0-0006rs-T8 for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 07:34:59 +0000 Received: by mail-pa0-f49.google.com with SMTP id hz1so4886269pad.22 for <linux-arm-kernel@lists.infradead.org>; Fri, 18 Jul 2014 00:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=8fXkJ/kP1WWumR0D+oi297HTuzBbVWznIcQtytvGwQE=; b=wxUY07q1GHnzwjXOjhi36G9TSwVs/yQaHpOzbud7io8gaVZK0uChJVmUWiFWIMI5Sv H1oVLuDdHmdl+fsJFUwDEZtyOWnvSqjyajSYzys8vYMqhtALN+cQ+0ChzMmlfsUN8FSM LIQEsHsoTBX1A7Me8J2p3gd8ONPUs0GlTL6GSNFb3oLa4GYPmb4v5jLtjayuSfm+SKL3 gAlxKkuOMkLaW5Yujfmj/ef9pkOSICotLioHLZX6qBcU94Tic8weyXtRWZGgO71iWHjc J/O0EgO/3o+MVzurIJ7vRyGLiC84FZIUPTzFMqGjKjdv+wQAkoMKeOTzrKQh8M6bnQdy GWCA== X-Received: by 10.66.163.164 with SMTP id yj4mr2615036pab.91.1405668877883; Fri, 18 Jul 2014 00:34:37 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by mx.google.com with ESMTPSA id fu4sm6262270pdb.66.2014.07.18.00.34.36 for <multiple recipients> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 18 Jul 2014 00:34:37 -0700 (PDT) From: Guenter Roeck <linux@roeck-us.net> To: linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 3/7] arm: Support restart through restart handler call chain Date: Fri, 18 Jul 2014 00:34:12 -0700 Message-Id: <1405668856-13738-4-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405668856-13738-1-git-send-email-linux@roeck-us.net> References: <1405668856-13738-1-git-send-email-linux@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140718_003458_970059_BE80A6C0 X-CRM114-Status: GOOD ( 11.83 ) X-Spam-Score: -0.4 (/) Cc: Ingo Molnar <mingo@kernel.org>, Russell King <linux@arm.linux.org.uk>, Heiko Stuebner <heiko@sntech.de>, Arnd Bergmann <arnd@arndb.de>, linux-doc@vger.kernel.org, Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>, Catalin Marinas <catalin.marinas@arm.com>, Tomasz Figa <t.figa@samsung.com>, Randy Dunlap <rdunlap@infradead.org>, Will Deacon <will.deacon@arm.com>, linux-kernel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>, Jonas Jensen <jonas.jensen@gmail.com>, Wim Van Sebroeck <wim@iguana.be>, Maxime Ripard <maxime.ripard@free-electrons.com>, David Woodhouse <dwmw2@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Guenter Roeck <linux@roeck-us.net> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no 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 |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 81ef686..84ca0d5 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -230,7 +230,10 @@ void machine_restart(char *cmd) local_irq_disable(); smp_send_stop(); - arm_pm_restart(reboot_mode, cmd); + if (arm_pm_restart) + arm_pm_restart(reboot_mode, cmd); + else + do_kernel_restart(cmd); /* Give a grace period for failure to restart of 1s */ mdelay(1000);
The kernel core now supports a restart handler call chain for system restart functions. With this change, the arm_pm_restart callback is now optional, so check if it is set before calling it. Only call the kernel restart handler if arm_pm_restart is not set. Signed-off-by: Guenter Roeck <linux@roeck-us.net> --- v5: Renamed restart function to do_kernel_restart v4: No change. v3: Use wrapper function to execute notifier call chain. v2: Only call notifier call chain if arm_pm_restart is not set. Do not include linux/watchdog.h. arch/arm/kernel/process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)