Commit Graph

24484 Commits

Author SHA1 Message Date
phk
f3b4fbe35f Use <sys/queue.h> macro API. 2001-02-04 12:37:48 +00:00
peter
7d1777f0a6 'device agp' was missing 2001-02-04 12:36:50 +00:00
peter
8139bd5e67 Remove some stray traces of KMODDEPS 2001-02-04 12:35:22 +00:00
phk
236808f33a Remove a DIAGNOSTIC check which belongs in <sys/queue.h> if anyplace at all. 2001-02-04 11:53:51 +00:00
phk
578f22b89e Warn if people include vn(4) in their config. 2001-02-04 11:47:16 +00:00
peter
e2c0e675c7 Pull the rug from under the 'LKM Compatability' macro - PSEUDO_SET().
There are two 3rd party code chunks using this still - the IPv6 stuff and
i4b.  Give them a private copy as an alternative to changing them too much.

XXX sys/kernel.h still has a #include <sys/module.h> in it.  I will be
taking this out shortly - this affects a number of drivers.
2001-02-04 11:46:17 +00:00
phk
7a682ee864 Remove the LABPC driver.
Doesn't work, no maintainer, more promising code exists elsewhere.
2001-02-04 11:18:15 +00:00
peter
e2336f24e7 Zap obsolete (died with LKM) EXPORT_SYMS variable 2001-02-04 10:52:25 +00:00
phk
576d0b4520 Use macro API to <sys/queue.h> 2001-02-04 10:34:45 +00:00
peter
a7f86be978 Zap some bad examples:
opt_foo.h:
	touch opt_foo.h
.. is unnecessary - kmod.mk does this for us.
2001-02-04 08:23:14 +00:00
peter
fe7d89e3f2 All the world is not an i386. Merge rev 1.438 of i386/i386/machdep.c.
Make buffer_map a system map.
2001-02-04 07:00:47 +00:00
dillon
c8a95a285d This commit represents work mainly submitted by Tor and slightly modified
by myself.  It solves a serious vm_map corruption problem that can occur
with the buffer cache when block sizes > 64K are used.  This code has been
heavily tested in -stable but only tested somewhat on -current.  An MFC
will occur in a few days.  My additions include the vm_map_simplify_entry()
and minor buffer cache boundry case fix.

Make the buffer cache use a system map for buffer cache KVM rather then a
normal map.

Ensure that VM objects are not allocated for system maps.  There were cases
where a buffer map could wind up with a backing VM object -- normally
harmless, but this could also result in the buffer cache blocking in places
where it assumes no blocking will occur, possibly resulting in corrupted
maps.

Fix a minor boundry case in the buffer cache size limit is reached that
could result in non-optimal code.

Add vm_map_simplify_entry() calls to prevent 'creeping proliferation'
of vm_map_entry's in the buffer cache's vm_map.  Previously only a simple
linear optimization was made.  (The buffer vm_map typically has only a
handful of vm_map_entry's.  This stabilizes it at that level permanently).

PR: 20609
Submitted by: (Tor Egge) tegge
2001-02-04 06:19:28 +00:00
peter
bb46130566 Grumble, I broke this file with a vi accident before commit. :-(
Submitted by: Christian Weisgerber <naddy@mips.inka.de>
2001-02-04 04:13:12 +00:00
iedowse
be2876f24f Extend the sanity checks in ufs_lookup to ensure that each directory
entry fits within its DIRBLKSIZ block. The surrounding code is
extremely fragile with respect to corruption of the directory entry
'd_reclen' field; if directory corruption occurs, it can blindly
scan forward beyond the end of the filesystem block. Usually this
results in a 'fault on nofault entry' panic.

Directory corruption is now much more likely to be detected, resulting
in a 'ufs_dirbad' panic. If the filesystem is read-only, it will
simply print a warning message, and skip the corrupted block.

Reviewed by:	mckusick
2001-02-04 01:52:11 +00:00
iedowse
e061532c92 Use the correct flags field when checking for a read-only filesystem
in ufs_dirbad(). The mnt_stat.f_flags field is only updated by the
syscalls *statfs and getfsstat, so mnt_flag should be used instead.

This only affects whether or not a panic is generated on detection of
certain types of directory corruption.

Reviewed by:	mckusick
2001-02-03 21:25:32 +00:00
julian
da7b413f65 Make the code act the same in the case of BRIDGE being defined, but not
turned on, and the case of it not being defined at all.
i.e. Disabling bridging re-enables some of the checks it disables.

Submitted by: "Rogier R. Mulhuijzen" <drwilco@drwilco.net>
2001-02-03 17:25:21 +00:00
phk
408a00d7df Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead of
<sys/queue.h> implementation details.

Created with:   /usr/sbin/sed
Reviewed with:  /sbin/md5
2001-02-03 16:29:10 +00:00
phk
2ef21ddcb9 Use <sys/queue.h> macro api rather than fondle its implementation detals.
Created with:	/usr/bin/sed
Reviewed by:	/sbin/md5
2001-02-03 11:46:35 +00:00
peter
73c13f2592 Conditionalize the alpha interrupt preemption for now to buy us some
time to sort out the quirks.  Add 'options PREEMPTION' to test it on
the Alpha.

Reviewed by: jhb
2001-02-03 03:26:39 +00:00
brian
f165bef79c o Allow non-root users to open /dev/tun* (remove suser()
in tunopen())
o Change the default device permissions to 0600 root:wheel
  (were uucp:dialer)
o Only let root (suser()) change the MTU

This makes it possible for an administrator to open up the
permissions on /dev/tun*, letting non-root programs service
a tun interface.  Co-operation is still required with a
priviledged program that will configure the interface side
of things.
2001-02-03 00:31:39 +00:00
phk
99d7a44ee7 At the point in time where most devices are created, we don't know what
time it is because boottime is not yet initialized.  Finagle the relevant
fields when we get the chance.
2001-02-02 22:54:41 +00:00
jlemon
8d293e58ce When turning off TCP_NOPUSH, call tcp_output to immediately flush
out any data pending in the buffer.

Submitted by: Tony Finch <dot@dotat.at>
2001-02-02 18:48:25 +00:00
phk
766147079e Only superuser can create symlinks.
Give symlinks mode 755 by default to avoid triggering alert eyes.
(the mode isn't use on symlinks)
2001-02-02 18:35:29 +00:00
cg
b3fc288e1c quieten the esscontrol device 2001-02-02 16:41:06 +00:00
dfr
fed402db9f * Move exception_return to exception.s which is a more logical home for it.
* Optimise the return path for syscalls so that they only restore a minimal
  set of registers instead of performing a full exception_return.

A new flag in the trapframe indicates that the frame only holds partial
state. When it is necessary to perform a full state restore (e.g. after an
execve or signal), the flag is cleared to force a full restore.
2001-02-02 10:20:30 +00:00
msmith
4ae46f1754 Patch the reintroduced (~0 << 32) == 1 bug with a cryptic but functional
version.  This should fix the read-before-write problem again.

Obtained from:	"Adam J. Richter" <adam@yggdrasil.com>
2001-02-02 08:31:50 +00:00
grog
e6bd7f7c6d Allocate lock table and mutex not only for parity plexes, but also for
striped plexes.  This prevents various panics introduced in the last
rewrite of the locking code.

Suffered by:   "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
2001-02-02 07:14:13 +00:00
brian
5dfebcc02e Pass the minor number rather than the unit number to make_dev()
from the clone handler.
2001-02-02 03:32:25 +00:00
brian
410082716c KASSERT that the minor number passed to make_dev() is valid. 2001-02-02 03:32:11 +00:00
tegge
880bcc58c6 Enable use of DHCP extensions.
Reviewed by:	Per Kristian Hove <Per.Hove@math.ntnu.no>
2001-02-02 02:35:40 +00:00
peter
4c9b874c28 Argh, I missed some #include "sio.h". I was looking primarily for NSIO
when I did my sweeps.

Submitted by: mjacob
2001-02-02 01:48:40 +00:00
luigi
44f7e947e3 MFS: bridge/ipfw/dummynet fixes 2001-02-02 00:19:25 +00:00
luigi
afaf9310f9 MFS: bridge/ipfw/dummynet fixes (bridge.c will be committed separately) 2001-02-02 00:18:00 +00:00
mjacob
e2f5e56cc5 Remove inclusion of now vanished sio.h. 2001-02-01 21:59:00 +00:00
mjacob
96e43ebf7b Guess that this is what Doug *intended* to commit.... 2001-02-01 21:58:34 +00:00
julian
036e49d456 Change the kernel internal ABI number as the HOOK structure has changed.
Forgotten by: me
2001-02-01 21:25:06 +00:00
julian
08e1d1e1c1 Clean up reference counting with relation to queued packets and the worklist,
and while I'm there, clean up the worklist insertion and removal.

Inspired by: Harti Brandt <brandt@fokus.gmd.de>
2001-02-01 20:51:23 +00:00
scottl
bc10e2d4b6 Driver for the ESS Maestro3 and Allegro sound chips. Note that due to the
amount of GPL'd firmware in the driver, it will only be built as a module.

Approved by:	cg
2001-02-01 20:29:16 +00:00
des
0b32553f89 Add atspeaker_load. 2001-02-01 16:41:58 +00:00
des
28843b8527 KLDify the "speaker" device (which calls itself atspeaker internally, and
is i386-specific, so name the module atspeaker rather than speaker).
2001-02-01 16:39:34 +00:00
ru
8a6f8b5fe4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
bde
d600162562 Unbreak test coverage of cy driver. 2001-02-01 09:57:59 +00:00
bde
959d9a9919 Converted to new-bus.
Reviewed by:	imp
2001-02-01 09:49:57 +00:00
bp
d645bfa158 Fix breakage caused by incomplete transition to IF_HANDOFF().
Remove unused variable.
2001-02-01 08:34:38 +00:00
jake
a9f4853a90 Implement preemptive scheduling of hardware interrupt threads.
- If possible, context switch to the thread directly in sched_ithd(),
  rather than triggering a delayed ast reschedule.

- Disable interrupts while restoring fpu state in the trap handler,
  in order to ensure that we are not preempted in the middle, which
  could cause migration to another cpu.

Reviewed by:	peter
Tested by:	peter (alpha)
2001-02-01 03:34:20 +00:00
scottl
19b5113b91 Update the module Makefile to reflect the state of things from the last
acpi-ca import.

Approved by:	msmith
2001-01-31 22:40:01 +00:00
julian
d9ff7e1523 Add the ability to declare ore-ride methods on a per-hook basis
for the rcvdata() and rcvmsg() methods.

Also bring the man page up to sync with my last commit. (and this one)
2001-01-31 20:46:00 +00:00
dfr
ba26212fc9 * Move exception_return to exception.s which is a more logical home for it.
* Optimise the return path for syscalls so that they only restore a minimal
  set of registers instead of performing a full exception_return.

A new flag in the trapframe indicates that the frame only holds partial
state. When it is necessary to perform a full state restore (e.g. after an
execve or signal), the flag is cleared to force a full restore.
2001-01-31 11:17:00 +00:00
peter
9b4aea27e5 Remove count for NSIO. The only places it was used it were incorrect.
(alpha-gdbstub.c got sync'ed up a bit with the i386 version)
2001-01-31 10:54:45 +00:00
msmith
55303e9ac4 Merge conflicts from the ACPI CA 20010125 import. 2001-01-31 09:44:45 +00:00
msmith
86f58a13be Add some debugging.
Turn off semaphores.  Nobody else implements them, and there is lots of
AML out there which does totally absurd things with them, meaning that
if we try to do the right thing we are guaranteed to fail.
2001-01-31 09:35:50 +00:00
msmith
3f669a5477 Add some debugging statements. 2001-01-31 09:34:54 +00:00
msmith
7cf337a22e Tidy up.
Don't print temperatures at attach time - they're usually wrong.

Use acpi_EvaluateInteger instead of doing things the hard way.
2001-01-31 09:33:51 +00:00
msmith
337745f7d0 Add some debugging.
Use acpi_EvaluateInteger where possible.

Use FuncName rather than &FuncName when passing function addresses.

Don't evaluate the _REG method when we attach to an address space -
AcpiInstallAddressSpaceHandler does it for us.
2001-01-31 09:32:44 +00:00
msmith
30a81dd2b2 ACPI_NUMBER becomes ACPI_INTEGER. acpi_EvaluateNumber becomes
acpi_EvaluateInteger.

Use acpi_EvaluateInteger instead of doing things the hard way where
possible.

AcpiSetSystemSleepState (unofficial) becomes AcpiEnterSleepState.

Use the AcpiGbl_FADT pointer rather than searching for the FADT.
2001-01-31 09:30:57 +00:00
msmith
cae1d97ec5 Remove obsoleted files.
Temporarily turn off the processor and apic drivers until we sort out
what these are going to do now.
2001-01-31 09:26:25 +00:00
msmith
7480ca9852 Remove obsoleted files. 2001-01-31 09:25:42 +00:00
msmith
d0b0463ce5 This commit was generated by cvs2svn to compensate for changes in r71867,
which included commits to RCS files with non-trunk default branches.
2001-01-31 09:17:50 +00:00
msmith
7948a3a804 Update to the 20010125 ACPI CA snapshot. 2001-01-31 09:17:50 +00:00
peter
65ffeedc02 Quieten gcc. 2001-01-31 08:27:09 +00:00
peter
6be84866ea Exterminate the use of PSEUDO_SET() with extreme prejudice. 2001-01-31 07:58:58 +00:00
peter
2c2377c37d Add hpfs and the config glue for it. It was being skipped from test
coverage.
2001-01-31 05:33:23 +00:00
bp
85976e8349 Properly lock new vnode.
Reminded by:	tegge
2001-01-31 04:54:23 +00:00
bp
076c2e70fd Let M_PANIC go back to the private tree as its intention isn't understood well
for now.
2001-01-31 04:50:20 +00:00
peter
6150a50174 Zap last remaining references to (and a use use of) of simple_locks. 2001-01-31 04:29:52 +00:00
tanimura
ee1ef07885 As the default MAXDSIZ and DFLDSIZ is 512MB, bump the example values
to 1GB. A box of mine is running with MAXDSIZ and DFLDSIZ increased
up to 1.5GB.

Wishlist: It would be nice to warn if MAXTSIZ + MAXDSIZ + MAXSSIZ
exceeds VM_MAXUSER_ADDRESS - VM_MINUSER_ADDRESS.
2001-01-31 04:07:34 +00:00
jasone
b00e6ea80d Revert mutex initialization check to look at mtx_description.
Pointed out by:	jlemon, jhb
2001-01-30 22:28:03 +00:00
julian
829347d510 Implement direct support for semipersistant nodes.
(e.g. ethernet nodes are persistent until you rip out the hardware)
Use this support in the ethernet and sample nodes.
Add some more abstraction on the 'item's so that  node and
hook reference counting can be checked easier.
Slight man page correction.
Make pppoe type dependent on ethernet type.
Clean up node shutdown a little.
Move a mutex from MTX_SPIN to MTX_DEF (oops)
Fix small ref-counting bug.
remove warning on one2many type.
2001-01-30 20:51:52 +00:00
jhb
c699ccaa2e Argh, fix a nit that snuck in while trying to resolve conflicts. 2001-01-30 20:29:11 +00:00
jhb
30e6f820c3 - Fix TUNABLE_STR_FETCH() to actually be a code fragment rather than
declaring a static function.
- Modify TUNABLE_*_DECL() to use TUNABLE_*_FETCH() to avoid code
  duplication.

Reviewed by:	peter
2001-01-30 20:13:02 +00:00
bde
1a8382d6ee Added used include of <sys/mutex.h>. The SMP case was broken by
incompletely converting simplelocks to mutexes (COM_LOCK() is supposed
to hide the SMP locking internals, but it now depends on mutex interfaces
being visible).
2001-01-30 17:05:58 +00:00
jhay
d2d8355cd9 Make klds for the ar and sr devices and hook them up.
The normal versions are called if_ar.ko and if_sr.ko and the netgraph
versions ng_sync_ar.ko and ng_sync_sr.ko.
2001-01-30 10:20:43 +00:00
phk
3ed24cd17e Add a BUF_KERNPROC() in the BIO_DELETE path.
This seems to fix the problem which md(4) backed filesystems exposed.
2001-01-30 10:06:08 +00:00
jhay
d692564caf The ar and sr devices have moved to sys/dev/. 2001-01-30 10:05:44 +00:00
jhay
20531fb538 This include file has found a new home in sys/dev/ic/. 2001-01-30 10:04:25 +00:00
jhay
306e6760c1 Newbusify the sr device and move it to its new location. 2001-01-30 10:02:10 +00:00
jhay
11691d89b0 Update include files to reflect the new location of the ar device. 2001-01-30 10:01:15 +00:00
jhay
9224ba9cfe Reflect the new location of the ar and sr devices. 2001-01-30 10:00:04 +00:00
peter
9f019984c6 Style (whitespace) nit. 2001-01-30 09:44:37 +00:00
phk
006cf45cd7 Fix two minor nits.
Existences revealed, but no details offered by: bp
2001-01-30 08:39:52 +00:00
julian
8cb2e82b69 Fix cut and paste error in a comment.
Submitted by: Peter Wemm <peter@freebsd.org>
2001-01-30 07:58:30 +00:00
dillon
1f3366270d Fix a race between the syncer and umount. When you umount a softupdates
filesystem softdep_process_worklist() is called in a loop until it indicates
that no dependancies remain, but the determination of that fact depends on
there only being one softdep_process_worklist() instance running.  It was
possible for the syncer to also be running softdep_process_worklist()
and the pre-existing checks in the code to prevent this were not sufficient
to prevent the race.  This patch solves the problem.

Approved-by: mckusick
2001-01-30 06:31:59 +00:00
peter
998d959b65 Remove some leftovers from the CMAP* stuff in globaldata and the
BSP and AP startup.
2001-01-30 04:02:28 +00:00
peter
c76e51cbbf Remove unused GD_CPU_LOCKID, GD_OTHER_CPUS, PS_IDLESTACK and
PS_IDLESTACK_TOP
2001-01-30 04:00:11 +00:00
jhb
5f8a4ce890 Remove unnecessary locking to protect the p_upages_obj and p_addr
pointers.
2001-01-30 00:35:35 +00:00
jhb
41bdca4402 - Use the right name for the proctree lock in the locking key.
- Add a note about the special locking semantics used for members such as
  p_cred that are read by multiple processes but only written to by the
  current process.
- Change p_upages_obj's locking key to note that it is created at fork
  and left alone afterwards (the actual pointer, not what it points to.)
- Mark p_intr_nesting_level as being implicitly locked since only curproc
  accesses it.

Reviewed by:	jake
2001-01-30 00:10:37 +00:00
sos
ab7cbc336e Add option ATA_ENABLE_WC for enabling write caching (now off by default). 2001-01-29 18:00:35 +00:00
sos
096ea4ce98 Add text for option ATA_ENABLE_WC. 2001-01-29 17:58:16 +00:00
dfr
66e581ea9f Flesh out EFI support somewhat. 2001-01-29 13:31:19 +00:00
peter
45d023e517 Supply a stub bpf_validate() (always returning false - the script is not
valid) if BPF is missing.
The netgraph_bpf node forced bpf to be present, reflect that in the
options.
Stop doing a 'count bpf' - we provide stubs.
Since a handful of drivers still refer to "bpf.h", provide a more accurate
indication that the API is present always. (eg: netinet6)
2001-01-29 13:26:14 +00:00
peter
695e2716fd Use M_PANIC instead of if (sc == NULL) panic(); 2001-01-29 13:21:34 +00:00
peter
d1890fe8f2 Remove unused variable 'int n;' 2001-01-29 13:05:21 +00:00
bp
e88e663eb2 Add M_PANIC flag to the list of available flags passed to malloc().
With this flag set malloc() will panic if memory allocation failed.
This usable only in critical places where failed allocation is fatal.

Reviewed by:	peter
2001-01-29 12:48:37 +00:00
peter
8eddfd2f15 Stop counting sppp interfaces, we were just testing its presence to give
a warning if it was missing.
2001-01-29 12:27:46 +00:00
peter
ab46631b96 Convert mca (microchannel bus support) from something that we count
(bogus) to something that we test for the presence of.
2001-01-29 11:57:27 +00:00
brian
2509160a79 Add a few ``const''s to silence some -Wwrite-strings warnings 2001-01-29 11:44:13 +00:00
peter
c617fc9c7d Zap silly #if NPCI > 0 and the hoops that we jump through for the module
case.  Use an 'and' case in conf/files so that it only gets compiled if
pci is present.
2001-01-29 11:38:39 +00:00
peter
21b418d3ba Yikes, these files bogusly #include "loop.h" but didn't use the value.
My searching for NLOOP missed them. :-(
2001-01-29 11:28:20 +00:00
peter
dc1171ad0c Convert 'count en', 'count lnc', 'count fpa', 'count loop' and 'count ar'
back to standard 'optional'.
2001-01-29 11:21:00 +00:00
peter
b37b0c22ee Remove unused #include "lnc.h" 2001-01-29 11:19:30 +00:00
peter
20862096d0 Make the number of loopback interfaces dynamically tunable. Why one
would *want* to is a different story, but it used to be able to be done
statically.  Get rid of #include "loop.h" and struct ifnet loif[NLOOP];
This could be used as an example of how to do this in other drivers,
for example: ccd.
2001-01-29 11:06:26 +00:00
peter
10b1794678 Remove unused #include "snp.h" 2001-01-29 10:06:22 +00:00
peter
10126ce00c Convert ata and atapi #if NATA* > 0 to options instead. Stop config
trying to count the number of ata* devs since they were not used anyway.
2001-01-29 10:01:11 +00:00
peter
2f446fa455 Turn '#if NSNP > 0' into an option. 2001-01-29 09:43:36 +00:00
peter
b7edc4f4e3 Send "#if NISA > 0" to the bit-bucket and replace it with an option.
These were compile-time "is the isa code present?" tests and not
'how many isa busses' tests.
2001-01-29 09:38:39 +00:00
peter
4d33b0dad5 Gag. These compiled because I had a stray "eisa.h" in my config dir. 2001-01-29 08:40:16 +00:00
peter
3e603c7595 Remove stray #include "isa.h" 2001-01-29 08:33:55 +00:00
dillon
11fb1bf637 This patch reestablishes the spec_fsync() guarentee that synchronous
fsyncs, which typically occur during unmounting, will drain all dirty
buffers even if it takes multiple passes to do so.  The guarentee was
mangled by the last patch which solved a problem due to -current disabling
interrupts while holding giant (which caused an infinite spin loop waiting for
I/O to complete).  -stable does not have either patch, but has a similar
bug in the original spec_fsync() code which is triggered by a bug in the
softupdates umount code, a fix for which will be committed to -current
as soon as Kirk stamps it.  Then both solutions will be MFC'd to -stable.

-stable currently suffers from a combination of the softupdates bug and
a small window of opportunity in the original spec_fsync() code, and -stable
also suffers from the spin-loop bug but since interrupts are enabled the
spin resolves itself in a few milliseconds.
2001-01-29 08:19:28 +00:00
peter
d3da30dfac change 'count eisa' to 'optional eisa' and update the only consumer
of 'NEISA' - userconfig.c.
While there, send some defunct code to the file history.
2001-01-29 08:19:02 +00:00
phk
11132720d3 Fix a braino in ccd's clone routine.
Submitted by:	tegge
2001-01-29 06:18:14 +00:00
ken
5558e85bb4 Back out rev 1.102. The IBM DNES drives work fine for me, jedgar and other
folks.

My guess is that reducing the number of tags is just masking the real
problem for the PR submitter.  I'll re-open the PR and see if I can work
with the submitter to diagnose the problem.

PR:		21139
2001-01-29 05:33:14 +00:00
marcel
99d951b840 Don't hard-code alignment and data declarations valid for 64-bit
machines (duh!). This was one reason why this script broke on
i386. The other being that on i386 sections did not have the
proper alignment. This has been fixed in sys/sys/linker_set.h.
2001-01-29 01:55:54 +00:00
marcel
3e70da6121 o Add explicit alignment to linker set definitions. On i386, data
declarations will not be aligned by default.
o  Remove the alignment work-around for alpha. Our current alpha
   as(1) does not assume alignment after section switching, nor
   does the ia64 as(1).
2001-01-29 01:46:50 +00:00
brian
5728ea1f1d Ignore leading witespace in the string given to PacketAliasProxyRule(). 2001-01-29 00:30:01 +00:00
ken
634f45c6d9 Fix region code reporting.
Reported by:	Andrew Gordon <arg@arg1.demon.co.uk>
2001-01-28 21:43:17 +00:00
marcel
7d79d6d1ab Revert previous commit. I messed up my testing. 2001-01-28 21:24:05 +00:00
phk
079c35c874 Remove devstat entries in mddelete()
Spotted:	tegge
2001-01-28 20:55:55 +00:00
groudier
0fe2e6bab6 A couple of chip errata work-arounds refined:
- When used on a 33MHz PCI BUS, the 53C1010-66 revision 0
  requires extra clocks to be inserted in data out phase.
  Revision 1 is fixed.
- The 53C1010-33 revision 1 requires internal cycles to be
  disabled due to possible contentions on IO registers.
  Revision 2 is fixed.
Fix:
- The probing of HVD from GPIO3 bit by the driver was reversed.
  The driver could misprobe the bus mode of a 825 or 875 chip
  that was not previously initialized (no BIOS for example).
2001-01-28 19:58:21 +00:00
phk
1167a32a1d Remove an outdated DEVFS non-description. 2001-01-28 19:32:23 +00:00
jake
fc82a0c37b Clear intr_nesting_level when an interrupt thread has no more
handlers and wants to exit, so it doesn't panic in exit1()
which malloc()s with M_WAITOK.

Reported by:	Bob Bishop <rb@gid.co.uk>
2001-01-28 17:20:11 +00:00
julian
501d5b3f20 Add a new distribution algorythm to the 'one2many' node type.
The new method is 'flood' (in addition to the old round-robin)
in which incoming packets are sent to more than one outgoing hook.
(I'm not sure what Rogier is using this for but it seems generally useful
and isn't much extra)

Submitted by:   Rogier R. Mulhuijzen (drwilco@drwilco.net )
2001-01-28 15:37:06 +00:00
kato
ba9a1fe1a9 Merged from sys/i386/isa/npx.c revisions 1.88 and 1.89. 2001-01-28 12:31:03 +00:00
kato
c859c78560 Synced with sys/i386/i386/machdep.c revision 1.436. 2001-01-28 11:06:28 +00:00
marcel
f8be4d8cb4 Add gd_witness_spin_check. 2001-01-28 08:06:50 +00:00
marcel
8a14db568d Fix typo. 2001-01-28 08:05:55 +00:00
marcel
93f1d42808 Improve kernel bootstrapping:
o  Use objdump instead of gensetdefs(1) to build the linker sets.
o  Allow overriding of nm and objdump in resp. genassym.sh and
   gensetdefs.pl for non-native toolchains.

Reviewed by: arch
Perl improvements: Jos Backus <josb@cncdsl.com>, benno
2001-01-28 06:39:56 +00:00
bmilekic
4f534409b3 Move the setting of curproc to idleproc up earlier in ap_init(). The
problem is that a mutex lock, prior to this change, is acquired before
the curproc is set to idleproc, so we mess ourselves up by calling
the mutex lock routine with curproc == NULL.

Moving it up after the aps_ready spin-wait has us hopefully setting it
after idleproc is setup.

Solved by: jake (the allmighty) :-)
2001-01-28 03:41:01 +00:00
tegge
55837ed17a Defer assignment of low level interrupt handlers for PCI interrupts
described in the MP table until something asks for the interrupt number
later on.
2001-01-28 01:07:54 +00:00
des
f175b29e06 Remove an assertion I forgot to remove in the previous commit: sbuf_len()
may now be called with an unfinished sbuf.
For consistency, copy the related comment from sbuf_delete() to sbuf_clear()
and sbuf_len().
2001-01-28 00:33:58 +00:00
des
ba6b6e22f5 Add sbuf_clear() and sbuf_overflowed().
Move the helper macros from sbuf.h to sbuf.c
Use ints instead of size_ts.
Relax the requirements for sbuf_finish(): it is now possible to finish an
overflowed buffer.
Make sbuf_len() return -1 instead of 0 if the sbuf overflowed.

Requested by:	gibbs
2001-01-28 00:13:01 +00:00
gallatin
ba6119ff82 The API UP1100 is close enough to a UP1000 that FreeBSD just works on it, so
document that fact.

Thanks to Peter Petrakis <ppetrakis@alphalinux.org> for doing a test boot.
2001-01-27 20:56:00 +00:00
gibbs
ceeff8ca20 Update Copyright notices for new year. (should have been in last commit). 2001-01-27 20:54:24 +00:00
nyan
64f8fd698f Merged from sys/isa/sio.c revision 1.320. 2001-01-27 13:02:06 +00:00
jhb
bb9151616e Turn on DEVFS by default for the alpha. Aside from vinum as mentioned by
phk it should work fine.  If you need vinum, then don't add this to your
kernel config until vinum catches up to DEVFS.
2001-01-27 08:34:58 +00:00
phk
d29cd49646 Turn DEVFS on by default.
You may need to turn this off if you you vinum.  Apart from that I know of
no reason not to run with DEVFS.
2001-01-27 08:18:36 +00:00
jhb
02ab182bc1 Add a new ddb command 'witness_list' that lists the mutexes held by
curproc.

Requested by:	peter
2001-01-27 07:51:34 +00:00
peter
ee90d51e9c p->p_intr_nesting_level is MI now and initialized to 0 in kern_fork.c,
so it should be save to KASSERT() on it even on an arch that may not
use it.
2001-01-27 06:32:20 +00:00
peter
cf3baa5309 Bah, as my luck would have it, I had a kernel source tree in the window
while strlcpy() existed, before it got backed out due to an extended
bikeshed argument.  Sigh.  Back to the old version with the redundant
code to terminate the string. :-(
2001-01-27 06:01:48 +00:00
peter
7e605d2e0f Use strlcpy() in TUNABLE_STR_xxx() and avoid an off-by-one.
Noticed by: dfr
2001-01-27 05:43:58 +00:00
luigi
2ce587262d Make sure we do not follow an invalid pointer in ipfw_report
when we get an incomplete packet or m_pullup fails.
2001-01-27 02:31:08 +00:00
jhb
b6baa60b1e Back out proc locking to protect p_ucred for obtaining additional
references along with the actual obtaining of additional references.
2001-01-27 00:01:31 +00:00
jhb
0c5b7b7672 - Back out over-aggressive locking of p->p_cred.
- Back out locking ucred's and bumping refcounts for vnode operations.
2001-01-26 23:54:40 +00:00
jhb
5881492684 Fix fork_exit() to take a pointer to a function that returns void as its
first argument rather than a function that returns a void *.

Noticed by:	jake
2001-01-26 23:51:41 +00:00
jhb
17984f33e4 Update some comments, s0 in the pcb of a child returning from fork1() is
now passed in as a0 to fork_exit() and and s2 is passed in as a1.
2001-01-26 23:32:38 +00:00
luigi
3366175318 Minor cleanups after yesterday's patch.
The code (bridging and dummynet) actually worked fine!
2001-01-26 19:43:54 +00:00
dfr
8ac42e8bc9 Initialise proc0.p_heldmtx and proc0.p_contested and call
mtx_enter(&Giant, MTX_DEF) after Giant is initialised.

Reviewed by: jhb
2001-01-26 17:52:34 +00:00
gallatin
10b4b1aae3 The osfulator needs sysvipc to work. Thanks to DES's commit to
the i386 linulator for pointing this out.

The alpha linulator doesn't need a dependancy, as it already
depends on the osfulator.
2001-01-26 17:12:30 +00:00
hm
01632e0088 Add experimental support for Eicon.Diehl DIVA 2.0 and 2.02 ISA PnP cards. 2001-01-26 13:22:18 +00:00
hm
cb91e4fe80 Add experimental support for Eicon.Diehl DIVA 2.0 and 2.02 ISA PnP cards.
Thanks a lot to Jakob Schripsema (sch@kpn.com) for pointing out similarities
of the Eicon 2.02 to the Siemens I-surf driver !
2001-01-26 13:16:11 +00:00
hm
e1ad448f1d Add experimental support for Eicon.Diehl DIVA 2.0 and 2.02 ISA PnP cards.
Increment i4b minor revision (=step) so a buildworld or a make install in
/usr/src/sys/include is necessary to get isdnd and i4b kernel parts in sync.
2001-01-26 13:12:56 +00:00
julian
40289379ee Swap egress hooks for packets entering from the monitor hooks. 2001-01-26 11:35:36 +00:00
luigi
8a9237833e Bring dummynet in line with the code that now works in -STABLE.
It compiles, but I cannot test functionality yet.
2001-01-26 06:49:34 +00:00
luigi
f9659c70dd Bring bridging code in line with the one which works on -STABLE.
It compiles on -CURRENT, but I can not test functionality yet.
2001-01-26 06:47:19 +00:00
jake
c7072beb9d Push Giant down into the trap handlers that need it, instead of
acquiring it unconditionally.

Reviewed by:	jhb
2001-01-26 04:16:16 +00:00
jhb
ce34393882 - Don't pass in MTX_NORECURSE, as that is only used with spin mutexes and
is going away soon anyways.  Instead, don't pass MTX_RECURSE to mtx_init,
  so that WITNESS will panic if the driver mutex is recursed on.
- Use MTX_DEF in mtx_init() instead of assuming that it will be 0.
2001-01-26 03:18:17 +00:00
luigi
611a113c0f Comment the interface to ether_input() and the way is normally
used by most ethernet drivers.
2001-01-25 23:56:13 +00:00
julian
7210110be5 Only clear the 'free' bit if we were successful in getting a queue item off the free list.
Found by: Harti Brandt (address unknown)
2001-01-25 19:48:57 +00:00
jhb
551775d3fb Whitespace fix: convert code indented 6 spaces to use tabs instead. 2001-01-25 19:37:26 +00:00
nsouch
adc8a8326d Discard extra status information if -1. This has been breaking the
PS/2 mode for ZIP+ drives for a long time. Thanks Jonathon.

Submitted by:	j mckitrick <jcm@FreeBSD-uk.eu.org>
2001-01-25 13:07:55 +00:00
nsouch
fe01c653ba Consider that the chipset may be in ECP mode (from BIOS settings)
even if mode PS/2 is forced with bootflags. As a matter of fact,
chipsets needs some extra configuration for accessing PS/2 mode
from ECP. The current patch is only relevant for generic chipsets
since specific code is supposed to deal with this during detection.
2001-01-25 10:51:41 +00:00
nyan
8edb21358a Added necessary include for pc98. 2001-01-25 09:56:04 +00:00
jasone
bf5d4c5ca4 Remove CV_DECLARE(), which serves no useful purpose. 2001-01-25 07:29:54 +00:00
cokane
7283cbc99b Add some description and clarification as to the use of the tdfx device.
Answers many questions I have recieved and has a short description of what
the driver actually does.
2001-01-25 06:58:53 +00:00
luigi
08392d8bb0 Pass up errors returned by dummynet. The same should be done with
divert.
2001-01-25 02:06:38 +00:00
peter
98efcc620b Disable cy - it is now completely broken and needs non-trivial work. 2001-01-25 01:56:27 +00:00
jhb
ef07536d23 - Doh, lock faultin() with proc lock in scheduler().
- Lock p_swtime with sched_lock in scheduler() as well.
2001-01-25 01:38:09 +00:00
jhb
238ea9ee91 Back out over-aggressive locking of p->p_cred.
Requested by:	alfred
2001-01-25 01:09:44 +00:00
jhb
e532f9ac32 Remove prototype for child_return(). 2001-01-24 22:00:13 +00:00
jhb
af00dc8eef - Change fork_exit() to take a pointer to a trapframe as its 3rd argument
instead of a trapframe directly.  (Requested by bde.)
- Convert the alpha switch_trampoline to call fork_exit() and use the MI
  fork_return() instead of child_return().
- Axe child_return().
2001-01-24 21:59:25 +00:00
julian
222035d6b1 Don't crash the kernel if the user tries to load a netgraph
module with the wrong version number.
2001-01-24 21:29:57 +00:00
phk
43df074e7c DEVFS cloning for if_tap.
Submitted by:	Maksim Yevmenkin <m_evmenkin@yahoo.com>
2001-01-24 20:59:34 +00:00
jhb
9f8dbccd56 - Remove some unused and unneeded atomic operations sitting in mp_machdep.c
that are already implemented in atomic.h.
- Fix SMP kernel builds.
2001-01-24 19:49:13 +00:00
jhay
1acb4466b0 Newbusify ar(4). 2001-01-24 18:45:29 +00:00
dfr
82b0a074c7 Change cpuno to cpuid. 2001-01-24 17:12:37 +00:00
dfr
14133b4f7e Fix typo. 2001-01-24 17:11:33 +00:00
wollman
08d0e8d96f Correct a comment. 2001-01-24 16:25:36 +00:00
jhb
cf8988088c Oops, when converting if (foo) panic() to a KASSERT(), you have to invert
the test case.

Spotted by:	peter, jasone
2001-01-24 13:10:17 +00:00
deischen
e70d7adf60 Bump FreeBSD version to reflect changes to libc and libc_r. 2001-01-24 13:08:12 +00:00
jhb
91e8162c0a Add a new item to kinfo_proc: ki_sflag to mirror p_sflag. 2001-01-24 12:49:52 +00:00
jasone
8d2ec1ebc4 Convert all simplelocks to mutexes and remove the simplelock implementations. 2001-01-24 12:35:55 +00:00
jhb
c5cc2f8e26 Argh, I didn't get this test right when I converted it. Break this up
into two separate if's instead of nested if's.  Also, reorder things
slightly to avoid unnecessary mutex operations.
2001-01-24 12:23:17 +00:00
jhb
9d4ef4f19c - Catch up to proc flag changes.
- Minimal proc locking.
- Use queue macros.
2001-01-24 11:28:36 +00:00
jhb
f2190e5fef Add mtx_assert()'s to verify that kmem_alloc() and kmem_free() are called
with Giant held.
2001-01-24 11:27:29 +00:00
jhb
9e1a5e2c5b - Catch up to proc flag changes.
- Proc locking in a few places.
- faultin() now must be called with the proc lock held.
- Split up swappable() into a couple of tests so that it can be locke in
  swapout_procs().
- Use queue macros.
2001-01-24 11:25:56 +00:00
jhb
963052ead7 - Catch up to proc flag changes. 2001-01-24 11:20:05 +00:00
jhb
a56633d331 - Catch up to proc flag changes.
- Assert sched_lock is held in proc_compare.
2001-01-24 11:15:59 +00:00
jhb
2a1df40436 - Catch up to proc flag changes.
- Update stopevent() to assert that the proc lock is held when it is
  held and is not recursed.  Note that the STOPEVENT() macro obtains
  the proc lock when calling this function.
2001-01-24 11:15:24 +00:00
jhb
13bef95f6e - Catch up to proc flag changes.
- Add proc locking for selwakeup() and selrecord().
2001-01-24 11:12:37 +00:00
jhb
d5d162ffe9 - Catch up to proc flag changes. 2001-01-24 11:11:35 +00:00
jhb
c0f4ac74f2 - Catch up to proc flag changes.
- Add in some locking ops that might fix SIGXCPU, but don't enable them
  yet.
- Assert that sched_lock is not recursed when mi_switch() is called.
2001-01-24 11:10:55 +00:00
jhb
d161c1e3f8 - Proc locking.
- Catch up to proc flag changes.
2001-01-24 11:08:02 +00:00
jhb
daef77c52d - Add a mtx_assert() for sched_lock in calcru().
- Protect calcru() with sched_lock later on in the file when it is called.
2001-01-24 11:06:39 +00:00
jhb
bd862d8954 - Proc locking.
- Catch up to proc flag changes.
- Reorder the way we get things in fill_kinfoproc() to minimize the
  number of locking operations.
2001-01-24 11:05:50 +00:00
jhb
233d6de215 - Don't use a union and fun tricks to shave one extra pointer off of struct
mtx right now as it makes debugging harder.  When we are in optimizing
  mode, we can revisit this.
- Fix the KTR trace messages to use %p rather than 0x%p to avoid duplicate
  0x's in KTR output.
- During witness_fixup, release Giant so that witness doesn't get confused.
  Also, grab all_mtx while walking the list of mutexes.
- Remove w_sleep and w_recurse.  Instead, perform checks on mutexes using
  the mutex's mtx_flags field.
- Allow debug.witness_ddb and debug.witness_skipspin to be set from the
  loader.
- Add Giant to the front of existing order_list entries to help ensure
  Giant is always first.
- Add an order entry for the various proc locks.  Note that this only
  helps keep proc in order mostly as the allproc and proctree mutexes are
  only obtained during a lockmgr operation on the specified mutex.
2001-01-24 10:57:01 +00:00
jhb
eccf4f41cd - Catch up to proc flag changes.
- Set the new P_KTHREAD flag for kthreads during kthread_create.
2001-01-24 10:47:50 +00:00
jhb
f739ee5728 - Catch up to proc flag changes.
- Add new fork_exit() and fork_return() MI C functions.
2001-01-24 10:47:14 +00:00
jhb
fdd3fb7200 Catch up to P_FOO -> PS_FOO changes in proc flags. 2001-01-24 10:44:01 +00:00
jhb
180bd8bf65 - Proc locking.
- P_FOO -> PS_FOO.
2001-01-24 10:43:25 +00:00
jhb
eef4e5d2f9 - Catch up to p_sflag changes.
- The MD code now initializes proc0.p_heldmtx, proc0.p_contested, and
  curproc.
- The MD code calls here with Giant already held.
- Proc locking.
2001-01-24 10:40:56 +00:00
jhb
8dae9bbc6a - Proc locking.
- P_OWEUPC -> PS_OWEUPC.
2001-01-24 10:38:58 +00:00