Commit Graph

2948 Commits

Author SHA1 Message Date
John Baldwin
dd267672cd First round at trying to split up NOTES into MI and MD portions.
Unfortunately, this level doesn't really provide enough granularity.  We
probably need several MI NOTES type files for things that are shared by
several architectures but not by all.  For example, the PCI options could
live in a NOTES.pci.

This also updates the Makefile for i386 to generate LINT.  The only changes
in the generated LINT are the order of various options.

Suggestions for improvement welcome.
2002-04-03 18:09:17 +00:00
Ruslan Ermilov
12c79eb288 Dike out a highly insecure UCONSOLE option.
TIOCCONS must be able to VOP_ACCESS() /dev/console to succeed.

Obtained from:	OpenBSD
2002-04-03 10:56:59 +00:00
Marcel Moolenaar
561419e427 Actually have ia64dump.c be included in the build. Can't be bad. 2002-04-03 04:42:14 +00:00
Warner Losh
1be58af16e Add if_wi_{pccard,pci}.c for pccard and pci bus front ends 2002-04-02 02:50:48 +00:00
Dag-Erling Smørgrav
6c35e80948 Mutex profiling code, conditional on the MUTEX_PROFILING option. Adds the
following sysctl variables:

  debug.mutex.prof.enable	    enable / disable profiling
  debug.mutex.prof.acquisitions	    number of mutex acquisitions recorded
  debug.mutex.prof.records	    number of acquisition points recorded
  debug.mutex.prof.maxrecords	    max number of acquisition points
  debug.mutex.prof.rejected	    number of rejections (due to full table)
  debug.mutex.prof.hashsize	    hash size
  debug.mutex.prof.collisions	    number of hash collisions
  debug.mutex.prof.stats	    profiling statistics

The code records four numbers for each acquisition point (identified by
source file name and line number): longest time held, total time held,
number of non-recursive acquisitions, average time held.  The measurements
are in clock cycles (as returned by get_cyclecount(9)); this may cause
measurements on some SMP systems to be unreliable.  This can probably be
worked around by replacing get_cyclecount(9) by some incarnation of
nanotime(9).

This work was derived from initial patches by eivind.
2002-04-02 00:01:49 +00:00
John Baldwin
0f8870a2b9 Remove references to KTR_EXTEND.
Pointy-hat to:	jake
2002-04-01 19:25:22 +00:00
Jake Burkholder
60a57b73ef ktr changes to improve performance and make writing a userland utility to
dump the trace buffer feasible.
- Remove KTR_EXTEND.  This changes the format of the trace entries when
  activated, making writing a userland tool which is not tied to a specific
  kernel configuration difficult.
- Use get_cyclecount() for timestamps.  nanotime() is much too heavy weight
  and requires recursion protection due to ktr traces occuring as a result
  of ktr traces.  KTR_VERBOSE may still require recursion protection, which
  is now conditional on it.
- Allow KTR_CPU to be overridden by MD code.  This is so that it is possible
  to trace early in startup before pcpu and/or curthread are setup.
- Add a version number for the ktr interface.  A userland tool can check this
  to detect mismatches.
- Use an array for the parameters to make decoding in userland easier.
- Add file and line recording to the non-extended traces now that the extended
  version is no more.

These changes will break gdb macros to decode the extended version of the
trace buffer which are floating around.  Users of these macros should either
use the show ktr command in ddb, or use the userland utility which can be run
on a core dump.

Approved by:	jhb
Tested on:	i386, sparc64
2002-04-01 05:35:26 +00:00
Poul-Henning Kamp
c971041e29 Add the i386dump.c dumpsys() source file. 2002-03-31 22:28:28 +00:00
Poul-Henning Kamp
38fd6d0169 A couple of bits survived Dans nukage of CV_DEBUG in favour of INVARIANTS,
take them out with tacticals.
2002-03-31 07:23:31 +00:00
Matthew N. Dodd
c2329af77a Don't nowerror for sys/dev/pdq/pdq.c 2002-03-30 17:41:23 +00:00
Dan Moschuk
e7876c0943 Nuke CV_DEBUG in favour of INVARIANTS.
Approved by: jhb
2002-03-30 03:52:52 +00:00
Poul-Henning Kamp
d93b7c5dcd Add preliminary PC98 class to GEOM.
I have not been able to find very much information about the PC98
extended partition layout so this is gleaned from the source in
our pc98 architecture.  Corrections and patched very welcome.

Sponsored by: DARPA and NAI Labs.
2002-03-28 21:38:38 +00:00
Matthew Dillon
d74ac6819b Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt
disablement assumptions in kern_fork.c by adding another API call,
cpu_critical_fork_exit().  Cleanup the td_savecrit field by moving it
from MI to MD.  Temporarily move cpu_critical*() from <arch>/include/cpufunc.h
to <arch>/<arch>/critical.c (stage-2 will clean this up).

Implement interrupt deferral for i386 that allows interrupts to remain
enabled inside critical sections.  This also fixes an IPI interlock bug,
and requires uses of icu_lock to be enclosed in a true interrupt disablement.

This is the stage-1 commit.  Stage-2 will occur after stage-1 has stabilized,
and will move cpu_critical*() into its own header file(s) + other things.
This commit may break non-i386 architectures in trivial ways.  This should
be temporary.

Reviewed by:	core
Approved by:	core
2002-03-27 05:39:23 +00:00
Poul-Henning Kamp
106d501706 Uncomment GEOM in LINT 2002-03-26 19:39:32 +00:00
David E. O'Brien
5a70178aa9 Only use POSIX Awk features. 2002-03-25 20:32:24 +00:00
Yoshihiro Takahashi
2a2c967152 MFi386: revision 1.396 2002-03-25 13:03:14 +00:00
Thomas Moestl
b43f32bc3a Add kern/syscalls.c, which is needed for some KTR traces in trap.c. 2002-03-25 05:01:05 +00:00
David E. O'Brien
255fc25ad4 Remove a FMT that was buried in here.
I have no idea why the original committer even used it (in its KERNFORMAT
spelling) as there is no a.out version.
2002-03-25 03:27:09 +00:00
David E. O'Brien
25a157bc6c Remove the setting of 'FMT'. We now do ELF by default, so only bother
to increase the lenght of the command line if needed.  The setting of FMT
also gets in the cross bootstrapping way for new platforms.
2002-03-24 17:45:46 +00:00
David E. O'Brien
22c44d95ec MFP4. This slipped into a IFC(MFC) by PHK, but it could still be useful
To commit it for real.
2002-03-24 17:42:06 +00:00
Poul-Henning Kamp
3773a65c0b Be more systematic about conversion of on-disk formats in a endian/width
agnostic way.

Collapse the MBR and MBREXT methods into one file and make them endian/width
agnostic.

Sponsored by:	DARPA & NAI Labs.
2002-03-24 11:21:41 +00:00
Nicolas Souchu
b708809fa5 Forgot viapm in the NOTES. Fixed. 2002-03-23 18:39:54 +00:00
Nicolas Souchu
c17d43407f Major rework of the iicbus/smbus framework:
- VIA chipset SMBus controllers added
	- alpm driver updated
	- Support for dynamic modules added
	- bktr FreeBSD smbus updated but not tested
	- cleanup
2002-03-23 15:49:15 +00:00
Benno Rice
bf76ba7826 Collect all functions for copying to and from userspace into the one file.
This allows me to reimplement [sf]u{byte,word} as separate functions and not
as calls to copy{in,out}.
2002-03-21 23:45:59 +00:00
Warner Losh
d82f87481f Minor cleanups to post.mk from bde. Mostly ordering 2002-03-20 19:18:42 +00:00
Peter Wemm
17694298c0 Use the FreeBSD cross tools instead of the linux ones. 2002-03-19 10:52:44 +00:00
Jeff Roberson
8355f576a9 This is the first part of the new kernel memory allocator. This replaces
malloc(9) and vm_zone with a slab like allocator.

Reviewed by:	arch@
2002-03-19 09:11:49 +00:00
Bruce Evans
a7ac916bc7 Backed out the part of the previous commit related to xargs. It just
broke things, since "name=value ... cmd ..." only works for simple
commands (not for pipelines).
2002-03-19 08:20:44 +00:00
Bruce Evans
09f2f5ad67 Removed env(1) commands. make(1) uses a real shell, and
"env name=value ... cmd ..." is just a pessimized way of doing
"name=value ... cmd ..." in real shells.  Set the environment
(without using env(1)) before starting xargs so that env(1)
is not needed in "xargs env name=value ... cmd ..."
2002-03-19 06:30:24 +00:00
Josef Karthauser
916e6e02e5 Add a USB comm driver.
Ported from NetBSD by:	akiyama
2002-03-18 18:23:42 +00:00
Ruslan Ermilov
bbb467cd9a lint the previous lint commit.
Reviewed by:	markm
2002-03-18 09:35:45 +00:00
Crist J. Clark
3b6c640c2a Spelling: s/guesst/guessed/ 2002-03-17 22:02:05 +00:00
Mark Murray
766f7d6e03 Allow "make lint" to mostly work. Our sources are very unclean WRT
lint, so this is turned off by default. Setting WANT_LINT will turn
on generation of lint libraries for /usr/libdata/lint/*.ln.

Reviewd by:	silence in -audit.
2002-03-17 10:05:57 +00:00
Poul-Henning Kamp
132f08d017 Teach GEOM about Sun disklabel formats.
The detection code in this method is written so that it should work on
all architectures which means that you can plug a Sun disk into a i386
now and access the partitions.

We still need an endian-agnostic ufs/ffs before this is really
interresting, but the main focus was to get sparc64 onto the GEOM
trail.
2002-03-15 21:44:08 +00:00
David E. O'Brien
a22d6431b2 Remove all the custom toolchain knob tweaking.
We are now using a native binutils, and you have to have CC=gcc in your
/etc/make.conf to compile userland anyway.
2002-03-15 08:21:41 +00:00
Jake Burkholder
76cf1369d7 Add a DEBUGGER_ON_POWERFAIL option. This makes the power button on ultra 10s
work like an NMI button.
2002-03-13 05:58:45 +00:00
Jake Burkholder
b8d4451640 Use the deo hosted toolchain by default. 2002-03-13 03:23:17 +00:00
Jeff Roberson
8de00f4a87 This patch adds the "LOCKSHARED" option to namei which causes it to only acquire shared locks on leafs.
The stat() and open() calls have been changed to make use of this new functionality.  Using shared locks in
these cases is sufficient and can significantly reduce their latency if IO is pending to these vnodes.  Also,
this reduces the number of exclusive locks that are floating around in the system, which helps reduce the
number of deadlocks that occur.

A new kernel option "LOOKUP_SHARED" has been added.  It defaults to off so this patch can be turned on for
testing, and should eventually go away once it is proven to be stable.  I have personally been running this
patch for over a year now, so it is believed to be fully stable.

Reviewed by:	jake, obrien
Approved by:	jake
2002-03-12 04:00:11 +00:00
Poul-Henning Kamp
7b03a440ee Add commented out GEOM line to NOTES 2002-03-11 08:27:23 +00:00
Poul-Henning Kamp
e8645018a0 Add GEOM to conf/files. 2002-03-11 08:24:12 +00:00
Poul-Henning Kamp
036d25994c Add the GEOM option. 2002-03-11 08:06:24 +00:00
Thomas Moestl
0c530eb321 Add a driver for the mem and kmem devices, based off the i386 version. 2002-03-09 22:33:16 +00:00
Luigi Rizzo
c445626ad3 Enable DEVICE_POLLING in LINT now that it is safe to compile it there. 2002-03-09 08:04:58 +00:00
Robert Watson
7ed3fd6d72 Note that several of the recently documented clock-related kernel options
are for debugging purposes only.

Suggested by:	bde
2002-03-08 18:59:05 +00:00
Robert Watson
552c7f1b18 Apply a bit more of the patch from conf/35674: document the various
clock options in more detail.

PR:	conf/35674
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-03-08 18:50:07 +00:00
Robert Watson
08d38d4560 Apply part of the patch from conf/35674 to move the PFIL_HOOKS option
to somewhere more useful, and improve documentation of it.

PR:	conf/35674
Submitted by:	Hiten Pandya <hiten@uk.FreeBSD.org>
2002-03-08 18:47:32 +00:00
Robert Watson
daaa73b51f Synchronize NOTES with -STABLE LINT with respects to the placement
and commenting of NETSMB, NETWMBCRYPTO, and SMBFS.  In NOTES, they
had all floated to the bottom of the file with the list of seemingly
random and unclassified kernel options.  This change moves them back
up to the network protocol and file system areas, and also documents
the dependencies.
2002-03-08 15:34:23 +00:00
Seigo Tanimura
5d0451a3ed Add sys/dev/ufm.c.
Forgotten by:	alfred
Spotted by:	LINT
2002-03-05 11:19:23 +00:00
Hajimu UMEMOTO
b5a8f767a6 - Speedup 3DES by using assembly code for i386.
- Sync des/blowfish to more recent openssl.

Obtained from:	KAME/NetBSD
MFC after:	2 weeks
2002-03-05 09:19:02 +00:00
Mitsuru IWASAKI
899ccf541a Add generalized power profile code.
This makes other power-management system (APM for now) to be able to
generate power profile change events (ie. AC-line status changes), and
other kernel components, not only the ACPI components, can be notified
the events.

 - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c
 - call power_profile_set_state() also from APM driver when AC-line
   status changes
 - add call-back function for Crusoe LongRun controlling on power
   profile changes for a example
2002-03-04 18:46:13 +00:00