From patchwork Fri Jul 18 07:34:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 4581311 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 48FCA9F3CE for ; Fri, 18 Jul 2014 07:37:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E3A2201CE for ; Fri, 18 Jul 2014 07:37:20 +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 D1C11201C0 for ; Fri, 18 Jul 2014 07:37:18 +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 1X82hB-0007vQ-Vo; Fri, 18 Jul 2014 07:35:09 +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 1X82gy-0006rY-37 for linux-arm-kernel@lists.infradead.org; Fri, 18 Jul 2014 07:34:56 +0000 Received: by mail-pa0-f48.google.com with SMTP id et14so4864402pad.7 for ; Fri, 18 Jul 2014 00:34:35 -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=UIxbbWsZuRe3bwA2R2NbW4fclttCi4SxirVLscvzIik=; b=M5f2Qocrq0AmgGoJFs5OOJfWSAxAlJOvM1ytZX1/dlUrzR0d1/KG7zkMcnzvsW/6l1 Xduvvz6dD9SMEXmV0vfil2AdQtL8GtEzYdUf7kux5AfvoSwRN2N/vNjBvgRFScKoKRbb 2zsR88/BW5IUDRBg+Fb5/Dxu2XGPRQ1g3dwFdlc4deOAk9rynZW8kUQUgzmLv/ZFBBfH SGGnxWSCT9FdhPTItQNPFfN60cMRsXXyxo9JtxGcLylz9QdK2+HcRVk0Vdjl/+dJrMRP zEp9ZXMiLzSdpMtUJk8KeW6G9QX+V+WMyUc2hDemJRal259qnO4OSXGT2S+lrchYQXL/ GsSw== X-Received: by 10.70.35.169 with SMTP id i9mr2800323pdj.36.1405668874323; Fri, 18 Jul 2014 00:34:34 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by mx.google.com with ESMTPSA id cj17sm6257886pdb.75.2014.07.18.00.34.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 18 Jul 2014 00:34:33 -0700 (PDT) From: Guenter Roeck To: linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 2/7] arm64: Support restart through restart handler call chain Date: Fri, 18 Jul 2014 00:34:11 -0700 Message-Id: <1405668856-13738-3-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_003456_200121_D813C02D X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -0.4 (/) Cc: Ingo Molnar , Russell King , Heiko Stuebner , Arnd Bergmann , linux-doc@vger.kernel.org, Dmitry Eremin-Solenikov , Catalin Marinas , Tomasz Figa , 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=-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 The kernel core now supports a restart handler call chain to restart the system. Call it if arm_pm_restart is not set. Signed-off-by: Guenter Roeck --- 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/arm64/kernel/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 43b7c34..9591e60 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -174,6 +174,8 @@ void machine_restart(char *cmd) /* Now call the architecture specific reboot code. */ if (arm_pm_restart) arm_pm_restart(reboot_mode, cmd); + else + do_kernel_restart(cmd); /* * Whoops - the architecture was unable to reboot.