From patchwork Tue Sep 30 18:00:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 5005771 Return-Path: X-Original-To: patchwork-linux-parisc@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 32D4EBEEA6 for ; Tue, 30 Sep 2014 18:03:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EAC020166 for ; Tue, 30 Sep 2014 18:03:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C33D2015D for ; Tue, 30 Sep 2014 18:03:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbaI3SDH (ORCPT ); Tue, 30 Sep 2014 14:03:07 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:43311 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753758AbaI3SBl (ORCPT ); Tue, 30 Sep 2014 14:01:41 -0400 Received: by mail-pd0-f175.google.com with SMTP id v10so1149515pde.6 for ; Tue, 30 Sep 2014 11:01:40 -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=uk9PhDnqYd2VHty/au3bMVyIYyr5J/u7KX/H4dlb9Mo=; b=Y+UsaQkwNo+3j8tFz8Bu5jtJYoL8yb16x9RgRoRUL7jMsw5oQW1J6Y/IwquP1Xw0VR XfJfKBtTObXXnlvw+gipuOpoBsGMcank0x00X4eEZn+S8zW5HcKmZKUD/iq+E+fpDHi9 8Of1YXw+lVDSLJuzscQ62n1cZfx/SvnsR0ylY6ZFrFNw/OwhONveb7UYw1MU0PF83dA+ ocoJGsiW/TLV7c7WU6rRgdzumHRj4aSE8ZuixgRa7qq09IcZll+Swdt0Al5nEaV6DK1/ 70ghVjSTuAp7MxIoozpXKLQb8jxjAxuZCU4eUSqkkVt4USe88R55frO987lwSM9feDTU a0Bg== X-Received: by 10.68.223.103 with SMTP id qt7mr72959161pbc.9.1412100100812; Tue, 30 Sep 2014 11:01:40 -0700 (PDT) Received: from localhost (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by mx.google.com with ESMTPSA id f2sm15799501pdd.25.2014.09.30.11.01.40 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Sep 2014 11:01:40 -0700 (PDT) From: Guenter Roeck To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, Guenter Roeck , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Subject: [RFC PATCH 13/16] x86: support poweroff through poweroff handler call chain Date: Tue, 30 Sep 2014 11:00:53 -0700 Message-Id: <1412100056-15517-14-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412100056-15517-1-git-send-email-linux@roeck-us.net> References: <1412100056-15517-1-git-send-email-linux@roeck-us.net> Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 poweroff handler call chain to remove power from the system. Call it if pm_power_off is set to NULL. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Signed-off-by: Guenter Roeck --- arch/x86/kernel/reboot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 17962e6..c5514aa 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -651,6 +651,10 @@ static void native_machine_power_off(void) if (!reboot_force) machine_shutdown(); pm_power_off(); + } else { + if (!reboot_force) + machine_shutdown(); + do_kernel_poweroff(); } /* A fallback in case there is no PM info available */ tboot_shutdown(TB_SHUTDOWN_HALT);