From owner-freebsd-arch@FreeBSD.ORG Mon May 13 07:20:21 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 300E09B5 for ; Mon, 13 May 2013 07:20:21 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-bk0-x22d.google.com (mail-bk0-x22d.google.com [IPv6:2a00:1450:4008:c01::22d]) by mx1.freebsd.org (Postfix) with ESMTP id BC4B6A86 for ; Mon, 13 May 2013 07:20:20 +0000 (UTC) Received: by mail-bk0-f45.google.com with SMTP id je9so2221450bkc.4 for ; Mon, 13 May 2013 00:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=pMnWzB/W4KxSpzMQCZSIjviQY/Ndf3TculULHHx2fio=; b=XYK2TsYl60ECMEsRczMGbm0CEpRrA41rIW2NQeLObfib0rpV5YMSksTwBV5T1uIg9K UCoVY6vTOZfdF4S9pbBzNUHn9ozGHvDVuUppLxFau9b2tg0pWaO4PExEVQIgs/J+DCMS t3GF9xMAxVey5kZ3CAuRNetJwtdHiFl5DtYTHWY2inJP7qcghBA7KSTJYpQzPSAn3vco Sz4kXceQhbwcam9sd+xj3oyiopux6Oy9YHZO6mCt2DTj3BX+DPedNGNe2EKeGFkBxzMn md7JNVXQUAMy8l5UeUdcHYJ6jF0IFxMfL3NfT6jX0NXL5GQAyXXwTR+L98NmlfjWz4uu 1wRQ== MIME-Version: 1.0 X-Received: by 10.204.172.80 with SMTP id k16mr5297384bkz.123.1368429619731; Mon, 13 May 2013 00:20:19 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.204.239.132 with HTTP; Mon, 13 May 2013 00:20:19 -0700 (PDT) Date: Mon, 13 May 2013 00:20:19 -0700 X-Google-Sender-Auth: DEfircN0VZ3BrD-UBmQJe9VU4O0 Message-ID: Subject: late suspend/early resume From: Justin Hibbits To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 07:20:21 -0000 I'd like to solicit opinions on adding new kobj device API calls, device_late_suspend and device_early_resume. I've been working on PowerPC suspend/resume, and certain devices must be suspended last and resumed first on Apple hardware, namely the chipsets. It happens that one device (uninorth) appears first in the devinfo chain, while the other (mac-io) appears off a later PCI bus. So, rather than special casing this to suspend the mac-io and its children, as well as the uninorth, last with specific calls, I'd like to add a device_suspend_late and device_resume_early, that would simply be identical to device_suspend/device_resume, but could be called after and before, respectively, to do last minute order suspend and first pass initialization, to initialize things like clocks required for other devices. It's not difficult to explicitly call suspend and resume functions on the chipsets, but I think it's cleaner to do it through the newbus/kobj interface, and it might be useful for other architectures as well. Thoughts? - Justin