From owner-svn-src-projects@FreeBSD.ORG Tue Feb 3 02:25:03 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1262AC88; Tue, 3 Feb 2015 02:25:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F14589B8; Tue, 3 Feb 2015 02:25:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t132P2FJ040596; Tue, 3 Feb 2015 02:25:02 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t132P2Z5040595; Tue, 3 Feb 2015 02:25:02 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201502030225.t132P2Z5040595@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 3 Feb 2015 02:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r278125 - projects/pmac_pmu/sys/powerpc/powermac X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2015 02:25:03 -0000 Author: jhibbits Date: Tue Feb 3 02:25:02 2015 New Revision: 278125 URL: https://svnweb.freebsd.org/changeset/base/278125 Log: Use stop_all_proc()/resume_all_proc(), like acpi does. Modified: projects/pmac_pmu/sys/powerpc/powermac/pmu.c Modified: projects/pmac_pmu/sys/powerpc/powermac/pmu.c ============================================================================== --- projects/pmac_pmu/sys/powerpc/powermac/pmu.c Tue Feb 3 02:24:09 2015 (r278124) +++ projects/pmac_pmu/sys/powerpc/powermac/pmu.c Tue Feb 3 02:25:02 2015 (r278125) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* For syncer_suspend()/syncer_resume() */ #include #include #include @@ -1226,6 +1227,9 @@ pmu_sleep(SYSCTL_HANDLER_ARGS) if (error || !req->newptr) return (error); + EVENTHANDLER_INVOKE(power_suspend_early); + stop_all_proc(); + syncer_suspend(); EVENTHANDLER_INVOKE(power_suspend); mtx_lock(&Giant); error = DEVICE_SUSPEND(root_bus); @@ -1237,6 +1241,8 @@ pmu_sleep(SYSCTL_HANDLER_ARGS) DEVICE_RESUME(root_bus); } mtx_unlock(&Giant); + syncer_resume(); + resume_all_proc(); EVENTHANDLER_INVOKE(power_resume); printf("Fully resumed.\n");