From owner-freebsd-current@FreeBSD.ORG Sun Sep 28 16:38:36 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE2B916A4B3; Sun, 28 Sep 2003 16:38:36 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7E8A44015; Sun, 28 Sep 2003 16:38:34 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) h8SNcPFs078206 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 29 Sep 2003 01:38:30 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id h8SNcOWZ080261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Sep 2003 01:38:25 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h8SNcOrY014878; Mon, 29 Sep 2003 01:38:24 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h8SNcNwT014877; Mon, 29 Sep 2003 01:38:23 +0200 (CEST) Date: Mon, 29 Sep 2003 01:38:23 +0200 From: Bernd Walter To: Poul-Henning Kamp Message-ID: <20030928233823.GJ90598@cicely12.cicely.de> References: <653.1064784127@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <653.1064784127@critter.freebsd.dk> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: arch@freebsd.org cc: current@freebsd.org Subject: Re: HEADSUP: Change of makedev() semantics. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2003 23:38:36 -0000 On Sun, Sep 28, 2003 at 11:22:07PM +0200, Poul-Henning Kamp wrote: > > I am in the process of adding ref-counting and locking to dev_t, > and would very much prefer if we could get this step completed > soon before 5-STABLE gets branched. > > All this will be transparent to the majority of device drivers, as > the refcounting will happen in the make_dev() and destroy_dev() > family of calls and normal drivers need not know more about it. > > But there are a few remaining users of makedev() which get in the > way of this effort, and we must get these fixed. > > Basically: > > 1. Do not call makedev(). > > 2. If you do cloning, please look at the patches I posted > for if_tun/if_tap for how to do it. > > 3. If you do a "normal" device driver, cache the result > from when you call make_dev(). > > 4. If you translate "foreign dev_t's", ie emulators or > compat code, contact me. I'm not sure I understand > how this works and should work and we need to talk. > > 5. If anything else or in doubt, ask me. > > Can I see some volounteers and/or maintainers please ? > > ./alpha/osf1/osf1_misc.c > badly named local macro ? Unused code. umakedev is used within a macro but nowhere defined it seems. makedev is used as a macroname, but ifdef'ed 0. Shouldn't hurt. Maybe someone with knowledge about OSF1 emulation should decide what happens with them in the long run. > ./dev/usb/ugen.c > ./dev/usb/uscanner.c > Failure to cache result of make_dev() I'll take those. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de