Commit graph

25812 commits

Author SHA1 Message Date
Poul-Henning Kamp 3344c5a17e Create a general facility for making dev_t's depend on another
dev_t.  The dev_depends(dev_t, dev_t) function is for tying them
to each other.

When destroy_dev() is called on a dev_t, all dev_t's depending
on it will also be destroyed (depth first order).

Rewrite the make_dev_alias() to use this dependency facility.

kern/subr_disk.c:
Make the disk mini-layer use dependencies to make sure all
relevant dev_t's are removed when the disk disappears.

Make the disk mini-layer precreate some magic sub devices
which the disk/slice/label code expects to be there.

kern/subr_disklabel.c:
Remove some now unneeded variables.

kern/subr_diskmbr.c:
Remove some ancient, commented out code.

kern/subr_diskslice.c:
Minor cleanup.  Use name from dev_t instead of dsname()
2001-05-26 08:27:58 +00:00
Jordan K. Hubbard caff01c276 Remove pcm hints here now that it's gone from GENERIC.
Reminded-by:	bde
2001-05-26 08:04:34 +00:00
Doug Barton ffd41c9876 Update reality in the strings comment 2001-05-26 06:01:43 +00:00
Andrew Gallatin 9c201d7ba1 catch up to i386: Don't acquire Giant just to print the trap and panic 2001-05-25 21:03:40 +00:00
Andrew Gallatin 9a6832a398 make this compile. 2001-05-25 20:56:28 +00:00
Matt Jacob fe95b46491 track the One True Architecture (i386) 2001-05-25 20:33:06 +00:00
Warner Losh e0e5247337 Fix a minor formatting nit 2001-05-25 19:24:58 +00:00
John Baldwin 9d127f9ffb Add vm locking to sendfile(2) and sf_buf_free().
Reported by:	Tamiji Homma <thomma@BayNetworks.com>
Tested by:	Tamiji Homma <thomma@BayNetworks.com>
2001-05-25 19:23:04 +00:00
Warner Losh ee327e92e1 Move to using the common device list.
Move to table driven probing of these devices since we have such a long list.
2001-05-25 19:22:36 +00:00
Warner Losh db0d08ca8f Separate out pci cardbus bridge definitions to a common file for use
by both OLDCARD and NEWCARD.

# didn't make the tables the same because oldcard supports more devices than
# newcard and newcard's 16-bit stuff needs some work.
2001-05-25 19:12:58 +00:00
David E. O'Brien 3355915e54 JHB would prefer the KTR examples not be in here. 2001-05-25 18:49:08 +00:00
Warner Losh 995823e999 Migrate from unit based to dev base. Don't save unit number, but do save
dev.  Convert all uses of unit to dev as appropriate.  Minor comment fixes
to pcic_softc definition.
2001-05-25 18:28:49 +00:00
Thomas Moestl 3c436f07b7 Add a check to determine whether extended attributes have been
initialized on the file system before trying to grab the lock of the
per-mount extattr structure, as this lock is unitialized in that case.
This is needed because ufs_extattr_vnode_inactive is called from
ufs_inactive, which is also used by EA-unaware file systems such as
ext2fs.

Reviewed by:	rwatson
2001-05-25 18:24:52 +00:00
Warner Losh acf5760400 Update copyright info 2001-05-25 18:03:07 +00:00
Jordan K. Hubbard 62d1937cec Take pcm (audio) back out of GENERIC; there appears to be some
concensus, most notably among the maintainers, that it's better
loaded as a module.

Finally-pushed-over-the-edge-by-the-anguished-cries-of:	rwatson
2001-05-25 17:55:39 +00:00
Robert Watson b1fc0ec1a7 o Merge contents of struct pcred into struct ucred. Specifically, add the
real uid, saved uid, real gid, and saved gid to ucred, as well as the
  pcred->pc_uidinfo, which was associated with the real uid, only rename
  it to cr_ruidinfo so as not to conflict with cr_uidinfo, which
  corresponds to the effective uid.
o Remove p_cred from struct proc; add p_ucred to struct proc, replacing
  original macro that pointed.
  p->p_ucred to p->p_cred->pc_ucred.
o Universally update code so that it makes use of ucred instead of pcred,
  p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo,
  cr_{r,sv}{u,g}id instead of p_*, etc.
o Remove pcred0 and its initialization from init_main.c; initialize
  cr_ruidinfo there.
o Restruction many credential modification chunks to always crdup while
  we figure out locking and optimizations; generally speaking, this
  means moving to a structure like this:
        newcred = crdup(oldcred);
        ...
        p->p_ucred = newcred;
        crfree(oldcred);
  It's not race-free, but better than nothing.  There are also races
  in sys_process.c, all inter-process authorization, fork, exec, and
  exit.
o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid;
  remove comments indicating that the old arrangement was a problem.
o Restructure exec1() a little to use newcred/oldcred arrangement, and
  use improved uid management primitives.
o Clean up exit1() so as to do less work in credential cleanup due to
  pcred removal.
o Clean up fork1() so as to do less work in credential cleanup and
  allocation.
o Clean up ktrcanset() to take into account changes, and move to using
  suser_xxx() instead of performing a direct uid==0 comparision.
o Improve commenting in various kern_prot.c credential modification
  calls to better document current behavior.  In a couple of places,
  current behavior is a little questionable and we need to check
  POSIX.1 to make sure it's "right".  More commenting work still
  remains to be done.
o Update credential management calls, such as crfree(), to take into
  account new ruidinfo reference.
o Modify or add the following uid and gid helper routines:
      change_euid()
      change_egid()
      change_ruid()
      change_rgid()
      change_svuid()
      change_svgid()
  In each case, the call now acts on a credential not a process, and as
  such no longer requires more complicated process locking/etc.  They
  now assume the caller will do any necessary allocation of an
  exclusive credential reference.  Each is commented to document its
  reference requirements.
o CANSIGIO() is simplified to require only credentials, not processes
  and pcreds.
o Remove lots of (p_pcred==NULL) checks.
o Add an XXX to authorization code in nfs_lock.c, since it's
  questionable, and needs to be considered carefully.
o Simplify posix4 authorization code to require only credentials, not
  processes and pcreds.  Note that this authorization, as well as
  CANSIGIO(), needs to be updated to use the p_cansignal() and
  p_cansched() centralized authorization routines, as they currently
  do not take into account some desirable restrictions that are handled
  by the centralized routines, as well as being inconsistent with other
  similar authorization instances.
o Update libkvm to take these changes into account.

Obtained from:	TrustedBSD Project
Reviewed by:	green, bde, jhb, freebsd-arch, freebsd-audit
2001-05-25 16:59:11 +00:00
Scott Long 7edce08ac4 Fix DMA on machines with more than 128MB.
Obtained from:	cg
MFC after:	5 days
2001-05-25 16:05:22 +00:00
Poul-Henning Kamp d951f85b28 Make if_tun's clone create SI_CHEAPCLONE devices. 2001-05-25 13:32:53 +00:00
Poul-Henning Kamp 5696db457d Make the PTY drivers cloning algorithm create "CHEAPCLONE" dev_t,
so that some twit cannot allocate all 256 PTY's with "ls -l".
2001-05-25 13:23:42 +00:00
David E. O'Brien 0ec59619a5 + Turn on SMP support by default (yes an Alpha SMP kernel works on
uniprocessor systems, aren't Alpha's neat :-))
+ Add example KTR (debugging) options.
2001-05-25 10:36:46 +00:00
Poul-Henning Kamp 48c35f87be Don't lie to diskerr() now that it listens to us. 2001-05-25 09:07:23 +00:00
Poul-Henning Kamp 2613d3fec9 Use the name given to the dev_t, rather than creating our own.
This makes it possible to give sensible information for /dev/fd.720
and similar "special" devices.
2001-05-25 09:06:52 +00:00
Hellmuth Michaelis 6b244dc54b Submitted by: Juha-Matti Liukkonen (Cubical Solutions Ltd) (jml@cubical.fi)
Add a CAPI (hardware independent) driver i4bcapi(4) and hardware driver
iavc (4) to support active CAPI-based BRI and PRI cards (currently AVM
B1 and T1 cards) to isdn4bsd.
2001-05-25 08:43:30 +00:00
Ruslan Ermilov 1166fb516b - sys/msdosfs moved to sys/fs/msdosfs
- msdos.ko renamed to msdosfs.ko
- /usr/include/msdosfs moved to /usr/include/fs/msdosfs
2001-05-25 08:14:14 +00:00
Warner Losh f7d83eb183 Add intrack field to each slot. This can be used to acknowledge
interrupts on other buses.  Right now it isn't used, but will be for
the pci attachment.

# Add copyright by me for this year since I've changed so much.
2001-05-25 05:25:43 +00:00
Warner Losh 5da1cb2e2f Minor name space issues. 2001-05-25 05:22:00 +00:00
Poul-Henning Kamp 25e0288d07 Don't rely on cdevsw_add() when we hack about with dev_t's. 2001-05-24 20:28:06 +00:00
Poul-Henning Kamp 8576c652b4 Don't take the detour around devsw() to find out if the proto-cdevsw
is already initialized.
2001-05-24 20:27:16 +00:00
Bruce Evans 03c0300c01 Oops. Unremove vestiges of the old, broken sound drivers. They are now
used in new drivers.
2001-05-24 18:19:00 +00:00
Alfred Perlstein 0cea693084 whitespace/style 2001-05-24 18:06:22 +00:00
John Baldwin 190609dd48 Stick VM syscalls back under Giant if the BLEED option is not defined. 2001-05-24 18:04:29 +00:00
John Baldwin ba83773edc Add a new kernel option 'BLEED' to be used for code that is still under
development but is being developed in the tree for whatever reason.

Not objected to by:     peter, jlemon
2001-05-24 17:01:51 +00:00
Bruce Evans dd015692a7 Remove vestiges of the old, broken sound drivers. 2001-05-24 16:52:13 +00:00
Ruslan Ermilov c7b23e0fb4 Actually rename FDESC, PORTAL, UMAP and UNION file systems.
OK'ed by:	bp
2001-05-24 15:20:11 +00:00
Ruslan Ermilov c99d12581a mount_umap(8) -> mount_umapfs(8). 2001-05-24 13:20:41 +00:00
Ruslan Ermilov 57a523ae6b mount_null(8) -> mount_nullfs(8). 2001-05-24 13:17:47 +00:00
Yoshihiro Takahashi d8b08f1591 (Re-)enabled boot2. 2001-05-24 11:19:43 +00:00
Yoshihiro Takahashi f040ac4cec Update boot[12] program to compile ELF binary.
Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp> and
		kawanobe@st.rim.or.jp (Kawanobe Koh)
2001-05-24 11:18:32 +00:00
Poul-Henning Kamp 9d9bdb3dc5 Restrict even further what parts of <sys/conf.h> can be seen from
userland.
2001-05-24 09:33:08 +00:00
David E. O'Brien 5864b79cd2 Make the rcsid and FreeBSD IDs more sane in the wcs* and wmem* files.
Do the same for the non-wcs*/wmem* files while I'm here.
2001-05-24 08:47:42 +00:00
Matthew Dillon ac8f990bde This patch implements O_DIRECT about 80% of the way. It takes a patchset
Tor created a while ago, removes the raw I/O piece (that has cache coherency
problems), and adds a buffer cache / VM freeing piece.

Essentially this patch causes O_DIRECT I/O to not be left in the cache, but
does not prevent it from going through the cache, hence the 80%.  For
the last 20% we need a method by which the I/O can be issued directly to
buffer supplied by the user process and bypass the buffer cache entirely,
but still maintain cache coherency.

I also have the code working under -stable but the changes made to sys/file.h
may not be MFCable, so an MFC is not on the table yet.

Submitted by:	tegge, dillon
2001-05-24 07:22:27 +00:00
Warner Losh 8cad38176d Use bus_space functions rather than inb/outb.
Add defines for PCIC_INDEX and PCIC_DATA offsets.
Change PCIC_INDEX_0 to PCIC_PORT_0
Add define for PCIC_NPORT.
Document why the vadem probe works.
2001-05-24 06:54:48 +00:00
Peter Wemm a4b82094bc Produce a config-time warning about EXT2FS and GPL_MATH_EMULATE 2001-05-24 06:26:18 +00:00
Peter Wemm 6aa0a2e57a Remove DEV_SNP -> opt_snp.h
Forgotten by:  dd
2001-05-24 06:24:06 +00:00
Warner Losh 4d5a4ec15f Do what we should have done a long time ago:
o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_PCMCIA and
  programming interface is 0, assume that it is a generic PCMCIA PCI
  chip we can program.  I don't think there are any of these that
  we don't know about, but you never know.
o If the class is PCIC_BRIDGE, subclass is PCIS_BRIDGE_CARDBUS and
  programming interface is 0, assume that it is a YENTA cardbus bridge
  that we know how to cope with.  There are likely some cardbus bridges
  that haven't it made it in here yet.
2001-05-24 04:24:22 +00:00
Warner Losh 99efcc2bb9 Move getb1 and putb1 from pcic_isa.c to pcic.c. Rename them to
pcic_{get,put}b_io.  There are some pci bridges (the CL-PD6729 and
maybe others) that do not have memory mapped registers, so we'll need
these in both places.  Declare them in pcicvar.h.
2001-05-24 04:03:28 +00:00
Dima Dorfman 2f799208a5 Add snp_olddisc member to struct snoop; the linedisc'ized snp(4) uses this.
Pointy hat to:	dd
2001-05-24 00:43:44 +00:00
Dima Dorfman 028f979d1d Correct style bugs with regards to long lines and comments.
Reviewed by:	bde
2001-05-23 23:38:05 +00:00
Dima Dorfman 636b9e70d2 Build snp(4) as a module. 2001-05-23 23:33:08 +00:00
Greg Lehey 7b4bf18baa Change #if VINUMDEBUG to #ifdef VINUMDEBUG. This is a flag, not a variable. 2001-05-23 23:24:05 +00:00