Commit Graph

23427 Commits

Author SHA1 Message Date
John Baldwin
216af8221e Lock access to proc members.
Glanced over by:	marcel
2000-12-15 19:41:27 +00:00
Poul-Henning Kamp
48ecc0129d Add the musycc driver to NOTES.
This is a driver for the LanMedia/SBE LMC150x E1/T1 family of cards.

The driver currently support unframed E1 (2048kbit/s) and framed
E1 (nx64).

These cards will provision E1/T1 lines for about 1/4 the cost of
a cisco router...
2000-12-15 18:01:43 +00:00
Poul-Henning Kamp
f84ee0ff00 Don't clone impossible unit numbers for disks. 2000-12-15 17:55:24 +00:00
Poul-Henning Kamp
e0913a2c44 Enforce disk unit numbers upper limit in cloning. 2000-12-15 16:42:38 +00:00
Poul-Henning Kamp
e6c8667208 Make a #define for the highest legal disk unit (0x1ff) 2000-12-15 16:41:40 +00:00
Takanori Watanabe
874d21b468 Fix with debugging option.
Submitted by:	haro@tk.kubota.co.jp
2000-12-15 09:18:11 +00:00
John Baldwin
ea10b6b78e When p_ucred is passed to the venus daemon, first grab the proc lock to
protect the p_ucred pointer, obtain a seperate reference to the ucred,
release the lock, and then pass in the new ucred reference.
2000-12-15 00:12:30 +00:00
John Baldwin
ec244c5695 Locking change: lock p_cred with the proc mutex (c) instead of assuming
that it doesn't change after process creation.
2000-12-15 00:10:32 +00:00
John Baldwin
0ea11f3f52 Whitespace cleanups, and a few comment changes to get everything to fit
back in 80 columns again after the locking descriptions were added.

Submitted by:	bde
2000-12-15 00:09:31 +00:00
John Baldwin
de3622188a Add in MI implementations of the KTR trace buffer ddb commands. The
commands have also been slightly updated as follows:
- Use ktr_idx to find the newest entry rather than walking the buffer
  comparing timespecs.  Timespecs are not always unique after the change
  to use getnanotime(9).
- Add a new verbose setting.  When the verbose setting is on, then the
  timestamp is printed with each message.  If KTR_EXTEND is on, then the
  filename and line number are output as well.  By default this option is
  off.  It can be turned on with the 'v' modifier passed to the 'tbuf'
  and 'tall' commands.  For the 'tnext' command, the 'v' modifier toggles
  the verbose mode.
- Only display the cpu number for each message on SMP systems.
- Don't display anything for an empty entry that hasn't been used yet.
2000-12-15 00:01:20 +00:00
John Baldwin
5f38ca907c Remove the "machine dependent" KTR trace buffer ddb commands. The code was
exactly the same on all platforms.
2000-12-14 23:57:30 +00:00
Warner Losh
8261e44cef Generalize quirk for Sony Memory Sticks. Any device that starts with
MS will be treated as having this quirk.  In the event that we falsely
identify one that doesn't need it, no harm will be done.  Ken
suggested that we make this more generic since there may be more
needed in the future.

Reported by: TERAMOTO Masahiro <teramoto@comm.eng.osaka-u.ac.jp>
PR:	kern/23378
Reviewed by: ken
2000-12-14 22:08:13 +00:00
Ruslan Ermilov
c5f49c2585 mdoc(7) police: removed duplicate .Os call. 2000-12-14 12:48:07 +00:00
Takanori Watanabe
c07572e7ad Make Embedded Controller driver interrupt driven. 2000-12-14 12:43:22 +00:00
Seigo Tanimura
0a439034dc - Move ifs_init() so that it can initialize ifs_inode_hash_mtx.
- s/ffs_inode_hash_lock/ifs_inode_hash_lock/
2000-12-14 09:15:27 +00:00
Jake Burkholder
7d8e3aa013 Use _lapic+offset to access the local apic from assembly language
files, rather than the symbols in globals.s.  The offsets are
generated by genassym.
2000-12-14 04:16:16 +00:00
Warner Losh
ff93e72c08 Fix this based on Mike's moved pci code. We needed to delete the pci_m
from this module anyway, so I just did that.
2000-12-14 00:06:10 +00:00
Marcel Moolenaar
75a1da1e7a Fix include directories for crossbuilding.
aicasm is run on the build machine and therefore needs to be
compiled and linked against the headers and libraries (resp)
of the build machine. Since normally the default include
directories are search after any specified on the command
line, make sure we don't accidentally pick up machine
dependent headers from the kernel compile directory by
specifying /usr/include first.

This solves the (cross) build problem for ia64.

Approved by: gibbs
2000-12-13 23:15:12 +00:00
John Baldwin
562e4ffe86 - Add a new flag MTX_QUIET that can be passed to the various mtx_*
functions.  If this flag is set, then no KTR log messages are issued.
  This is useful for blocking excessive logging, such as with the internal
  mutex used by the witness code.
- Use MTX_QUIET on all of the mtx_enter/exit operations on the internal
  mutex used by the witness code.
- If we are in a panic, don't do witness checks in witness_enter(),
  witness_exit(), and witness_try_enter(), just return.
2000-12-13 21:53:42 +00:00
Warner Losh
492510de38 o Remove the COMPAT_OLDPCI option now that Mike removed it.
o Add pmtimer device
o Shorten scsi settle time to 1 second, since that's what I use and
  I'm tired of remerging it every time.
2000-12-13 21:52:44 +00:00
Dag-Erling Smørgrav
026527e5b8 Reconnect linprocfs. 2000-12-13 20:29:30 +00:00
Dag-Erling Smørgrav
6e66bfacfa Use kinfo_proc instead of eproc (which Kirk deep-sixed earlier this week)
Generate a version string that looks just like a real Linux one - almost :)

Use sbufs everywhere instead of sprintf(). Note that this is still imperfect,
as the code does not check whether the sbuf overflowed - but it'll still
work better than before, since if the sbuf overflows, the code now simply
copies out 0 bytes instead of causing a trap (or worse, corrupting kernel
structures)
2000-12-13 20:22:24 +00:00
Dag-Erling Smørgrav
315ab977dc Add dependency on linux, which is needed for proc/version. 2000-12-13 20:19:06 +00:00
Dag-Erling Smørgrav
137b8d7189 Add subr_sbuf.c. 2000-12-13 19:52:12 +00:00
Dag-Erling Smørgrav
60ec413038 String buffer API 2000-12-13 19:51:07 +00:00
John Baldwin
05f9877c15 If we fail to emulate a vm86 trap in kernel mode, then we use
vm86_trap() to return to the calling program directly.  vm86_trap()
doesn't return, thus it was never returning to trap() to release
Giant.  Thus, release Giant before calling vm86_trap().
2000-12-13 18:57:15 +00:00
Seigo Tanimura
5dfa801a91 Include vm/vm_zone.h prior to vm/swap_pager.h.
Noticed by:	Michael Harnois <mdharnois@home.com>
Submitted by:	assar
2000-12-13 17:36:03 +00:00
Robert Nordier
81578f4a33 Strip the .comment and .note sections when stripping. There's no
point in retaining this info, particularly under BTX.
2000-12-13 17:10:38 +00:00
Julian Elischer
e0752f9a73 I really hate it when part of a patch gets left out.
This was still sitting in my commit tree.
Luckily I always compare my before and after trees...
2000-12-13 15:42:37 +00:00
Noriaki Mitsunaga
2603f917b7 Move `#include <sys/devicestat.h>' into #ifdef/#endif to keep
comaptibility with NetBSD/pc98.
2000-12-13 13:35:46 +00:00
Seigo Tanimura
937c4dfa08 Do not race for the lock of an inode hash.
Reviewed by:	jhb
2000-12-13 10:04:01 +00:00
Seigo Tanimura
21cd6e6232 - If swap metadata does not fit into the KVM, reduce the number of
struct swblock entries by dividing the number of the entries by 2
until the swap metadata fits.

- Reject swapon(2) upon failure of swap_zone allocation.

This is just a temporary fix. Better solutions include:
(suggested by:	dillon)

o reserving swap in SWAP_META_PAGES chunks, and
o swapping the swblock structures themselves.

Reviewed by:	alfred, dillon
2000-12-13 10:01:00 +00:00
Jake Burkholder
6d43764a10 Introduce a new potientially cleaner interface for accessing per-cpu
variables from i386 assembly language.  The syntax is PCPU(member)
where member is the capitalized name of the per-cpu variable, without
the gd_ prefix.  Example: movl %eax,PCPU(CURPROC).  The capitalization
is due to using the offsets generated by genassym rather than the symbols
provided by linking with globals.o.  asmacros.h is the wrong place for
this but it seemed as good a place as any for now.  The old implementation
in asnames.h has not been removed because it is still used to de-mangle
the symbols used by the C variables for the UP case.
2000-12-13 09:23:53 +00:00
Matt Jacob
6cd8749dbf Add route interrupt method. 2000-12-13 09:07:16 +00:00
Jake Burkholder
1756a185cf Lock the allproc list.
Approved by:	DES
2000-12-13 09:05:45 +00:00
Kirk McKusick
1d733bbd10 Preventing runaway kernel soft updates memory, take three.
Previously, the syncer process was the only process in the
system that could process the soft updates background work
list. If enough other processes were adding requests to that
list, it would eventually grow without bound. Because some of
the work list requests require vnodes to be locked, it was
not generally safe to let random processes process the work
list while they already held vnodes locked. By adding a flag
to the work list queue processing function to indicate whether
the calling process could safely lock vnodes, it becomes possible
to co-opt other processes into helping out with the work list.
Now when the worklist gets too large, other processes can safely
help out by picking off those work requests that can be handled
without locking a vnode, leaving only the small number of
requests requiring a vnode lock for the syncer process. With
this change, it appears possible to keep even the nastiest
workloads under control.

Submitted by:	Paul Saab <ps@yahoo-inc.com>
2000-12-13 08:30:35 +00:00
David E. O'Brien
c81f693089 Sync with i386/GENERIC rev 1.294 removing "COMPAT_OLDPCI".
This fixed the broken kernel build on the Alpha.
2000-12-13 07:34:47 +00:00
Warner Losh
727928f866 Remove unnecessary includes found by phk's script. I've been building
these locally for ages.
2000-12-13 06:28:37 +00:00
Warner Losh
3a68d6087a Fix problem with ax88190 based cards trying to probe further after
matching the ax88190.
2000-12-13 06:27:23 +00:00
Warner Losh
b76f687a7e Remove unnecessary includes found by phk's script a long time ago. 2000-12-13 06:25:22 +00:00
Warner Losh
641d2fddd3 Add aic and ray modules. I've been building these for a while now on
i386.
2000-12-13 05:54:26 +00:00
Warner Losh
598364a003 Module for aic
Submitted by:	Michael Reifenberger
2000-12-13 05:50:02 +00:00
Warner Losh
b66fd62112 Add module dependencies on CAM module.
Submitted by:	Michael Reifenberger
2000-12-13 05:46:23 +00:00
Bosko Milekic
988cb8dfd9 Eliminate a race in MEXTFREE(). The reference counter decrement and test
was not atomic. We now make sure that we free the ext buf if the reference
count is about to reach 0 but also make sure that nobody else has done it
before us.

While I'm here, change refcnt to u_int (from long). This fixes a compiler
warning regarding use of atomic_cmpset_long on i386.

Submitted by: jasone
Reviewed by: jlemon, jake
2000-12-13 05:13:02 +00:00
Robert Watson
f6a99e61c5 o Tighten restrictions on use of /proc/pid/ctl and move access checks
in ctl to using centralized p_can() inter-process access control
  interface.

Reviewed by:	sef
2000-12-13 04:28:24 +00:00
Mike Smith
70b5f189c9 Remove a redundant prototype. 2000-12-13 04:22:04 +00:00
Mike Smith
3742d6ca91 Don't try to free the now-nonexistent hdrspec field. This one snuck by
me in the previous round of patches.  Oops.
2000-12-13 02:45:03 +00:00
Warner Losh
6763347475 Add isa support:
o write isa driver routines.
o factor detach routine in sn_detach.
2000-12-13 01:47:19 +00:00
Mike Smith
84c6b37d74 Updates to match changes elsewhere in the PCI subsystem:
- Remove redundant header-type-specific support in the cardbus pcibus
   clone.  The bridges don't need this anymore.
 - Use pcib_get_bus instead of the deprecated pci_get_secondarybus.
 - Implement read/write ivar support for the pccbb, and teach it how
   to report its secondary bus number.  Save the subsidiary bus number
   as well, although we don't use it yet.
2000-12-13 01:28:00 +00:00
Mike Smith
8983cfbf27 Next round of PCI subsystem updates:
- Break out the /dev/pci driver into a separate file.
 - Kill the COMPAT_OLDPCI support.
 - Make the EISA bridge attach a bit more like the old code; explicitly
   check for the existence of eisa0/isa0 and only attach if they don't
   already exist.  Only make one bus_generic_attach() pass over the
   bridge, once both busses are attached.  Note that the stupid Intel
   bridge's class is entirely unpredictable.
 - Add prototypes and re-layout the core PCI modules in line with
   current coding standards (not a major whitespace change, just moving
   the module data to the top of the file).
 - Remove redundant type-2 bridge support from the core PCI code; the
   PCI-CardBus code does this itself internally.  Remove the now
   entirely redundant header-class-specific support, as well as the
   secondary and subordinate bus number fields.  These are bridge
   attributes now.
 - Add support for PCI Extended Capabilities.
 - Add support for PCI Power Management.  The interface currently
   allows a driver to query and set the power state of a device.
 - Add helper functions to allow drivers to enable/disable busmastering
   and the decoding of I/O and memory ranges.
 - Use PCI_SLOTMAX and PCI_FUNCMAX rather than magic numbers in some
   places.
 - Make the PCI-PCI bridge code a little more paranoid about valid
   I/O and memory decodes.
 - Add some more PCI register definitions for the command and status
   registers.  Correct another bogus definition for type-1 bridges.
2000-12-13 01:25:11 +00:00