Commit Graph

15253 Commits

Author SHA1 Message Date
KATO Takenori 68d855cd75 - Fixed default irq in SMP kernel.
- Removed hardcode IRQ in #ifdef PC98.
1999-05-17 12:38:28 +00:00
KATO Takenori d31171c3a3 Sync with sys/i386/isa/npx.c revision 1.73. 1999-05-17 12:13:28 +00:00
KATO Takenori 9ec9cc8414 Sync with sys/i386/i386/userconfig.c revision 1.144. 1999-05-17 12:09:07 +00:00
KATO Takenori 848f97e37d Removed ucmpdi2.c 1999-05-17 12:07:00 +00:00
Alan Cox e972780a11 Add the options MAP_PREFAULT and MAP_PREFAULT_PARTIAL to vm_map_find/insert,
eliminating the need for the pmap_object_init_pt calls in imgact_* and
mmap.

Reviewed by:	David Greenman <dg@root.com>
1999-05-17 00:53:56 +00:00
Pierre Beyssac e3c1388bba PR: kern/10570
Submitted by:	adrian@freebsd.org

Change reference count in struct ifaddr to a u_int, to be able
to handle more than 2^16 routes to the same interface.

Fix suggested by Andrew Bangs <andrewb@demon.net> in PR kern/10570.
Tested by <adrian@freebsd.org> and me under -current.
1999-05-16 17:09:20 +00:00
Poul-Henning Kamp d8bd3ac418 $ brucify -deblunder 1999-05-16 10:51:52 +00:00
Alan Cox ea41812fe5 Remove prototypes for functions that don't exist anymore (vm_map.h).
Remove a useless argument from vm_map_madvise's interface (vm_map.c,
	vm_map.h, and vm_mmap.c).

Remove a redundant test in vm_uiomove (vm_map.c).

Make two changes to vm_object_coalesce:

1. Determine whether the new range of pages actually overlaps
the existing object's range of pages before calling vm_object_page_remove.
(Prior to this change almost 90% of the calls to vm_object_page_remove
were to remove pages that were beyond the end of the object.)

2. Free any swap space allocated to removed pages.
1999-05-16 05:07:34 +00:00
Dmitrij Tejblum 54746b676c Fix confusion of size of transfer with size of the pager.
PR:		11658
Broken in:	1.89 (1998/03/07)
1999-05-15 23:42:39 +00:00
Eivind Eklund 1d8290f3c3 Add enough include files to make this actually compile on an a.out system. 1999-05-15 23:18:32 +00:00
David E. O'Brien 77492b54df Add `xe', the Xircom PC Card Ethernet driver. 1999-05-15 18:20:19 +00:00
Doug Rabson 8be693d4d1 Make sure sysctls use udev_t, not dev_t.
Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>
1999-05-15 18:14:03 +00:00
Peter Wemm 2f2ffb8d2c Don't hardcode IRQ 13 for NPX. It's as good as hardwired in the hardware
though, on systems (386 mostly) that still have a seperate fpu, but it
might be possible to find systems where the FPU coprocessor is wired to
a different IRQ pin.
1999-05-15 17:58:58 +00:00
Doug Rabson 64cd03f38e Make sure sysctls use udev_t, not dev_t.
Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu>
1999-05-15 17:56:34 +00:00
Greg Lehey 2ca1fa6cd1 Reenable vinum build. 1999-05-15 06:13:27 +00:00
Greg Lehey e4d6d0216b Modify to work with new style dev_t.
With_copious_input_from:  peter
			  phk
1999-05-15 05:49:21 +00:00
Warner Losh fca33042ed Put a small delay in before sending the inquire_setup command. The
docs don't seem to shed light on why this is needed, but reports from
the field indicate this helps prevent problems in this area.  Ken's
changes seem to have exposed this bug, rather than caused it, as far
as I can tell.

Thanks to Jack O'Neill for tracking this down.

Submitted by: jack@germanium.xtalwind.net

Very strong 3.2 merge candidate.
1999-05-14 23:10:25 +00:00
Alan Cox e5f13bdd09 Simplify vm_map_find/insert's interface: remove the MAP_COPY_NEEDED option.
It never makes sense to specify MAP_COPY_NEEDED without also specifying
MAP_COPY_ON_WRITE, and vice versa.  Thus, MAP_COPY_ON_WRITE suffices.

Reviewed by:	David Greenman <dg@root.com>
1999-05-14 23:09:34 +00:00
Luoqi Chen 7af0acae17 Ignore some ioctls on the master until the slave is open. 1999-05-14 20:44:20 +00:00
Luoqi Chen 0ce54cbb0c Legally acquire a major number for mfs. 1999-05-14 20:40:23 +00:00
Daniel C. Sobral c4b16f49fc Add "initialize" to loader.4th, so running "start" is not actually needed. 1999-05-14 18:59:27 +00:00
Justin T. Gibbs 600829cdfc Nuke ucmpdi2.c from i386/libkern to serve as a reminder that switch
statements on 64bit values generate poor code.

Requested by: bde
1999-05-14 17:39:54 +00:00
Justin T. Gibbs 168d6886b8 Use a lookup table for device matching instead of a switch on a 64bit
value.  EGCS generates poor code for sparse switch statements on 64bit
values.

Requested by: bde
1999-05-14 17:38:07 +00:00
Doug Rabson 6c2e3dde8c * Define a new static method DEVICE_IDENTIFY which is called to add device
instances to a parent bus.
* Define a new method BUS_ADD_CHILD which can be called from DEVICE_IDENTIFY
  to add new instances.
* Add a generic implementation of DEVICE_PROBE which calls DEVICE_IDENTIFY
  for each driver attached to the parent's devclass.
* Move the hint-based isa probe from the isa driver to a new isahint driver
  which can be shared between i386 and alpha.
1999-05-14 11:22:47 +00:00
Doug Rabson d45204676e The previous log message should have read:
Use breakpoint() to start debugger to avoid crashing back to the firmware
when gdb tries to print the msg argument to Debugger().
1999-05-14 11:15:13 +00:00
Doug Rabson cc180a90a0 Make sure to pass a dev_t to dkunit. 1999-05-14 11:13:21 +00:00
Daniel C. Sobral b097076e25 Add fxp on a category of it's own. 1999-05-14 10:20:54 +00:00
Daniel C. Sobral 372dd86a44 Remove atapi and joy, add svr4 and streams. I wonder if removing vinum
is in order or not... (things are _not_ loaded by default, but it serves
as a reference to people tweaking their own loader.conf files)
1999-05-14 10:14:50 +00:00
KATO Takenori 7da4aaefd3 Sync with sys/i386/i386/userconfig.c revision 1.143. 1999-05-14 10:05:55 +00:00
Daniel C. Sobral 5109966e43 Add ntfs and splash_pcx, remove pcic and wcd (yikes! what was THAT
doing here?).

Candidate for 3.2.
1999-05-14 10:03:58 +00:00
KATO Takenori 5eb7d0b887 Sync with sys/i386/conf/files.i386 revision 1.241. 1999-05-14 10:03:48 +00:00
Doug Rabson 454a0546ba Adjust method dispatch to ensure that default methods are called properly. 1999-05-14 09:13:43 +00:00
Joseph Koshy a6e1e3ab4b Correct comment to refer to kget(8). 1999-05-14 05:25:44 +00:00
Justin T. Gibbs 007c45c2e7 Add ucmpdi2.c to the i386 libkern build. 1999-05-14 05:10:15 +00:00
Justin T. Gibbs f3da2c5d80 Take the subvendor and subdevice ids into account during device probe.
Sync up device Ids with the master Adaptec list.

Add probe support for the 2940 Pro although it isn't obvious that
all of the termination support is correct for this adapter yet.
1999-05-14 05:09:24 +00:00
Justin T. Gibbs 06d2b844cc Better workaround for aic7890 chip bug. Use the HS_MAILBOX register to
tell the sequencer to pause itself for a target msg variable update.  This
avoids the pause race entirely as HS_MAILBOX can be accessed without
pausing the chip.

3.2 Merge candidate.
1999-05-14 05:07:25 +00:00
Justin T. Gibbs a173bb9fc5 Add ucmpdi2.c to i386 libkern build. Its required for some quad
manipulation in the aic7xxx driver.
1999-05-14 05:05:33 +00:00
David E. O'Brien 39cc3b46b1 if_xe* now lives in sys/dev/pccard/ 1999-05-14 04:18:24 +00:00
David E. O'Brien 282462f969 Add the `xe' Xircom PC Card driver. 1999-05-14 03:57:25 +00:00
David E. O'Brien e6e8109613 This commit was generated by cvs2svn to compensate for changes in r47151,
which included commits to RCS files with non-trunk default branches.
1999-05-14 02:26:20 +00:00
David E. O'Brien eeccf7d9a2 Virgin import of Xircom PCCARD driver v1.19.
v1.19 (1999/04/15) updates the CEM56/REM56 support.

Current bugs & misfeatures
--------------------------
* CE2 cards still not working reliably. Unclear if this is related to
  packet I/O code or interrupt handling.
* Autonegotiation support remains flaky. We're now OK with 10Mbit auto
  hubs, but certain combination of hardware will fail to connect.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:26:20 +00:00
David E. O'Brien bd5a7eb3e7 Virgin import of Xircom PCCARD driver v1.19.
v1.19 (1999/04/15) updates the CEM56/REM56 support.

Current bugs & misfeatures
--------------------------
* CE2 cards still not working reliably. Unclear if this is related to
  packet I/O code or interrupt handling.
* Autonegotiation support remains flaky. We're now OK with 10Mbit auto
  hubs, but certain combination of hardware will fail to connect.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:26:20 +00:00
David E. O'Brien a745f13344 This commit was generated by cvs2svn to compensate for changes in r47148,
which included commits to RCS files with non-trunk default branches.
1999-05-14 02:00:38 +00:00
David E. O'Brien 80720da0c9 Virgin import of Xircom PCCARD driver v1.18
v1.18 (1999/04/08) adds support for CEM56 and REM56 multifunction cards.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:00:38 +00:00
David E. O'Brien 2eb387a8da Virgin import of Xircom PCCARD driver v1.18
v1.18 (1999/04/08) adds support for CEM56 and REM56 multifunction cards.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 02:00:38 +00:00
David E. O'Brien e3ae23a924 Virgin import of Xircom PCCARD driver v1.17
v1.17 (1999/03/28) has xperimental fixes to 10Mbit autonegotiation and
CE2 input lockup.

KNOWN BUGS
==========

* Media auto-negotiation is definitely not right.  It will work in most
  circumstances and seems to connect OK to most 100Mbit networks, however some
  pathological combinations of hubs/networks/peers seem to confuse it.

* CE2 support is somewhat flakey (ranging from 'works perfectly' to 'hangs the
  machine' so far).  I've fixed the probe routine and a potential lockup in
  the output routine, but a lot of people still report that they can't receive
  or transmit.

* You won't be able to use the modem and Ethenet parts of a multifunction card
  simultaneously.  This is limitation the current FreeBSD PCMCIA support.
  Likewise, there is no support for CardBus devices.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:58:59 +00:00
David E. O'Brien 645cdc12f0 This commit was generated by cvs2svn to compensate for changes in r47145,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:58:59 +00:00
David E. O'Brien d73bc63ef2 Virgin import of Xircom PCCARD driver v1.17
v1.17 (1999/03/28) has xperimental fixes to 10Mbit autonegotiation and
CE2 input lockup.

KNOWN BUGS
==========

* Media auto-negotiation is definitely not right.  It will work in most
  circumstances and seems to connect OK to most 100Mbit networks, however some
  pathological combinations of hubs/networks/peers seem to confuse it.

* CE2 support is somewhat flakey (ranging from 'works perfectly' to 'hangs the
  machine' so far).  I've fixed the probe routine and a potential lockup in
  the output routine, but a lot of people still report that they can't receive
  or transmit.

* You won't be able to use the modem and Ethenet parts of a multifunction card
  simultaneously.  This is limitation the current FreeBSD PCMCIA support.
  Likewise, there is no support for CardBus devices.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:58:59 +00:00
David E. O'Brien bd49f2f01b Virgin import of Xircom PCCARD driver v1.16.
v1.16 (1999/03/08) fixed BPF input hang and infinite loop on CE2
short-packet output.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:53:32 +00:00
David E. O'Brien 26ac8ac24c This commit was generated by cvs2svn to compensate for changes in r47142,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:53:32 +00:00
David E. O'Brien d1e35075a3 Virgin import of Xircom PCCARD driver v1.16.
v1.16 (1999/03/08) fixed BPF input hang and infinite loop on CE2
short-packet output.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:53:32 +00:00
David E. O'Brien f69b347623 Virgin import of Xircom PCCARD driver v1.15
v1.15 fixed driver registration bug under 3.1-STABLE.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:52:10 +00:00
David E. O'Brien 5941adb59f This commit was generated by cvs2svn to compensate for changes in r47139,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:52:10 +00:00
David E. O'Brien c5dce5e86a Virgin import of Xircom PCCARD driver v1.15
v1.15 fixed driver registration bug under 3.1-STABLE.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:52:10 +00:00
David E. O'Brien 99872c353c Virgin import of Xircom PCCARD driver v1.14
This driver is mostly based on the `xirc2ps' driver for Linux by Werner
Koch.  Werner has even allowed his code to be distributed under a BSD licence,
making our life considerably easier -- thanks Werner!

This driver supports:
* Intel EtherExpress(TM) PRO/100 PCCARD (16-bit version)
* Xircom CreditCard CE2 / CEM28 / CEM33 / CE3 / CEM56 Ethernet adapters.
* Toshiba Advanced Network 10/100 PCCARD
* Certain Compaq Netelligent 10/100 branded cards

v1.14 has major changes to media selection code, and bugfixes in the
probe routine.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:50:10 +00:00
David E. O'Brien eaa12ef4a0 This commit was generated by cvs2svn to compensate for changes in r47136,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:50:10 +00:00
David E. O'Brien 76ccae01ea Virgin import of Xircom PCCARD driver v1.14
This driver is mostly based on the `xirc2ps' driver for Linux by Werner
Koch.  Werner has even allowed his code to be distributed under a BSD licence,
making our life considerably easier -- thanks Werner!

This driver supports:
* Intel EtherExpress(TM) PRO/100 PCCARD (16-bit version)
* Xircom CreditCard CE2 / CEM28 / CEM33 / CE3 / CEM56 Ethernet adapters.
* Toshiba Advanced Network 10/100 PCCARD
* Certain Compaq Netelligent 10/100 branded cards

v1.14 has major changes to media selection code, and bugfixes in the
probe routine.

Developed by:	Scott Mitchell <scott@uk.freebsd.org>
Obtained from:	http://www.freebsd-uk.eu.org/~scott/xe_drv/
1999-05-14 01:50:10 +00:00
David E. O'Brien 32597e9335 Virgin import of Xircom PCCARD driver v1.13 1999-05-14 01:41:26 +00:00
David E. O'Brien 5c9e751be1 This commit was generated by cvs2svn to compensate for changes in r47133,
which included commits to RCS files with non-trunk default branches.
1999-05-14 01:41:26 +00:00
David E. O'Brien bb48bdb20d Virgin import of Xircom PCCARD driver v1.13 1999-05-14 01:41:26 +00:00
Kirk McKusick eaea7a9e9f Previously directories were sync'ed every 10 seconds while bitmaps &
inodes were synced every 15 seconds. This is now reversed as during
directory create, we cannot commit the directory entry until its
inode has been written. With this switch, the inodes will be more
likely to be written by the time that the directory is written thus
reducing the number of directory rollbacks that are needed.
1999-05-14 01:29:21 +00:00
Kirk McKusick c2606ec5c6 Add a hook to ffs_fsync to allow soft updates to get first chance at doing
a sync on the block device for the filesystem. That allows it to push the
bitmap blocks before the inode blocks which greatly reduces the number of
inode rollbacks that need to be done.
1999-05-14 01:26:46 +00:00
Mike Smith efa2e2d658 Include <sys/systm.h> earlier as required by include changes. 1999-05-14 00:41:02 +00:00
Bill Paul fb212aff15 Remove unneeded line of code that got left behind when I converted this
driver to use bus_space_read_foo()/bus_space_write_foo(). The line is not
visible unless you compile the driver to use PCI memory mapped mode, which
not done by default, but it should be fixed anyway.
1999-05-13 20:36:00 +00:00
Brian Somers 897e65b9ff Better English. 1999-05-13 14:53:13 +00:00
Bruce Evans c3ba51a722 Removed an especially bogus cast. 1999-05-13 13:01:46 +00:00
Bruce Evans ebb4a31711 Casting handles from void * to uintptr_t on the way to dev_t became
especially bogus when dev_t became a pointer.
1999-05-13 12:55:37 +00:00
Bruce Evans c151de316a Fixed 10 out of 40 lines of -Wcast-qual warnings/errors. 3 lines were
for old confusion of `volatile char *' with `volatile caddr_t'.  7 lines
were for not being careful about aligning pointers to volatiles.
1999-05-13 12:21:41 +00:00
Poul-Henning Kamp 2c7723a7c9 Vinum doesn't compile right now. 1999-05-13 09:43:29 +00:00
Bruce Evans 7d9509f96c Added ../sys/syscall.mk to targets. Back it up like all the other
targets.
1999-05-13 09:19:14 +00:00
Bruce Evans 853cbeeb35 Regenerated. 1999-05-13 09:12:57 +00:00
Bruce Evans f664346fbe Fixed nonsense arg type `const caddr_t' in the prototype() for utrace().
Changed to `const void *'.  utrace() is undocumented, so nothing should
notice.

Fixed missing consts for utrace() and ktrace() in syscalls.master.

sys/ktrace.h is missing some Lite2 changes of shorts to ints.
1999-05-13 09:09:37 +00:00
Bruce Evans a8481cfc72 memcmp -> bcmp. memcmp doesn't exist in the kernel, but unfortunately
it exists as a gcc builtin provided the kernel is not compiled with
-O0 or -fno-builtin.
1999-05-13 07:54:24 +00:00
Bruce Evans 4daefb91bf Renamed the private copies of strlen and strcpy to gdb_strlen and
gdb_strcpy, respectively.  This saves fixing the wrong return type
of the private strlen and makes the addresses of strlen and strcpy
unambiguous.
1999-05-13 07:34:25 +00:00
Bruce Evans 22b6b1cd1e Fixed printing of a dev_t in a panic message. Fixed the function name
in this message.
1999-05-13 06:27:51 +00:00
Bruce Evans 07f6cad7a0 Restored used include of <sys/systm.h>. -Wmissing-prototypes doesn't work
for builtin functions.
1999-05-13 06:07:44 +00:00
Jordan K. Hubbard 0dfcd4a9c4 I'm told by the PR author that this page_size increment was in
the wrong place; back it out.
1999-05-13 05:24:53 +00:00
Luoqi Chen 7a73ea0414 Device pager's handle is dev_t not udev_t. 1999-05-13 04:02:07 +00:00
Peter Wemm a89c3bd3dc dev is a pointer, printf it as such 1999-05-12 22:33:08 +00:00
Peter Wemm 51b5226683 Try and fix a dev_t/major/minor etc nit. 1999-05-12 22:32:07 +00:00
Peter Wemm ccb84588dd Try an fix a couple of dev_t/major/minor etc nits. 1999-05-12 22:30:50 +00:00
Luoqi Chen 0f0fe5a4c5 Unbreak VESA on SMP. 1999-05-12 21:39:07 +00:00
Luoqi Chen 2ee16532b6 VM86_FRAMESIZE is now the size of vm86 frame, not the number of 4-byte words.
Requested by:	Bruce
1999-05-12 21:30:51 +00:00
Peter Wemm cc5881cff5 Fix (?) SPECHASH dev_t/major/minor/etc args 1999-05-12 19:06:40 +00:00
Peter Wemm c7b52b866e Fix dev_t/minor problems 1999-05-12 19:01:30 +00:00
Matt Jacob 83ae4407f5 When asked to get the current transfer settings go do a dev_refresh
isp_update call to get a better chance at seeing whether a recent
settings change has latched up.
1999-05-12 19:00:16 +00:00
Matt Jacob 442257d9c5 be a bit more chatty about some speed negotiations 1999-05-12 18:56:55 +00:00
Poul-Henning Kamp e519e78b42 braino. 1999-05-12 13:06:34 +00:00
Bruce Evans ce45b512b3 Fixed corruption of the kmemstatistcs list. The first malloc()
with malloc type at the tail of the list changed the list from
linear to circular.  This seemed to cause surprisingly few problems,
but it now causes weird output from `vmstat -m', probably because
a more important malloc type is now at the tail of the list.

Fix it by abusing ks_limit instead of ks_next as a flag for being
on the list.  Don't forget to clear the flag when a malloc type is
uninit'ed.  Uninit'ing is still fundamentally broken -- it loses
history.
1999-05-12 11:11:27 +00:00
Poul-Henning Kamp adfea48f2b Produce compiler warning if dev_t and udev_t is confused. 1999-05-12 11:06:56 +00:00
Poul-Henning Kamp 8bee45c44e Don't peek into dev_t 1999-05-12 11:06:07 +00:00
Poul-Henning Kamp c32e6392b5 Fix a udev_t/dev_t mismatch which prevent paging from working. 1999-05-12 11:05:23 +00:00
Semen Ustimenko 3c9bb8b7ff Driver is now ported to NetBSD.
Submitted by:	Christos Zoulas <christos@zoulas.com>
1999-05-12 09:43:09 +00:00
KATO Takenori 91f9d6d376 Sync with sys/i386/isa/diskslice_machdep.c revision 1.34. 1999-05-12 08:33:22 +00:00
Poul-Henning Kamp 63bc2b64ea $ brucify sys/stat.h
_devt should be __dev_t
$
1999-05-12 07:55:42 +00:00
Poul-Henning Kamp 7238b09623 #define udev_t dev_t in userland, so that programs which peek at
vnodes and stuff compile.  They may still not work however.
1999-05-12 07:41:49 +00:00
Poul-Henning Kamp 02342b0cfe Fix dumpon. It passes a udev_t from userland to kernel, that needs a
udev2dev() before we use it.

It really should pass a name like swapon does.
1999-05-12 07:40:50 +00:00
Bruce Evans 5264b48a6e Updated a comment (Crtat is no longer bogusly shared with syscons).
Don't declare a nonexistent variable.
1999-05-12 04:59:27 +00:00
Bruce Evans 4a79c0bea3 Removed global variable `Crtat'. This was once (bogusly) shared with
pcvt, but it had rotted into unuse here, and of course its type had
become inconsisent with its type in pcvt.

Fixed some minor style bugs.
1999-05-12 04:45:56 +00:00
Poul-Henning Kamp bfbb9ce670 Divorce "dev_t" from the "major|minor" bitmap, which is now called
udev_t in the kernel but still called dev_t in userland.

Provide functions to manipulate both types:
        major()         umajor()
        minor()         uminor()
        makedev()       umakedev()
        dev2udev()      udev2dev()

For now they're functions, they will become in-line functions
after one of the next two steps in this process.

Return major/minor/makedev to macro-hood for userland.

Register a name in cdevsw[] for the "filedescriptor" driver.

In the kernel the udev_t appears in places where we have the
major/minor number combination, (ie: a potential device: we
may not have the driver nor the device), like in inodes, vattr,
cdevsw registration and so on, whereas the dev_t appears where
we carry around a reference to a actual device.

In the future the cdevsw and the aliased-from vnode will be hung
directly from the dev_t, along with up to two softc pointers for
the device driver and a few houskeeping bits.  This will essentially
replace the current "alias" check code (same buck, bigger bang).

A little stunt has been provided to try to catch places where the
wrong type is being used (dev_t vs udev_t), if you see something
not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if
it makes a difference.  If it does, please try to track it down
(many hands make light work) or at least try to reproduce it
as simply as possible, and describe how to do that.

Without DEVT_FASCIST I belive this patch is a no-op.

Stylistic/posixoid comments about the userland view of the <sys/*.h>
files welcome now, from userland they now contain the end result.

Next planned step: make all dev_t's refer to the same devsw[] which
means convert BLK's to CHR's at the perimeter of the vnodes and
other places where they enter the game (bootdev, mknod, sysctl).
1999-05-11 19:55:07 +00:00