Date: Sat, 5 Oct 2002 10:18:32 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 18735 for review Message-ID: <200210051718.g95HIWbg092050@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18735 Change 18735 by rwatson@rwatson_tislabs on 2002/10/05 10:18:08 Integ TrustedBSD base to TrustedBSD MAC: IFC the GEOM default change, lots of MAC synchronization. Affected files ... .. //depot/projects/trustedbsd/mac/sys/alpha/conf/GENERIC#15 integrate .. //depot/projects/trustedbsd/mac/sys/alpha/conf/SIMOS#5 integrate .. //depot/projects/trustedbsd/mac/sys/conf/NOTES#22 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files#53 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files.alpha#11 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files.i386#17 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files.ia64#10 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files.pc98#14 integrate .. //depot/projects/trustedbsd/mac/sys/conf/files.sparc64#13 integrate .. //depot/projects/trustedbsd/mac/sys/conf/options#31 integrate .. //depot/projects/trustedbsd/mac/sys/dev/mcd/mcd.c#2 integrate .. //depot/projects/trustedbsd/mac/sys/dev/mcd/mcd_isa.c#2 integrate .. //depot/projects/trustedbsd/mac/sys/geom/geom_disk.c#9 integrate .. //depot/projects/trustedbsd/mac/sys/i386/conf/GENERIC#20 integrate .. //depot/projects/trustedbsd/mac/sys/i386/conf/OLDCARD#5 integrate .. //depot/projects/trustedbsd/mac/sys/i386/isa/scd.c#7 integrate .. //depot/projects/trustedbsd/mac/sys/ia64/conf/GENERIC#13 integrate .. //depot/projects/trustedbsd/mac/sys/ia64/conf/SKI#6 integrate .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#294 integrate .. //depot/projects/trustedbsd/mac/sys/kern/subr_disk.c#8 integrate .. //depot/projects/trustedbsd/mac/sys/pc98/conf/GENERIC#16 integrate .. //depot/projects/trustedbsd/mac/sys/pc98/pc98/wd.c#3 integrate .. //depot/projects/trustedbsd/mac/sys/pc98/pc98/wd_cd.c#3 integrate .. //depot/projects/trustedbsd/mac/sys/powerpc/conf/GENERIC#10 integrate .. //depot/projects/trustedbsd/mac/sys/sparc64/conf/GENERIC#18 integrate Differences ... ==== //depot/projects/trustedbsd/mac/sys/alpha/conf/GENERIC#15 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.150 2002/08/20 00:10:19 peter Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.151 2002/10/05 16:35:20 phk Exp $ machine alpha cpu EV4 @@ -31,6 +31,8 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options NO_GEOM + # Platforms supported options API_UP1000 # UP1000, UP1100 (Nautilus) options DEC_AXPPCI_33 # UDB, Multia, AXPpci33, NoName ==== //depot/projects/trustedbsd/mac/sys/alpha/conf/SIMOS#5 (text+ko) ==== @@ -11,13 +11,15 @@ # device lines is present in the ./NOTES file. If you are in doubt as # to the purpose or necessity of a line, check first in NOTES. # -# $FreeBSD: src/sys/alpha/conf/SIMOS,v 1.22 2002/07/23 06:36:23 peter Exp $ +# $FreeBSD: src/sys/alpha/conf/SIMOS,v 1.23 2002/10/05 16:35:21 phk Exp $ machine alpha cpu EV5 ident SIMOS maxusers 10 +options NO_GEOM + options DEC_KN8AE options SIMOS options INET #InterNETworking ==== //depot/projects/trustedbsd/mac/sys/conf/NOTES#22 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1088 2002/10/04 20:42:31 sam Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1089 2002/10/05 16:35:25 phk Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -114,8 +114,12 @@ # options INCLUDE_CONFIG_FILE # Include this file in kernel -options GEOM # Use the GEOMetry system for - # disk-I/O transformations. +options GEOM_AES +options GEOM_BSD +options GEOM_GPT +options GEOM_MBR +options GEOM_PC98 +options GEOM_SUNLABEL # # The root device and filesystem type can be compiled in; ==== //depot/projects/trustedbsd/mac/sys/conf/files#53 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.712 2002/10/05 02:00:57 iwasaki Exp $ +# $FreeBSD: src/sys/conf/files,v 1.713 2002/10/05 16:35:26 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -458,8 +458,8 @@ dev/nsp/nsp_pccard.c optional nsp card #dev/nsp/nsp_pccard.c optional nsp pccard dev/mca/mca_bus.c optional mca -dev/mcd/mcd.c optional mcd isa -dev/mcd/mcd_isa.c optional mcd isa +dev/mcd/mcd.c optional mcd isa nowerror +dev/mcd/mcd_isa.c optional mcd isa nowerror dev/md/md.c optional md dev/mii/amphy.c optional miibus dev/mii/bmtphy.c optional miibus @@ -787,21 +787,21 @@ fs/unionfs/union_subr.c optional unionfs fs/unionfs/union_vfsops.c optional unionfs fs/unionfs/union_vnops.c optional unionfs -geom/geom_aes.c optional geom -geom/geom_bsd.c optional geom -geom/geom_dev.c optional geom -geom/geom_disk.c optional geom -geom/geom_dump.c optional geom -geom/geom_enc.c optional geom -geom/geom_event.c optional geom -geom/geom_gpt.c optional geom -geom/geom_io.c optional geom -geom/geom_kern.c optional geom -geom/geom_mbr.c optional geom -geom/geom_pc98.c optional geom -geom/geom_slice.c optional geom -geom/geom_subr.c optional geom -geom/geom_sunlabel.c optional geom +geom/geom_aes.c optional geom_aes +geom/geom_bsd.c optional geom_bsd +geom/geom_dev.c standard +geom/geom_disk.c standard +geom/geom_dump.c standard +geom/geom_enc.c standard +geom/geom_event.c standard +geom/geom_gpt.c optional geom_gpt +geom/geom_io.c standard +geom/geom_kern.c standard +geom/geom_mbr.c optional geom_mbr +geom/geom_pc98.c optional geom_pc98 +geom/geom_slice.c standard +geom/geom_subr.c standard +geom/geom_sunlabel.c optional geom_sunlabel crypto/rijndael/rijndael-alg-fst.c optional geom crypto/rijndael/rijndael-api-fst.c optional geom gnu/ext2fs/ext2_alloc.c optional ext2fs \ ==== //depot/projects/trustedbsd/mac/sys/conf/files.alpha#11 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.alpha,v 1.94 2002/10/04 20:42:33 sam Exp $ +# $FreeBSD: src/sys/conf/files.alpha,v 1.95 2002/10/05 16:35:26 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -193,6 +193,7 @@ dev/syscons/scvtb.c optional sc dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc +geom/geom_bsd.c standard isa/atkbd_isa.c optional atkbd isa/atkbdc_isa.c optional atkbdc isa/fd.c optional fdc ==== //depot/projects/trustedbsd/mac/sys/conf/files.i386#17 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.422 2002/10/04 20:42:33 sam Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.423 2002/10/05 16:35:26 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -146,6 +146,8 @@ dev/syscons/scvtb.c optional sc dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc +geom/geom_bsd.c standard +geom/geom_mbr.c standard gnu/i386/fpemul/div_small.s optional gpl_math_emulate \ warning "kernel contains GPL contaminated math emulator" gnu/i386/fpemul/errors.c optional gpl_math_emulate @@ -285,7 +287,7 @@ i386/isa/pmtimer.c optional pmtimer i386/isa/prof_machdep.c optional profiling-routine i386/isa/rc.c count rc -i386/isa/scd.c count scd +i386/isa/scd.c count scd nowerror i386/isa/spic.c optional spic i386/isa/spigot.c count spigot i386/isa/spkr.c optional speaker ==== //depot/projects/trustedbsd/mac/sys/conf/files.ia64#10 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.ia64,v 1.37 2002/10/04 20:42:33 sam Exp $ +# $FreeBSD: src/sys/conf/files.ia64,v 1.38 2002/10/05 16:35:26 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -99,6 +99,7 @@ dev/syscons/scvtb.c optional sc dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc +geom/geom_gpt.c standard isa/atkbd_isa.c optional atkbd isa/atkbdc_isa.c optional atkbdc isa/fd.c optional fdc ==== //depot/projects/trustedbsd/mac/sys/conf/files.pc98#14 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.249 2002/10/04 20:42:33 sam Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.250 2002/10/05 16:35:26 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -135,6 +135,9 @@ dev/syscons/scterm-dumb.c optional sc dev/syscons/scvidctl.c optional sc dev/syscons/sysmouse.c optional sc +geom/geom_mbr.c standard +geom/geom_bsd.c standard +geom/geom_pc98.c standard gnu/i386/fpemul/div_small.s optional gpl_math_emulate \ warning "kernel contains GPL contaminated math emulator" gnu/i386/fpemul/errors.c optional gpl_math_emulate ==== //depot/projects/trustedbsd/mac/sys/conf/files.sparc64#13 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sparc64,v 1.31 2002/10/04 20:42:33 sam Exp $ +# $FreeBSD: src/sys/conf/files.sparc64,v 1.32 2002/10/05 16:35:26 phk Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -16,6 +16,8 @@ dev/ofw/openfirm.c standard dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa +geom/geom_bsd.c standard +geom/geom_sunlabel.c standard libkern/ffs.c standard kern/subr_diskmbr.c standard kern/syscalls.c optional ktr ==== //depot/projects/trustedbsd/mac/sys/conf/options#31 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.354 2002/10/02 07:44:15 scottl Exp $ +# $FreeBSD: src/sys/conf/options,v 1.355 2002/10/05 16:35:26 phk Exp $ # # On the handling of kernel options # @@ -86,7 +86,13 @@ DDB_UNATTENDED GDB_REMOTE_CHAT opt_ddb.h GDBSPEED opt_ddb.h -GEOM +NO_GEOM opt_geom.h +GEOM_AES opt_geom.h +GEOM_BSD opt_geom.h +GEOM_GPT opt_geom.h +GEOM_MBR opt_geom.h +GEOM_PC98 opt_geom.h +GEOM_SUNLABEL opt_geom.h HW_WDOG KSTACK_PAGES KSTACK_MAX_PAGES ==== //depot/projects/trustedbsd/mac/sys/dev/mcd/mcd.c#2 (text+ko) ==== @@ -1,5 +1,7 @@ #include "opt_geom.h" -#ifndef GEOM +#ifndef NO_GEOM +#warning "The mcd driver is currently not compatible with GEOM" +#else /* * Copyright 1993 by Holger Veit (data part) * Copyright 1993 by Brian Moore (audio part) @@ -42,7 +44,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/mcd/mcd.c,v 1.129 2002/10/04 07:14:13 mdodd Exp $ + * $FreeBSD: src/sys/dev/mcd/mcd.c,v 1.130 2002/10/05 16:35:27 phk Exp $ */ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; ==== //depot/projects/trustedbsd/mac/sys/dev/mcd/mcd_isa.c#2 (text+ko) ==== @@ -1,7 +1,10 @@ /* - * $FreeBSD: src/sys/dev/mcd/mcd_isa.c,v 1.1 2002/10/04 07:14:13 mdodd Exp $ + * $FreeBSD: src/sys/dev/mcd/mcd_isa.c,v 1.2 2002/10/05 16:35:29 phk Exp $ */ +#include "opt_geom.h" +#ifdef NO_GEOM + #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -209,3 +212,5 @@ static devclass_t mcd_devclass; DRIVER_MODULE(mcd, isa, mcd_isa_driver, mcd_devclass, NULL, 0); + +#endif /* GEOM */ ==== //depot/projects/trustedbsd/mac/sys/geom/geom_disk.c#9 (text+ko) ==== @@ -32,9 +32,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/geom/geom_disk.c,v 1.20 2002/10/04 10:15:26 phk Exp $ + * $FreeBSD: src/sys/geom/geom_disk.c,v 1.21 2002/10/05 16:35:29 phk Exp $ */ +#include "opt_geom.h" +#ifndef NO_GEOM + #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -263,15 +266,6 @@ { } -SYSCTL_INT(_debug_sizeof, OID_AUTO, disklabel, CTLFLAG_RD, - 0, sizeof(struct disklabel), "sizeof(struct disklabel)"); - -SYSCTL_INT(_debug_sizeof, OID_AUTO, diskslices, CTLFLAG_RD, - 0, sizeof(struct diskslices), "sizeof(struct diskslices)"); - -SYSCTL_INT(_debug_sizeof, OID_AUTO, disk, CTLFLAG_RD, - 0, sizeof(struct disk), "sizeof(struct disk)"); - static void g_kern_disks(void *p) { @@ -309,3 +303,5 @@ SYSCTL_PROC(_kern, OID_AUTO, disks, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NOLOCK, 0, 0, sysctl_disks, "A", "names of available disks"); + +#endif ==== //depot/projects/trustedbsd/mac/sys/i386/conf/GENERIC#20 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.365 2002/09/27 19:09:21 sos Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.366 2002/10/05 16:35:30 phk Exp $ machine i386 cpu I486_CPU @@ -30,6 +30,8 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options NO_GEOM + options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem ==== //depot/projects/trustedbsd/mac/sys/i386/conf/OLDCARD#5 (text+ko) ==== @@ -17,7 +17,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/i386/conf/OLDCARD,v 1.10 2002/08/20 04:36:31 kuriyama Exp $ +# $FreeBSD: src/sys/i386/conf/OLDCARD,v 1.11 2002/10/05 16:35:30 phk Exp $ machine i386 cpu I486_CPU @@ -31,6 +31,8 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options NO_GEOM + options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem ==== //depot/projects/trustedbsd/mac/sys/i386/isa/scd.c#7 (text+ko) ==== @@ -1,5 +1,7 @@ #include "opt_geom.h" -#ifndef GEOM +#ifndef NO_GEOM +#warning "The scd driver is currently incompatible with GEOM" +#else /*- * Copyright (c) 1995 Mikael Hybsch * All rights reserved. @@ -43,7 +45,7 @@ */ -/* $FreeBSD: src/sys/i386/isa/scd.c,v 1.68 2002/10/04 08:33:10 mdodd Exp $ */ +/* $FreeBSD: src/sys/i386/isa/scd.c,v 1.69 2002/10/05 16:35:31 phk Exp $ */ /* Please send any comments to micke@dynas.se */ ==== //depot/projects/trustedbsd/mac/sys/ia64/conf/GENERIC#13 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/ia64/conf/GENERIC,v 1.37 2002/09/09 02:40:59 kuriyama Exp $ +# $FreeBSD: src/sys/ia64/conf/GENERIC,v 1.38 2002/10/05 16:35:31 phk Exp $ machine ia64 cpu ITANIUM @@ -31,6 +31,8 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions NO_CPU_COPTFLAGS=true #Ignore any x86 CPUTYPE +options NO_GEOM + #options SKI #Support for HP simulator options INET #InterNETworking options INET6 #IPv6 communications protocols ==== //depot/projects/trustedbsd/mac/sys/ia64/conf/SKI#6 (text+ko) ==== @@ -20,7 +20,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/ia64/conf/SKI,v 1.6 2002/09/09 02:40:59 kuriyama Exp $ +# $FreeBSD: src/sys/ia64/conf/SKI,v 1.7 2002/10/05 16:35:31 phk Exp $ machine ia64 cpu ITANIUM @@ -33,6 +33,8 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions NO_CPU_COPTFLAGS=true #Ignore any x86 CPUTYPE +options NO_GEOM + options SKI #Support for HP simulator options INET #InterNETworking #options INET6 #IPv6 communications protocols ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#294 (text+ko) ==== @@ -36,7 +36,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/kern_mac.c,v 1.28 2002/10/05 15:09:57 rwatson Exp $ + * $FreeBSD: src/sys/kern/kern_mac.c,v 1.33 2002/10/05 16:57:16 rwatson Exp $ */ /* * Developed by the TrustedBSD Project. ==== //depot/projects/trustedbsd/mac/sys/kern/subr_disk.c#8 (text+ko) ==== @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $FreeBSD: src/sys/kern/subr_disk.c,v 1.60 2002/10/05 11:24:21 brian Exp $ + * $FreeBSD: src/sys/kern/subr_disk.c,v 1.61 2002/10/05 16:35:31 phk Exp $ * */ @@ -20,7 +20,7 @@ #include <sys/disk.h> #include <sys/diskslice.h> #include <sys/disklabel.h> -#ifndef GEOM +#ifdef NO_GEOM #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/malloc.h> @@ -440,7 +440,7 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, disk, CTLFLAG_RD, 0, sizeof(struct disk), "sizeof(struct disk)"); -#endif +#endif /* NO_GEOM */ /*- * Disk error is the preface to plaintive error messages ==== //depot/projects/trustedbsd/mac/sys/pc98/conf/GENERIC#16 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/pc98/conf/GENERIC,v 1.215 2002/08/20 00:10:21 peter Exp $ +# $FreeBSD: src/sys/pc98/conf/GENERIC,v 1.216 2002/10/05 16:35:32 phk Exp $ machine pc98 #cpu I386_CPU #Do not enable with other cpu types @@ -31,6 +31,8 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +options NO_GEOM + options PC98 #PC98 options MATH_EMULATE #Support for x87 emulation options INET #InterNETworking ==== //depot/projects/trustedbsd/mac/sys/pc98/pc98/wd.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/pc98/pc98/wd.c,v 1.126 2002/09/20 19:36:04 phk Exp $ + * $FreeBSD: src/sys/pc98/pc98/wd.c,v 1.127 2002/10/05 15:49:38 phk Exp $ */ /* TODO: @@ -471,6 +471,7 @@ struct wdparams *wp; static char buf[] = "wdcXXX"; const char *dname; + dev_t dev; dvp->id_intr = wdintr; @@ -598,8 +599,10 @@ /* * Register this media as a disk */ - disk_create(lunit, &du->disk, 0, &wd_cdevsw, + dev = disk_create(lunit, &du->disk, 0, &wd_cdevsw, &wddisk_cdevsw); + dev->si_drv1 = &wddrives[lunit]; + } else { free(du, M_TEMP); wddrives[lunit] = NULL; @@ -645,17 +648,18 @@ wdstrategy(register struct bio *bp) { struct softc *du; - int lunit = dkunit(bp->bio_dev); + int lunit; int s; - /* valid unit, controller, and request? */ - if (lunit >= NWD || bp->bio_blkno < 0 || (du = wddrives[lunit]) == NULL - || bp->bio_bcount % DEV_BSIZE != 0) { + du = bp->bio_dev->si_drv1; + if (du == NULL || bp->bio_blkno < 0 || + bp->bio_bcount % DEV_BSIZE != 0) { bp->bio_error = EINVAL; bp->bio_flags |= BIO_ERROR; goto done; } + lunit = du->dk_unit; #ifdef PC98 outb(0x432,(du->dk_unit)%2); @@ -768,8 +772,8 @@ } /* obtain controller and drive information */ - lunit = dkunit(bp->bio_dev); - du = wddrives[lunit]; + du = bp->bio_dev->si_drv1; + lunit = du->dk_unit; #ifdef PC98 outb(0x432,(du->dk_unit)%2); @@ -1033,7 +1037,7 @@ return; } bp = bioq_first(&wdtab[unit].controller_queue); - du = wddrives[dkunit(bp->bio_dev)]; + du = bp->bio_dev->si_drv1; #ifdef PC98 outb(0x432,(du->dk_unit)%2); @@ -1227,13 +1231,9 @@ int wdopen(dev_t dev, int flags, int fmt, struct thread *td) { - register unsigned int lunit; register struct softc *du; - lunit = dkunit(dev); - if (lunit >= NWD || dksparebits(dev) != 0) - return (ENXIO); - du = wddrives[lunit]; + du = dev->si_drv1; if (du == NULL) return (ENXIO); @@ -1279,7 +1279,7 @@ register struct softc *du; int ctrlr; - du = wddrives[dkunit(bp->bio_dev)]; + du = bp->bio_dev->si_drv1; ctrlr = du->dk_ctrlr_cmd640; #ifdef PC98 ==== //depot/projects/trustedbsd/mac/sys/pc98/pc98/wd_cd.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/pc98/pc98/wd_cd.c,v 1.43 2002/04/01 21:31:10 jhb Exp $ + * $FreeBSD: src/sys/pc98/pc98/wd_cd.c,v 1.44 2002/10/05 15:49:39 phk Exp $ */ #include <sys/param.h> @@ -128,15 +128,15 @@ else ptr->device_stats = device_stats; - make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0), + pdev = make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0), UID_ROOT, GID_OPERATOR, 0640, "wcd%da", lun); - pdev = makedev(acd_cdevsw.d_maj, dkmakeminor(lun, 0, 0)); make_dev_alias(pdev, "rwcd%da", lun); + pdev->si_drv1 = ptr; - make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), + pdev = make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART), UID_ROOT, GID_OPERATOR, 0640, "wcd%dc", lun); - pdev = makedev(acd_cdevsw.d_maj, dkmakeminor(lun, 0, RAW_PART)); make_dev_alias(pdev, "rwcd%dc", lun); + pdev->si_drv1 = ptr; return ptr; } @@ -381,12 +381,11 @@ static int acdopen(dev_t dev, int flags, int fmt, struct thread *td) { - int lun = dkunit(dev); struct acd *cdp; - if (lun >= acdnlun || !atapi_request_immediate) + cdp = dev->si_drv1; + if (cdp == NULL) return ENXIO; - cdp = acdtab[lun]; if (!(cdp->flags & F_BOPEN) && !cdp->refcnt) { /* Prevent user eject */ @@ -400,14 +399,14 @@ ++cdp->refcnt; dev->si_bsize_phys = cdp->block_size; if (!(flags & O_NONBLOCK) && acd_read_toc(cdp) && !(flags & FWRITE)) - printf("acd%d: read_toc failed\n", lun); + printf("acd%d: read_toc failed\n", cdp->unit); return 0; } int acdclose(dev_t dev, int flags, int fmt, struct thread *td) { - struct acd *cdp = acdtab[dkunit(dev)]; + struct acd *cdp = dev->si_drv1; if (fmt == S_IFBLK) cdp->flags &= ~F_BOPEN; @@ -434,8 +433,7 @@ void acdstrategy(struct bio *bp) { - int lun = dkunit(bp->bio_dev); - struct acd *cdp = acdtab[lun]; + struct acd *cdp = bp->bio_dev->si_drv1; int x; #ifdef NOTYET @@ -578,8 +576,7 @@ int acdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { - int lun = dkunit(dev); - struct acd *cdp = acdtab[lun]; + struct acd *cdp = dev->si_drv1; int error = 0; if (cdp->flags & F_MEDIA_CHANGED) ==== //depot/projects/trustedbsd/mac/sys/powerpc/conf/GENERIC#10 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/powerpc/conf/GENERIC,v 1.15 2002/10/04 01:19:18 grehan Exp $ +# $FreeBSD: src/sys/powerpc/conf/GENERIC,v 1.16 2002/10/05 16:35:32 phk Exp $ machine powerpc cpu MPC750 @@ -33,6 +33,8 @@ options POWERMAC #NewWorld Apple PowerMacs options PSIM #GDB PSIM ppc simulator +options NO_GEOM + options INET #InterNETworking options INET6 #IPv6 communications protocols options GEOM #GEOMetry subsystem ==== //depot/projects/trustedbsd/mac/sys/sparc64/conf/GENERIC#18 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/sparc64/conf/GENERIC,v 1.36 2002/10/02 01:33:50 jake Exp $ +# $FreeBSD: src/sys/sparc64/conf/GENERIC,v 1.37 2002/10/05 16:35:33 phk Exp $ machine sparc64 cpu SUN4U @@ -33,6 +33,8 @@ # Platforms supported # At this time all platforms are supported, as-is. +options NO_GEOM + options INET #InterNETworking options INET6 #IPv6 communications protocols options FFS #Berkeley Fast Filesystem To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210051718.g95HIWbg092050>