DEV messaging stage 2/4: In this stage all DEV commands are now being
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Jul 2003 17:03:35 +0000 (17:03 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 22 Jul 2003 17:03:35 +0000 (17:03 +0000)
commit335dda388a5c13edd38c87c32b72e51eaaedce75
tree6a2bc5d084ad57bf31b02c06d56a847c94a88cc8
parent0260ddf9fed745ee1e30bed9a901b9e5fa02b95d
DEV messaging stage 2/4: In this stage all DEV commands are now being
funneled through the message port for action by the port's beginmsg function.
CONSOLE and DISK device shims replace the port with their own and then
forward to the original.  FB (Frame Buffer) shims supposedly do the same
thing but I haven't been able to test it.   I don't expect instability
in mainline code but there might be easy-to-fix, and some drivers still need
to be converted.  See primarily: kern/kern_device.c (new dev_*() functions and
inherits cdevsw code from kern/kern_conf.c), sys/device.h, and kern/subr_disk.c
for the high points.

In this stage all DEV messages are still acted upon synchronously in the
context of the caller.  We cannot create a separate handler thread until
the copyin's (primarily in ioctl functions) are made thread-aware.

Note that the messaging shims are going to look rather messy in these early
days but as more subsystems are converted over we will begin to use
pre-initialized messages and message forwarding to avoid having to constantly
rebuild messages prior to use.

Note that DEV itself is a mess oweing to its 4.x roots and will be cleaned
up in subsequent passes.  e.g. the way sub-devices inherit the main device's
cdevsw was always a bad hack and it still is, and several functions
(mmap, kqfilter, psize, poll) return results rather then error codes, which
will be fixed since now we have a message to store the result in :-)
58 files changed:
sys/bus/cam/scsi/scsi_cd.c
sys/bus/cam/scsi/scsi_da.c
sys/bus/isa/vga_isa.c
sys/conf/files
sys/contrib/dev/fla/fla.c
sys/dev/disk/ata/ata-disk.c
sys/dev/disk/ata/ata-raid.c
sys/dev/disk/ata/ata-raid.h
sys/dev/disk/ata/atapi-fd.c
sys/dev/disk/fd/fd.c
sys/dev/disk/md/md.c
sys/dev/drm/drm_drv.h
sys/dev/netif/ed/if_ed_pccard.c
sys/dev/raid/aac/aac_disk.c
sys/dev/raid/amr/amr_disk.c
sys/dev/raid/ida/ida_disk.c
sys/dev/raid/mlx/mlx_disk.c
sys/dev/raid/pst/pst-raid.c
sys/dev/raid/twe/twe_freebsd.c
sys/dev/raid/vinum/vinumhdr.h
sys/dev/raid/vinum/vinumio.c
sys/dev/video/fb/fb.c
sys/dev/video/fb/fbreg.h
sys/dev/video/fb/gfb.h
sys/dev/video/fb/vgareg.h
sys/dev/video/gfb/gfb_pci.c
sys/dev/video/tga/tga_pci.c
sys/emulation/linux/linux_stats.c
sys/i386/i386/autoconf.c
sys/kern/kern_conf.c
sys/kern/kern_device.c [new file with mode: 0644]
sys/kern/kern_physio.c
sys/kern/kern_shutdown.c
sys/kern/lwkt_msgport.c
sys/kern/subr_disk.c
sys/kern/subr_diskmbr.c
sys/kern/subr_diskslice.c
sys/kern/tty_cons.c
sys/kern/tty_pty.c
sys/kern/vfs_conf.c
sys/kern/vfs_default.c
sys/kern/vfs_subr.c
sys/kern/vfs_vnops.c
sys/platform/pc32/i386/autoconf.c
sys/sys/buf.h
sys/sys/conf.h
sys/sys/device.h [new file with mode: 0644]
sys/sys/disk.h
sys/sys/msgport.h
sys/sys/msgport2.h
sys/sys/thread.h
sys/vfs/coda/coda_vfsops.c
sys/vfs/isofs/cd9660/cd9660_vfsops.c
sys/vfs/specfs/spec_vnops.c
sys/vfs/ufs/ufs_disksubr.c
sys/vm/device_pager.c
sys/vm/vm_rangelock.c [new file with mode: 0644]
sys/vm/vm_swap.c