From owner-cvs-all@FreeBSD.ORG Thu Jun 15 15:52:05 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A599616A47C; Thu, 15 Jun 2006 15:52:05 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B9A043D49; Thu, 15 Jun 2006 15:52:05 +0000 (GMT) (envelope-from ambrisko@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5FFq5IS058149; Thu, 15 Jun 2006 15:52:05 GMT (envelope-from ambrisko@repoman.freebsd.org) Received: (from ambrisko@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5FFq519058148; Thu, 15 Jun 2006 15:52:05 GMT (envelope-from ambrisko) Message-Id: <200606151552.k5FFq519058148@repoman.freebsd.org> From: Doug Ambrisko Date: Thu, 15 Jun 2006 15:52:05 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/share/man/man5 linsysfs.5 src/sys/amd64/linux32 linux32_sysvec.c src/sys/compat/linux linux_stats.c linux_util.c linux_util.h src/sys/i386/linux linux_sysvec.c src/sys/modules/linux Makefile src/sys/compat/linprocfs ... 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, 15 Jun 2006 15:52:05 -0000 ambrisko 2006-06-15 15:52:05 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/amd64/linux32 linux32_sysvec.c sys/compat/linux linux_stats.c linux_util.c linux_util.h sys/i386/linux linux_sysvec.c sys/modules/linux Makefile sys/compat/linprocfs linprocfs.c Added files: (Branch: RELENG_6) share/man/man5 linsysfs.5 sys/compat/linsysfs linsysfs.c Log: MFC the enhancements to the Linux emulation layer so the MegaRAID SAS management tools can work. This is not totally connected to the build yet. The mfi(4) change have not been MFC'ed yet. This will be done shortly. I'm trying to do this in chunks so I don't totally break the build on a missed commit. This has passed make universe a while ago: Enhance the Linux emulation layer to make MegaRAID SAS managements tool happy. Add back in a scheme to emulate old type major/minor numbers via hooks into stat, linprocfs to return major/minors that Linux app's expect. Currently only /dev/null is always registered. Drivers can register via the Linux type shim similar to the ioctl shim but by using linux_device_register_handler/linux_device_unregister_handler functions. The structure is: struct linux_device_handler { char *bsd_driver_name; char *linux_driver_name; char *bsd_device_name; char *linux_device_name; int linux_major; int linux_minor; int linux_char_device; }; Linprocfs uses this to display the major number of the driver. The soon to be available linsysfs will use it to fill in the driver name. Linux_stat uses it to translate the major/minor into Linux type values. Note major numbers are dynamically assigned via passing in a -1 for the major number so we don't need to keep track of them. This is somewhat needed due to us switching to our devfs. Revision Changes Path 1.2.2.1 +85 -0 src/share/man/man5/linsysfs.5 (new) 1.7.2.3 +6 -0 src/sys/amd64/linux32/linux32_sysvec.c 1.89.2.2 +37 -12 src/sys/compat/linprocfs/linprocfs.c 1.2.2.1 +283 -0 src/sys/compat/linsysfs/linsysfs.c (new) 1.72.2.2 +75 -2 src/sys/compat/linux/linux_stats.c 1.29.2.1 +137 -0 src/sys/compat/linux/linux_util.c 1.25.2.2 +18 -0 src/sys/compat/linux/linux_util.h 1.137.2.2 +6 -0 src/sys/i386/linux/linux_sysvec.c 1.63.2.2 +1 -1 src/sys/modules/linux/Makefile