From patchwork Sun Jul 6 23:38:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 4491711 Return-Path: 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 4F2C1BEEAA for ; Sun, 6 Jul 2014 23:41:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D496220253 for ; Sun, 6 Jul 2014 23:41:55 +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 12B0520222 for ; Sun, 6 Jul 2014 23:41:55 +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 1X3w1S-0001Z6-MR; Sun, 06 Jul 2014 23:39:06 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X3w1J-0001UK-Tu for linux-arm-kernel@lists.infradead.org; Sun, 06 Jul 2014 23:38:58 +0000 Received: by mail-pa0-f48.google.com with SMTP id et14so4406476pad.21 for ; Sun, 06 Jul 2014 16:38:36 -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=KMEjcblxDLr2VgFPoWctn2i2W1US+cvV2kxnHT3gnVI=; b=0YMKslqTZDYmvhB9MA9P0WakHx4VREdDtuqDr+AMRumn4fyZk0EzQa1KFnmZ3QnAUb K1cAh6SlAMDPZIdLSOPNEsLt7J1JdpoUqpK7kq6Yt7XB8XalRC5WBS690WpFtTdBil2c rzkq9e2B2Dw/+6k0RaXVE637+IE6LmuDrVjNZO6ZS8ZsMMVNw2cNst6vNdN4quZW51dY UtbYRtkNK6Q5DESyeEOLAz8mDUb2u0NkoHnGz2L8Z17gY5lrUQPTxzz3YrCKC+E1W5Fh xbZiZEpdAXO5fw/j1hrVucjhS4alySFW+DfvxVs6MhxAVWhvsF0rkd7D9v8vAKNxQDTJ UgKw== X-Received: by 10.66.252.10 with SMTP id zo10mr24415739pac.7.1404689916756; Sun, 06 Jul 2014 16:38:36 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by mx.google.com with ESMTPSA id sv10sm183919025pab.32.2014.07.06.16.38.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 06 Jul 2014 16:38:36 -0700 (PDT) From: Guenter Roeck To: linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/7] arm64: Support restart through restart notifier call chain Date: Sun, 6 Jul 2014 16:38:15 -0700 Message-Id: <1404689900-27421-3-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1404689900-27421-1-git-send-email-linux@roeck-us.net> References: <1404689900-27421-1-git-send-email-linux@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140706_163857_983927_BC100C0D X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -0.4 (/) Cc: Ingo Molnar , Russell King , Heiko Stuebner , Arnd Bergmann , linux-doc@vger.kernel.org, Dmitry Eremin-Solenikov , Catalin Marinas , Randy Dunlap , Will Deacon , linux-kernel@vger.kernel.org, Steven Rostedt , Jonas Jensen , Wim Van Sebroeck , Maxime Ripard , David Woodhouse , Andrew Morton , Guenter Roeck 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=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 The kernel core now supports a notifier call chain to restart the system. Call it if arm_pm_restart is not set. Signed-off-by: Guenter Roeck --- v2: Only call notifier call chain if arm_pm_restart is not set Do not include linux/watchdog.h arch/arm64/kernel/process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 43b7c34..585ebe2 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -174,6 +174,9 @@ void machine_restart(char *cmd) /* Now call the architecture specific reboot code. */ if (arm_pm_restart) arm_pm_restart(reboot_mode, cmd); + else + blocking_notifier_call_chain(&restart_notifier_list, + reboot_mode, cmd); /* * Whoops - the architecture was unable to reboot.