From owner-freebsd-arch@FreeBSD.ORG Sat Sep 5 15:17:57 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FD58106566C for ; Sat, 5 Sep 2009 15:17:57 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id 131398FC1A for ; Sat, 5 Sep 2009 15:17:56 +0000 (UTC) Received: by fxm6 with SMTP id 6so1176948fxm.43 for ; Sat, 05 Sep 2009 08:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=r2Qkj9I3EWr+/qrXCcmdSKHsRmUQDCNoy/R2aB0Kh5E=; b=j/bpO08X1ZESZo7uq2xhWUmaD1VOgBCJ61ubfno1HTKdGiwBy68e4mT1mkgek5Ws1W yxVhTS4zPNMvD28j90YwPMSFbxkVnH8POOtnUvle+sbmff1Uoj/JcTnmNc+CjP/F3pIo d+qSa0qE+R/F1+jSM4eRz9ZFzBsWs5d9JF2lM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=kiyHWYeqOGaDzKk6ti3yfEVCmjSlA5gQzRu2FmQdgQkouLyPViky4STZ8iSSl5iPun EKOFb1B9jv3PfUA67oRkUFbWQRgIG2PT4DSGjZns7uSeMko+acirZ2j8H4zH1/6ydscv GmgjuNU/o0YkSgBUTZf013WjMrF9STSq5Y2ac= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.58.139 with SMTP id g11mr5008297fah.43.1252163876246; Sat, 05 Sep 2009 08:17:56 -0700 (PDT) In-Reply-To: <20090905.023634.831786645.imp@bsdimp.com> References: <20090904.161634.-217944108.imp@bsdimp.com> <3bbf2fe10909041546y2b5633e1ue063955568df1a06@mail.gmail.com> <20090904.172310.-1939841993.imp@bsdimp.com> <20090905.023634.831786645.imp@bsdimp.com> Date: Sat, 5 Sep 2009 17:17:56 +0200 X-Google-Sender-Auth: 597020533980486c Message-ID: <3bbf2fe10909050817w4e8da3adxd8e431749b432070@mail.gmail.com> From: Attilio Rao To: "M. Warner Losh" Content-Type: text/plain; charset=UTF-8 Cc: arch@freebsd.org Subject: Re: NEWBUS states X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 15:17:57 -0000 2009/9/5 M. Warner Losh : > In message: <20090904.172310.-1939841993.imp@bsdimp.com> > "M. Warner Losh" writes: > : OK. Let me ponder based on that... It might be better for this round > : of changes to leverage off the device 'flags' field to indicate that > : we're attaching/detaching. This would not break the > : device_is_attached() usage, and would solve the interlock problem > : nicely. While it isn't as aesthetically pleasing as the new states, > : it would allow us to easily MFC it without API/ABI breakage. This > : field surely would be covered by the same set of locks as the state > : field. > : > : I know that there's a good aesthetic argument to be made against this, > : but on the other hand 'compatibility' hacks can violate one's > : aesthetics. We can migrate to a more pleasing state-based model in 9 > : and reduce the risk to other code from changing its semantics at this > : late date. > > For a version of this hack, see > http://people.freebsd.org/~imp/newbus-flags.diff So you propose to offer the transition on the device flags instead than the device states? That is an interesting approach mostly because it won't require an ABI breakage, but let me think about locking implications with it as I want to review some code and came up with a patch/thoughts in some hours. Attilio -- Peace can only be achieved by understanding - A. Einstein