From owner-freebsd-current@FreeBSD.ORG Wed Dec 11 22:21:14 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D9BFE5C; Wed, 11 Dec 2013 22:21:14 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 058F51EDF; Wed, 11 Dec 2013 22:21:14 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9A48CB922; Wed, 11 Dec 2013 17:21:12 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: Request for testing an alternate branch Date: Wed, 11 Dec 2013 16:26:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <20131204222113.39fb23dd@zhabar.gateway.2wire.net> In-Reply-To: <20131204222113.39fb23dd@zhabar.gateway.2wire.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201312111626.12035.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 11 Dec 2013 17:21:12 -0500 (EST) Cc: Justin Hibbits , FreeBSD PowerPC ML X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 22:21:14 -0000 On Thursday, December 05, 2013 1:21:13 am Justin Hibbits wrote: > I've been working on the projects/pmac_pmu branch for some time now to > add suspend/resume as well as CPU speed change for certain PowerPC > machines, about a year since I created the branch, and now it's stable > enough that I want to merge it into HEAD, hence this request. However, > it does touch several drivers, turning them into "early drivers", such > that they can be initialized, and suspended and resumed at a different > time. Saying that, I do need testing from other architectures, to make > sure I haven't broken anything. > > The technical details: > > To get proper ordering, I've extended the bus_generic_suspend() and > bus_generic_resume() to do multiple passes. Devices which cannot be > enabled or disabled at the current pass level would return an EAGAIN. > This could possibly cause problems, since it's an addition to an > existing API rather than a new API to run along side it, so it needs a > great deal of testing. It works fine on PowerPC, but I don't have any > i386/amd64 or sparc64 hardware to test it on, so would like others who > do to test it. I don't think that it would impact x86 at all (testing > is obviously required), because the nexus is not an EARLY_DRIVER_MODULE, > so all devices would be handled at the same pass. But, I do know the > sparc64 has an EARLY_DRIVER_MODULE() nexus, so that will likely be > impacted. I have patches to change many x86 drivers to use EARLY_DRIVER_MODULE() FWIW. Also, I'm still not a fan of the EAGAIN approach. I'd rather have a method in bus_if.m to suspend or resume a single device and to track that a device is suspended or resumed via a device_t flag or some such. (I think I had suggested this previously as it would also allow us to have a tool to suspend/resume individual drivers at runtime apart from a full suspend/resume request). -- John Baldwin