From owner-cvs-all@FreeBSD.ORG Thu May 29 12:50:46 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EB541065673; Thu, 29 May 2008 12:50:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3BAF48FC23; Thu, 29 May 2008 12:50:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4TCok9e044199; Thu, 29 May 2008 12:50:46 GMT (envelope-from ed@repoman.freebsd.org) Received: (from ed@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4TCokR2044198; Thu, 29 May 2008 12:50:46 GMT (envelope-from ed) Message-Id: <200805291250.m4TCokR2044198@repoman.freebsd.org> From: Ed Schouten Date: Thu, 29 May 2008 12:50:46 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/ieee488 upd7210.c src/sys/dev/led led.c src/sys/dev/md md.c src/sys/geom geom_dev.c src/sys/kern kern_conf.c src/sys/sys conf.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2008 12:50:46 -0000 ed 2008-05-29 12:50:46 UTC FreeBSD src repository Modified files: sys/dev/ieee488 upd7210.c sys/dev/led led.c sys/dev/md md.c sys/geom geom_dev.c sys/kern kern_conf.c sys/sys conf.h Log: Remove the distinction between device minor and unit numbers. Even though we got rid of device major numbers some time ago, device drivers still need to provide unique device minor numbers to make_dev(). These numbers are only used inside the kernel. They are not related to device major and minor numbers which are visible in devfs. These are actually based on the inode number of the device. It would eventually be nice to remove minor numbers entirely, but we don't want to be too agressive here. Because the 8-15 bits of the device number field (si_drv0) are still reserved for the major number, there is no 1:1 mapping of the device minor and unit numbers. Because this is now unused, remove the restrictions on these numbers. The MAXMAJOR definition was actually used for two purposes. It was used to convert both the userspace and kernelspace device numbers to their major/minor pair, which is why it is now named UMINORMASK. minor2unit() and unit2minor() have now become useless. Both minor() and dev2unit() now serve the same purpose. We should eventually remove some of them, at least turning them into macro's. If devfs would become completely minor number unaware, we could consider using si_drv0 directly, just like si_drv1 and si_drv2. Approved by: philip (mentor) Revision Changes Path 1.11 +1 -1 src/sys/dev/ieee488/upd7210.c 1.18 +2 -1 src/sys/dev/led/led.c 1.175 +2 -1 src/sys/dev/md/md.c 1.97 +1 -1 src/sys/geom/geom_dev.c 1.215 +8 -11 src/sys/kern/kern_conf.c 1.239 +0 -2 src/sys/sys/conf.h