Commit Graph

13939 Commits

Author SHA1 Message Date
Bruce Evans
03126f3524 Removed some unused includes (only 1 to go here now). Sorted includes. 1999-02-03 08:21:44 +00:00
Semen Ustimenko
b4b8aedf57 Added ntfs subdirectory.
Reviewed by:	David O'Brien <obrien@NUXI.com>
1999-02-03 04:18:25 +00:00
Semen Ustimenko
52e93a35a3 Added vnode tag for NTFS.
Reviewed by:	David O'Brien <obrien@NUXI.com>
1999-02-03 04:12:36 +00:00
Semen Ustimenko
16ee760296 First version.
Reviewed by:	David O'Brien <obrien@NUXI.com>
1999-02-03 04:07:38 +00:00
Semen Ustimenko
012c9fb3bb First version.
Reviewed by:	David O'Brien
1999-02-03 04:01:27 +00:00
Matthew Dillon
4112823fc7 Submitted by: Alan Cox
The vm_map_insert()/vm_object_coalesce() optimization has been extended
    to include OBJT_SWAP objects as well as OBJT_DEFAULT objects.  This is
    possible because it costs nothing to extend an OBJT_SWAP object with
    the new swapper.  We can't do this with the old swapper.  The old swapper
    used a linear array that would have had to have been reallocated, costing
    time as well as a potential low-memory deadlock.
1999-02-03 01:57:17 +00:00
Doug Rabson
f422bef257 Use the bsd.kern.mk from the source tree rather than the installed one
if possible.
1999-02-02 18:34:23 +00:00
KATO Takenori
f19a38101a Added braces around initializsers and in if-statements.
Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-02-02 17:26:03 +00:00
KATO Takenori
524d2ab047 Sync with sys/dev/syscons/syscons.c revision 1.294. 1999-02-02 17:21:33 +00:00
Bruce Evans
bb25f0dd23 Check for signals while reading /dev/urandom. Reading 10MB from
/dev/urandom takes about 38 seconds on a P5/133.  It is useful
to be able to kill such reads almost immediately.  Processes
doing such reads are now scheduled so their denial of service
is no worse than that of processes looping in user mode.
1999-02-02 14:14:05 +00:00
Bruce Evans
8b6ca0359b Switch context before doing some i/o operations that might block if
context would be switched on return to user mode.  This fixes some
denial of service problems.
1999-02-02 12:11:01 +00:00
Bruce Evans
79a2501238 Added a hopefully-machine-independent macro for determining if a
reschedule is pending.
1999-02-02 09:08:23 +00:00
Bill Fenner
8f70ac3e02 Fix the port of the NetBSD 19990120-accept fix. I misread a piece of
code when examining their fix, which caused my code (in rev 1.52) to:
- panic("soaccept: !NOFDREF")
- fatal trap 12, with tracebacks going thru soclose and soaccept
1999-02-02 07:23:28 +00:00
Matthew Dillon
f7f62e7b56 Get rid of IFF_BROADCAST from default IFF_ slip options. This accidently
snuck in during the big -Wall commit and wasn't supposed to be in there.
1999-02-02 00:28:29 +00:00
Bill Paul
e8354668bd Remember to initialize ifp->if_snd.ifq_maxlen. 1999-02-01 21:25:52 +00:00
Mark Newton
240c6baa11 Nuke some prototypes that really shouldn't be here. 1999-02-01 21:22:30 +00:00
Mark Newton
9cbac9cee4 Moved prototypes for soo_{read,write,close} into socketvar.h where they
belong.

Suggested by: bde
1999-02-01 21:16:31 +00:00
Poul-Henning Kamp
e0ea20bcca Print a message if the driver didn't initialize ifq_maxlen.
Drivers should be updated if they get flagged by this message.

(The reason this is important is because we do not have a way
to catch this mistake for interfaces added after ifinit() runs.)
1999-02-01 20:03:27 +00:00
Mark Newton
4a735ee8b0 Acquiesce to proc.h for declarations of M_ZOMBIE, M_SUBPROC (and reorder
includes so proc.h knows the right type for 'em).

Suggested by: bde
1999-02-01 13:26:13 +00:00
Mark Newton
c4ca2670b8 Fix bogus line breaks in declarations for soo_read() and soo_write()
Suggested by: Pedant Central :-)
1999-02-01 13:24:39 +00:00
Mark Newton
895259716e Declare M_ZOMBIE so the svr4 emulator doesn't need to.
Suggested by: bde
1999-02-01 13:23:18 +00:00
Matthew Dillon
b406c0f55c This patch eliminates a pointless test from appearing twice
in vm_map_simplify_entry.  Basically, once you've verified that
    the objects in the adjacent vm_map_entry's are the same, either
    NULL or the same vm_object, there's no point in checking that the
    objects have the same behavior.

Obtained from:  Alan Cox <alc@cs.rice.edu>
1999-02-01 08:49:30 +00:00
Matthew Dillon
06fd697d15 The alternate B_PAGING path for vnstrategy() is used for VM faults
as well as swap I/O now.  This path failed to properly set bp->b_resid
    on I/O completion.
1999-02-01 08:36:02 +00:00
Jordan K. Hubbard
ae84df99c4 Whoops! Forgot to include Mr. Sobray's more command in the last set
of commits.

Submitted by:	Daniel C. Sobral <dcs@newsguy.com>
1999-02-01 06:08:21 +00:00
Greg Lehey
5b3c6cedf5 Move CFLAGS to God's Own Position
Remove white space between CFLAGS and +=
Remove unneeded options

Implied-by: bde
1999-02-01 00:52:51 +00:00
Søren Schmidt
7538974af9 Bzero the devstat structure before use.
Pointed out by:	<Kenneth Merry> ken@plutotech.com
1999-01-31 23:08:47 +00:00
Peter Dufault
e419eecba9 Move the "fetch serial data" delay so that it is an inter-bit delay.
Increase the overall length of the delay by 10.

Without this a 3C509 card on my MediaGX crash box can't be reliably
read.  With this it is solid.

I've left a delay multiplier in instead of just changing the base
delay because I'm surprised I had to increase it so much and expect
there may be another problem.
1999-01-31 22:41:51 +00:00
Søren Schmidt
a257733c19 Add device stats for the acd device. 1999-01-31 21:51:03 +00:00
KATO Takenori
a4af40881f Sync with sys/i386/i386/userconfig.c revision 1.128. 1999-01-31 17:44:06 +00:00
Nick Hibma
aa11c7f9d1 Added UHCI_LEGSUP to uhcireg.h 1999-01-31 16:22:35 +00:00
Julian Elischer
287457c2e7 Submitted by: Alan Cox <alc@cs.rice.edu>
Checked by: "Richard Seaman, Jr." <dick@tar.com>
Fix the following problem:
As the code stands now, growing any stack, and not just the process's
main stack, modifies vm->vm_ssize.  This is inconsistent with the code
earlier in the same procedure.
1999-01-31 14:09:25 +00:00
Kazutaka YOKOTA
d7e4346624 - Don't print unnecessary CLI command prompt (and faked "quit" command)
if RB_CONFIG is not set.
- Print a short, introductory banner for CLI before the first command
  prompt, not after.
1999-01-31 13:08:25 +00:00
Bruce Evans
95c391a468 Don't comment out dead code; remove it. 1999-01-31 11:54:29 +00:00
Nicolas Souchu
c9ab07382c Fix compile warnings about missing braces around static initialization of unions. 1999-01-31 11:52:04 +00:00
Bruce Evans
6acb4914fb Fixed English in previous commit. 1999-01-31 10:05:59 +00:00
Bruce Evans
4c253324ab Fixed smashed tabs and inconstent comment style in previous commit. 1999-01-31 09:40:14 +00:00
Julian Elischer
4c8e8c05fd Slight cleanups. There were 2 ways of getting the arpcom from the ifp.
Both equally bogus. Make it a macro so that we can pretend it's not
bogus and maybe make it less so some time in the future.
1999-01-31 08:17:16 +00:00
Mark Newton
ba198b1c45 Added comments about non-staticization so it doesn't get un-done next
time someone goes on a staticization binge.

Suggested by: eivind
1999-01-31 03:15:13 +00:00
KATO Takenori
4c51e923e0 Use offset to _pc98_system_parameter instead of immediate value which
assumes KERNBASE=0x100000.
1999-01-31 02:04:43 +00:00
Paul Richards
a461710f83 New driver flags to support IFF_ALLMULTI handling. 1999-01-31 00:56:32 +00:00
Paul Richards
5619e92064 Add IFF_MULTICAST when setting flags in lnc_init(). 1999-01-31 00:44:37 +00:00
Paul Richards
5448a2e522 Fix and enable multicast support. 1999-01-31 00:39:20 +00:00
Mike Smith
e25810a699 Remove unused "kern.shutdown_timeout" sysctl node. 1999-01-30 19:36:02 +00:00
Mike Smith
5c40906f11 An error in the last commit; the changes were submitted by, not reviewed by,
"D. Rock" <rock@cs.uni-sb.de>
1999-01-30 19:29:10 +00:00
Mike Smith
db82a982a7 Add a new sysctl node kern.shutdown, off which shutdown-related things
can be hung.

Add a tunable delay at the beginning of the SHUTDOWN_FINAL at_shutdown
queue, allowing time to settle before we launch into the list of things
that are expected to turn the system off.

Fix a bug in at_shutdown_pri() where the second insertion always put
the item in second position in the queue.

Reviewed by:	"D. Rock" <rock@cs.uni-sb.de>
1999-01-30 19:28:30 +00:00
KATO Takenori
1463f029a5 Moved pc98_system_parameter from .text to .data to make ELF kernel
work.
1999-01-30 15:38:48 +00:00
Nicolas Souchu
20240fa3ad Distinguish EPP address/data register. Add EPP address register access to ppi.
Change microseq offsets. Previously, offsets of the program counter where
added to the index of the current microinstruction. Make them rely on the
index of the next executed microinstruction.

Suggested by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1999-01-30 15:35:39 +00:00
Poul-Henning Kamp
dd84acd074 Put a comment here about using suser() to determine super-user-ness.
Using suser() means that the p_acflag will (can) be set, to show that
a process used super-powers during execution.  It also makes it easier
to restrict roots we don't trust later on.

Reviewed by:	bde
1999-01-30 12:28:49 +00:00
Poul-Henning Kamp
4e48a6bfe0 Use suser() to determine super-user-ness.
Collapse some duplicated checks.

Reviewed by:	bde
1999-01-30 12:27:00 +00:00
Poul-Henning Kamp
904efa5a75 Use suser() to determine super-user-ness.
Don't pretend we can mount RW.

Reviewed by:	bde
1999-01-30 12:26:22 +00:00
Poul-Henning Kamp
57c90d6fcd Use suser() to determine super-user-ness, don't examine cr_uid directly. 1999-01-30 12:21:49 +00:00
Poul-Henning Kamp
4e2d2aa1cd Use suser() to check for super user rather than examining cr_uid directly.
Use TTYDEF_SPEED rather than 9600 a couple of places.

Reviewed by:	bde, with a few grumbles.
1999-01-30 12:17:38 +00:00
Mark Newton
871f5df0ef Oops - Ripped out a bit of debugging code which will stop certain bits
of networking from working for people without DEC Tulip ethernet cards.
1999-01-30 09:42:55 +00:00
Mark Newton
f7be5389dd Nuked the "hello, world!" program from this directory (it has
been teleported to share/examples/svr4).
1999-01-30 08:44:59 +00:00
Matt Jacob
cbf57b472d Implement and use Fast Posting for both parallel && fibre. Redo a bit of
the startup code. Implement a call to outer framework function so that
asynchronous events can be handled (e.g., speed negotiation, target mode).

Roll internal release tags.
1999-01-30 07:29:00 +00:00
Matt Jacob
495bfaf206 Grrr.. Do the *correct* and *usable* 1.31 firmware. You have to power
cycle to get rid of the old 1.31 firmware. *@!$&^@&$!&^&^!!!!!

But anyway comment it out and use new SBus 7.55 firmware. We get fast posting
with this as well as 32 luns and target mode support.

(not that this is used yet in FreeBSD, but it's ready for FreeBSD-sparc
whenever it happens....)
1999-01-30 07:22:30 +00:00
Matt Jacob
73d5e7854f roll internal release tag 1999-01-30 07:20:50 +00:00
Matt Jacob
1d74fa4ca5 roll internal release tag 1999-01-30 07:08:55 +00:00
Mark Newton
e5969755f5 Added a "README" file containing text taken from the message I sent
to -current explaining how to use this sucker.
1999-01-30 06:49:01 +00:00
Mark Newton
7f84fa455a Activate svr4 module 1999-01-30 06:31:51 +00:00
Mark Newton
d1721fe1cd Add streams pseudo-device 1999-01-30 06:31:11 +00:00
Mark Newton
f22dd58acc Emulator KLD for SysVR4 executables grabbed from NetBSD.
See http://www.freebsd.org/~newton/freebsd-svr4 for limitations,
capabilities, history and TO-DO list.
1999-01-30 06:29:48 +00:00
Mark Newton
bd56b99ac3 New pseudo-device to provide for a way of obtaining a socket by open()ing
something in /dev.

Obtained from: Christos Zoulas (NetBSD)
1999-01-30 06:28:29 +00:00
Mark Newton
888ac52b62 New pseudo-device to provide for a way of obtaining a socket by open()ing
something in /dev.
Obtained from: Christos Zoulas, with FreeBSD modifications
1999-01-30 06:27:59 +00:00
Mark Newton
f8b03d857e Changed struct socket to include a new field (at the end, so as not
to break existing software) acting as a pointer to emulator-specific
state data that some emulators may (or may not) need to maintain about
a socket.

Used by the svr4 module as a place for maintaining STREAMS emulation state.

Discussed with: Mike Smith, Garrett Wollman back in Sept 98
1999-01-30 06:26:35 +00:00
Mark Newton
69a6f20bc8 Unstaticized routines which are needed by the svr4 KLD and the streams
garbage needed to support SysVR4 networking.
1999-01-30 06:25:00 +00:00
Greg Lehey
112d8fd2d7 Add MAINTAINER 1999-01-30 01:45:44 +00:00
Matthew Dillon
bc81493155 More const fixes for -Wall, -Wcast-qual 1999-01-29 23:18:50 +00:00
Matthew Dillon
820ca326e1 *_execsw static structures cannot be const due to the way they interact
with EXEC_SET, DECLARE_MODULE, and module_register.  Specifically,
    module_register.  We may eventually be able to make these const, but
    not now.
1999-01-29 22:59:43 +00:00
Bruce Evans
ae4d334421 Fixed parenthesization botch in previous commit. Async update of inodes
was broken.
1999-01-29 15:36:05 +00:00
Bruce Evans
d12895f90b Removed a bogus cast to v_caddr_t. This is part of terminating
v_caddr_t with extreme prejudice.  Here the bogons were originally
the same as for c_caddr_t (half-baked K&R support), but rev.1.95
changed one wrong cast and one harmless cast to 2 wrong casts,
and rev.1.96 only fixed the originally wrong cast.
1999-01-29 11:31:45 +00:00
Bruce Evans
9a6c0bd6c9 Fixed comment and whitespace lossage in recent commits. The -W flag
is not implied by -Wall as claimed by gcc.1.  Adding it causes a
measly 7193 new warnings for LINT, mostly for "unused parameter" and
"comparison between signed and unsigned".
1999-01-29 10:57:18 +00:00
KATO Takenori
fe5871fb09 Sync with sys/i386/i386/machdep.c revision 1.323. 1999-01-29 10:43:09 +00:00
Bruce Evans
cacd1f6aa9 Cast to `const char *' instead of to c_caddr_t. This is part of
terminating c_caddr_t with extreme prejudice.  Here we depended
on the "opaque" type c_caddr_t being precisely `const char *'
to do unportable pointer arithmetic.
1999-01-29 09:04:27 +00:00
Matthew Dillon
3cfc69e6c2 More -Wall / -Wcast-qual cleanup. Also, EXEC_SET can't use
C_DECLARE_MODULE due to the linker_file_sysinit() function
    making modifications to the data.
1999-01-29 08:36:45 +00:00
Bruce Evans
9e26dd2a54 Removed bogus casts to c_caddr_t. This is part of terminating
c_caddr_t with extreme prejudice.  Here the original casts to
caddr_t were to support K&R compilers (or missing prototypes),
but the relevant source files require an ANSI compiler.
1999-01-29 08:29:05 +00:00
Matthew Dillon
12cb7f73a6 Commit a solution for the SYSINIT vs C_SYSINIT conundrum. The
problem and solution is outlined in the comments, but basically
    we needed a way to allow the SYSINIT mechanism to handle const void *
    arguments and function pointers as well as non-const arguments and
    function pointers while still maintaining the compiler's ability to
    issue warnings if you try to use a bad combination.
1999-01-29 08:12:49 +00:00
Bruce Evans
425c50cf51 Removed a bogus cast to c_caddr_t. This is part of terminating
c_caddr_t with extreme prejudice.  Here the point of the original
cast to caddr_t was to break the warning about the const mismatch
between write(2)'s `const void *buf' and `struct uio's `char
*iov_base' (previous bitrot gave a gratuitous dependency on caddr_t
being char *).  Compiling with -Wcast-qual made the cast a full
no-op.

This change has no effect on the warning for discarding `const'
on assignment to iov_base.  The warning should not be fixed by
splitting `struct iovec' into a non-const version for read()
and a const version for write(), since correct const poisoning
would affect all pointers to i/o addresses.  Const'ness should
probably be forgotten by not declaring it in syscalls.master.
1999-01-29 08:10:35 +00:00
Matthew Dillon
f01a9dd520 cleanup warnings by propogating const char pointers properly. 1999-01-29 08:09:32 +00:00
Bruce Evans
1d20193564 Removed a bogus cast to c_caddr_t. This is part of terminating
c_caddr_t with extreme prejudice.  Here we want to convert from
`const char *' to `const char *'.  Casting through c_caddr_t is
not the way to do this.  The original cast to caddr_t was apparently
to break warnings about const mismatches in other versions of BSD
(in 4.4BSDLite2, the conversion is from `const char *path' to
plain caddr_t).
1999-01-29 07:23:53 +00:00
Matthew Dillon
8e527f6c22 Have EXEC_SET use C_DECLARE_MODULE instead of DECLARE_MODULE.
Add C_DECLARE_MODULE - same as DECLARE_MODULE but uses C_SYSINIT
    instead of SYSINIT.

    The C_ items are going to be used for items passing const data to
    sysinit.
1999-01-29 06:47:53 +00:00
Matthew Dillon
a91f66d4f6 Cleanup bsd.kern.mk after last commit. 1999-01-29 06:22:19 +00:00
Robert Nordier
391911b768 Check size of partition before using it. 1999-01-29 03:36:42 +00:00
Greg Lehey
2d4a17e638 Include .gdbinit for debugging 1999-01-29 02:51:45 +00:00
Mike Smith
7546e83ec1 Allow the interrupt allocated to the PCIC to be tuned from the kernel
environment by setting the variable machdep.pccard.pcic_irq.  If
the IRQ is invalid, the PCIC will run in polled mode.
1999-01-29 01:18:15 +00:00
Greg Lehey
7f1050341c Change multiline comments to start with a lone /* and end with a */,
apparently in accordance with style(9).

Complained-about-by: bde
1999-01-29 01:17:54 +00:00
Mike Smith
07dd15c173 Document the machdep.pccard.pcic_irq tunable, which allows the user to tune
the interrupt which will be given to the PCIC.  If the value supplied is
illegal or not available, interrupts will be turned off and polled mode
used instead.
1999-01-29 01:16:50 +00:00
Greg Lehey
6fe15bff6e Change multiline comments to start with a lone /* and end with a */,
apparently in accordance with style(9).

Complained-about-by: bde

vinumopen: Change check for root user to a call to suser(9)
vinumclose: Remove check for root user.

Nitpicked-by: phk
1999-01-29 01:16:18 +00:00
Roger Hardiman
f60cbfffac Support for MSP3410D / MSP3415D Stereo/Mono audio using the audio format
Auto Detection Mode. This leaves MSP3400C owners still unsupported.
Thanks to Gerd Knorr <kraxel@cs.tu-berlin.de> for providing some early
assistance and sample code in the linux bttv driver.
Nicolas Souchu <nsouch@freebsd.org> ported the msp_read/write/reset
functions to smbus/iicbus.

METEOR_INPUT_DEV2 now selects a composite camera on the SVIDEO port.
For true SVIDEO, use METEOR_INPUT_DEV_SVIDEO.
If you get a monochrome image from the SVIDEO port, you have
seleted the wrong input type.

Tested by:      Johan Larsson<gozer@ludd.luth.se>
1999-01-28 17:47:47 +00:00
Matthew Dillon
697457a133 Fix warnings related to -Wall -Wcast-qual 1999-01-28 17:32:05 +00:00
Matthew Dillon
5a24726ba3 Clarify the SYSINIT problem by breaking SYSINIT's up into a void *
version and a const void * version.  Currently the const void * version
    simply calls the void * version ( i.e. no 'fix' is in place ).

    A solution needs to be found for the C_SYSINIT ( etc...) family of
    macros that allows const void * without generating a warning, but
    does not allow non-const void *.
1999-01-28 17:30:51 +00:00
Roger Hardiman
ba66f0a223 Added METEOR_DEV2 and METEOR_DEV3 1999-01-28 16:32:52 +00:00
Roger Hardiman
84a3aec329 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Updated to support bt848 driver and MSP3400 audio chip.
This adds changes made in 1.4.2.1 and 1.4.2.2 from RELENG_3
1999-01-28 15:59:15 +00:00
Roger Hardiman
f8f3b24aa2 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Updated to support bt848 driver MSP34xx audio chip.
This adds changes made in 1.3.2.1 and 1.3.2.2 from RELENG_3
1999-01-28 15:56:18 +00:00
Roger Hardiman
6d076bb425 Submitted by: Nicolas Souchu <nsouch@freebsd.org>
Added support required by bt848 driver for MSP34xx audio chip
1999-01-28 15:50:24 +00:00
KATO Takenori
32373eaf9b Oops, added parentheses after `else'.
Submitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-01-28 13:32:07 +00:00
Mark Newton
27286ca9a8 Sun Bug ID 1251858 (on http://sunsolve1.sun.com) discusses the way that
Sun implemented iBCS2 compatibility on Solaris >= 2.6:  The emulator
runs in user-mode, patching the LDT so that client programs making
syscalls through the old iBCS2 call gate get handled by the emulator
process.  Unemulated syscalls therefore need their own call-gate that
bypasses the emulator.  Sun chose LDT entry 4 to implement this, which
is what we've been using as LUDATA_SEL, so we need to change LUDATA_SEL
if we want to run Solaris executables.

Discussed with: Mike Smith
1999-01-28 11:45:49 +00:00
KATO Takenori
22cd7960a2 The "easy" fixe for compiling the kernel -Wunused: remove unreferenced
local variable.
1999-01-28 11:36:22 +00:00
KATO Takenori
4d8efbff69 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1999-01-28 11:24:36 +00:00
Kazutaka YOKOTA
ffba82a9ae - Fixed the bug which always ignored Ctrl-Pause/Break on the AT 101
keyboard.
- Translate some keycode for the 84 keyboard so that the 84 keyboard
  and the 101 keyboard become more compatible in terms of keycodes.
- Updated the built-in keymaps so that it is in line with the recent
  changes in share/syscons/keymaps.
- Added some comment on the Pause/Break key on the 101 keyboard.
1999-01-28 10:55:55 +00:00
KATO Takenori
ef74e9a4eb Sync with sys/i386/isa/wd.c revision 1.187. 1999-01-28 09:21:35 +00:00
KATO Takenori
965dc9cd45 Sync with sys/i386/isa/if_ed.c revision 1.149. 1999-01-28 09:19:16 +00:00
KATO Takenori
a09bd8dae6 Sync with sys/i386/isa/diskslice_machdep.c revision 1.33. 1999-01-28 09:18:21 +00:00
KATO Takenori
3109b17f32 Sync with sys/i386/i386/userconfig.c revision 1.127. 1999-01-28 09:13:20 +00:00
KATO Takenori
9a6ef21e00 Sync with sys/i386/conf/GENERIC revision 1.144. 1999-01-28 09:12:05 +00:00
Greg Lehey
bb1d6cfa3c build_write_request: only fail if all plexes are down, instead of if
any of them are down.

Reported-by: dg
1999-01-28 07:00:55 +00:00
Greg Lehey
a1c1b26d88 Fix some format breakage before bde finds out
vinum_scandisk: check not only drive error, but also drive state,
  before accessing the drive.

drivecmp: Remove warning messages by Backing out overly constant
  declarations in revision 1.9.
1999-01-28 06:59:27 +00:00
Jordan K. Hubbard
652375d1e5 Make builtin's state-aware in loader.
Submitted by:	Daniel C. Sobral
PR:		9663
1999-01-28 06:33:03 +00:00
Justin T. Gibbs
dd3afbd452 Correct test in poll loop for determining that the mailbox is free to
accept a new command.
1999-01-28 03:30:02 +00:00
Matthew Dillon
e3870274b4 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 02:26:20 +00:00
Matthew Dillon
0a5e03dda5 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 01:59:53 +00:00
Matthew Dillon
485111b55b Fix parenthesization, but the code still looks wrong. 1999-01-28 01:33:02 +00:00
Matthew Dillon
8aef171243 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 00:57:57 +00:00
Matthew Dillon
7191deb01e Fix but in devfs_strategy(). Switch cases were falling through
instead of breaking out, so a VCHR devices would run the VCHR
    routine and then fall through and run the VBLK routine.  Fixed.
1999-01-27 23:49:45 +00:00
Matthew Dillon
fe08c21a53 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile.

    This commit includes significant work to proper handle const arguments
    for the DDB symbol routines.
1999-01-27 23:45:44 +00:00
Matthew Dillon
0bcef6efa1 Turn on -Wall and -Wcast-qual 1999-01-27 22:53:58 +00:00
Matthew Dillon
cdb96ab470 Fix nasty bug in nfs_access(). A conditional was if (a = b) instead of
if (a == b).
1999-01-27 22:45:49 +00:00
Matthew Dillon
53b3bd0e25 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 22:45:13 +00:00
Matthew Dillon
831a80b0d5 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 22:42:27 +00:00
Matthew Dillon
be317f36a9 Fix if (a = b) conditional that should have been if (a == b) 1999-01-27 22:16:46 +00:00
Matthew Dillon
39d0485c23 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 22:16:15 +00:00
Matthew Dillon
d254af07a1 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-27 21:50:00 +00:00
Matthew Dillon
598217c491 Fix array index of signed char to cast to unsigned char and then to int.
Also general const cleanup.
1999-01-27 21:36:14 +00:00
Matthew Dillon
a06791bc90 Fix getenv() comparison against '=' ... was *cp = '=' instead of
*cp == '='.
1999-01-27 21:24:50 +00:00
Matthew Dillon
b4e36adf1c Fix warnings preparing for -Wall -Wcast-qual
Also disable one usb module in LINT due to fatal compilation errors,
    temporary.
1999-01-27 20:09:21 +00:00
Matthew Dillon
d7bcbf6358 Add parens to SMBPRI, fixing bug in tsleep() call that OR's SMBPRI with
something else.
1999-01-27 19:58:53 +00:00
Matthew Dillon
a56d629240 Fix PPBPRI #define - it was missing parenthesis which messed up a
call to tsleep() in dev/ppbus/ppbconf.c.  Also fixup initializers.
1999-01-27 19:44:05 +00:00
Matthew Dillon
6a59f7d85f Fix '|' that was supposed to be '||' 1999-01-27 19:35:33 +00:00
Julian Elischer
0a702d0a28 Patch from Soeren to remove inapropriate interrupt messages
also a bit of a BDE patch in there I beleive. Backs out a fix I needed for Cyrix support
early on but it turns out that a later fix in the cyrix support made it un-needed.
1999-01-27 19:32:34 +00:00
Matthew Dillon
b28536d503 Added c_caddr_t: const char * version of the char * caddr_t, for
use in -Wall / -Wcast-qual fixes.
1999-01-27 19:01:44 +00:00
Matthew Dillon
a1c1e16ada Changes to support -Wall, -Wcast-qual. Had to make physical code changes
in db_lookup() to avoid the *cp = 0 / *cp = ':' combo ( temporary
    nul-terminate-then-restore-original ) on a const char * string.
1999-01-27 19:00:49 +00:00
Matthew Dillon
cc6e054933 Add missing declarations to fix error with LINT compile 1999-01-27 18:36:49 +00:00
Matthew Dillon
5e24f1a2f6 Remove unintended trigraph sequences in comments for -Wall 1999-01-27 18:19:53 +00:00
Eivind Eklund
8d25715cfb Add ISA PnP support, now that we have the space for it. 1999-01-27 15:34:25 +00:00
KATO Takenori
f274af0063 Clean up LD-BDN reset code(PC-98).
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1999-01-27 11:05:12 +00:00
Bruce Evans
fea579e94e Don't forget to count context switches in yield(). 1999-01-27 10:14:05 +00:00
Bruce Evans
dc34e67676 Include <sys/select.h> -- don't depend on pollution in <sys/proc.h>. 1999-01-27 10:10:03 +00:00
KATO Takenori
9e0c98036f Sync with sys/i386/isa/sio.c revision 1.225. 1999-01-27 08:26:16 +00:00
KATO Takenori
75929847ae Sync with sys/i386/conf/Makefile.i386 revision 1.138. 1999-01-27 08:25:19 +00:00
KATO Takenori
e7d91a508f Initialize the member atr_buffer.
Pointed out by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1999-01-27 08:22:08 +00:00
Julian Elischer
b5def701c7 Compile the linux module with the same flags as the kernel.
(oops).

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 21:29:01 +00:00
Bill Paul
d5901891f4 When selecting the correct EEPROM offset to use for probing the station
address, account for cards which report the Texas Instruments PCI vendor ID
in addition to Compaq and Olicom. (I don't actually have a card that
reports the TI vendor/device ID, but it appears that some Racore adapters
work this way, and failing to account for it when we have the ID listed
in the supported devices list is a bug.)
1999-01-26 15:18:26 +00:00
Kazutaka YOKOTA
6dab3d1e54 Oops, one line was accidentally commented out in the previous commit. 1999-01-26 10:00:02 +00:00
Kazutaka YOKOTA
44ad10ea41 Pull down the splash screen when someone is about to read from the
keyboard.  Do this in scread(), rather than in scopen().
1999-01-26 09:58:37 +00:00
Matthew Dillon
56319e3a58 Ok, people didn't like kern.conf_dir. Poof, backed out. 1999-01-26 07:37:11 +00:00
Peter Wemm
5581e43bbf Check if the intpm controller is configured first before stopping
recognition of the 82371AB device.
1999-01-26 04:54:38 +00:00
Steve Price
1427370d8f Add support for the USR3031 PNP modem. Also fix a minor typo since I was
here.
1999-01-26 04:02:54 +00:00
Julian Elischer
2907af2a96 Mostly remove the VM_STACK OPTION.
This changes the definitions of a few items so that structures are the
same whether or not the option itself is enabled. This allows
people to enable and disable the option without recompilng the world.

As the author says:

|I ran into a problem pulling out the VM_STACK option.  I was aware of this
|when I first did the work, but then forgot about it.  The VM_STACK stuff
|has some code changes in the i386 branch.  There need to be corresponding
|changes in the alpha branch before it can come out completely.

what is done:
|
|1) Pull the VM_STACK option out of the header files it appears in.  This
|really shouldn't affect anything that executes with or without the rest
|of the VM_STACK patches.  The vm_map_entry will then always have one
|extra element (avail_ssize).  It just won't be used if the VM_STACK
|option is not turned on.
|
|I've also pulled the option out of vm_map.c.  This shouldn't harm anything,
|since the routines that are enabled as a result are not called unless
|the VM_STACK option is enabled elsewhere.
|
|2) Add what appears to be appropriate code the the alpha branch, still
|protected behind the VM_STACK switch.  I don't have an alpha machine,
|so we would need to get some testers with alpha machines to try it out.
|
|Once there is some testing, we can consider making the change permanent
|for both i386 and alpha.
|
[..]
|
|Once the alpha code is adequately tested, we can pull VM_STACK out
|everywhere.
|

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 02:49:52 +00:00
Julian Elischer
88c5ea4574 Enable Linux threads support by default.
This takes the conditionals out of the code that has been tested by
various people for a while.
ps and friends (libkvm) will need a recompile as some proc structure
changes are made.

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 02:38:12 +00:00
Robert Nordier
ab19eb8230 Fix a couple of further bugs: missing argument to sprintf() and
"==" used for "=".
1999-01-25 23:07:02 +00:00
Nicolas Souchu
04fb1490a0 Terminate commit for the Intel PIIX4 SMBus support. Already committed files
are sys/pci/intpm*

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
1999-01-25 19:34:27 +00:00
Matthew Dillon
b1cba377b0 Add kern.conf_dir sysctl. This is a R+W string used to specify the
directory containing rc.conf.local and rc.local, and possibly other
    things in the future.

    This sysctl is used by the diskless startup code and new rc.conf.  If
    it cannot be found or is empty, the system should revert to using /etc.
1999-01-25 18:26:09 +00:00
Bill Fenner
527b7a14a5 Port NetBSD's 19990120-accept bug fix. This works around the race condition
where select(2) can return that a listening socket has a connected socket
queued, the connection is broken, and the user calls accept(2), which then
blocks because there are no connections queued.

Reviewed by:	wollman
Obtained from:	NetBSD
(ftp://ftp.NetBSD.ORG/pub/NetBSD/misc/security/patches/19990120-accept)
1999-01-25 16:58:56 +00:00
Bill Fenner
ec42cbfc24 Don't free the socket address if soaccept() / pru_accept() doesn't
return one.
1999-01-25 16:53:53 +00:00
Torsten Blum
de6f543955 Identify the TI1250 PCMCIA/CardBus bridge. It seems that it's compatible
to the TI1131. At least it works in my Compaq Armada 7800.
1999-01-25 12:59:31 +00:00
KATO Takenori
564da2b0d5 Sync with sys/i386/conf/Makefile.i386 revision 1.137. 1999-01-25 12:12:01 +00:00
Robert Nordier
5ca1fa1ed0 Correctly record the end of the a.out symbol table. In practice, a
bootinfo structure where bi_esymtab < bi_symtab was being passed
to the kernel.  In the case of older 2.x kernels, this was causing
garbage to be printed to the video console, followed by an exception.

This should resolve a problem reported on -current by Peter Jeremy
<peter.jeremy@auss2.alcatel.com.au>.
1999-01-25 10:34:35 +00:00
Doug Rabson
149a155c3b Don't try to call SYSUNINIT functions if there was a link error.
Reviewed by: Peter Wemm <peter@netplex.com.au>
1999-01-25 08:42:24 +00:00
Peter Wemm
43482c407d Force the order of the setdefs* so that make -jN doesn't build the
setdefs* multiple times at the same time that it's compiling setdefs[0].c.
I think this was leading to unterminated linker sets etc.
1999-01-25 04:08:28 +00:00
Peter Wemm
97b3f983a5 NO_LKM is no longer an option. LKM support is an option itself. 1999-01-25 03:51:51 +00:00
Nicolas Souchu
7c7545e182 SMBus support for the Intel PIIX4 power management unit. See smbus(4),
iicbus(4) and smb(4).

User programs are available to retrieve SDRAM and sensor info, contact
the author.

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reviewed by: Mike Smith <msmith@freebsd.org>
1999-01-24 18:13:31 +00:00
Matthew Dillon
2f586e1b2c Undo last commit - not a bug, just duplicate code. PG_MAPPED and
PG_WRITEABLE are already cleared by vm_page_protect().
1999-01-24 07:06:52 +00:00
Bruce Evans
73a6265d68 Go back to only supporting revoke() for bdevs and cdevs. It is very
buggy for fifos, and no one seems to have investigated its behaviour
on other types of files.  It has been broken since the Lite2 merge
in rev.1.54.

Nagged about by:	Brian Feldman (green@unixhelp.org)
1999-01-24 06:28:37 +00:00
Mike Smith
e9583ef187 From the PR:
I added a FICL_TRACE-conditioned trace facility based on "see".
It is ugly because words' functions are almost all static, and ficlExec,
where the trace has to be located, can't get their pointers. So, #ifdef
this staticization, and add most of see's body into ficlExec. Duplication
of code, uglyness, etc. But it is cleanly #ifdef'ed, and works like a
charm.

	It does not provide "step" facility, though, just trace. It is
tunable at run-time through "trace!". If anyone (most likely me :) ever
wants a step facility, I'll add it. Should be easy.

PR:		bin/9652
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:06:21 +00:00
Matthew Dillon
7dbf82dc13 Change all manual settings of vm_page_t->dirty = VM_PAGE_BITS_ALL
to use the vm_page_dirty() inline.

    The inline can thus do sanity checks ( or not ) over all cases.
1999-01-24 06:04:52 +00:00
Mike Smith
84ef5a8f66 Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.
PR:		bin/9651
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:03:44 +00:00
Matthew Dillon
68af6d169b vm_map_split() used to dirty the page manually after calling
vm_page_rename(), but never pulled the page off PQ_CACHE if it was on
    PQ_CACHE.  Dirty pages in PQ_CACHE are not allowed and a KASSERT was
    added in -4.x to test for this... and got hit.

    In -4.x, vm_page_rename() automatically dirties the page.  This commit
    also has it deal with the PQ_CACHE case, deactivating the page in that
    case.
1999-01-24 06:00:31 +00:00
Mike Smith
f7f7a5d7ab From the PR:
FICL's TYPE copies the counted string to HERE, as abial has
remarked. Answering to abial's question, this is NOT garanteed to have
enough space.
...
	We have dynamic memory. Even before memory-alloc got in, we
already had dynamic memory. Use it, then! (ficlMalloc is sysdep, so I
suppose that's why it was not used for TYPE; ficl is probably designed
to work without a working ficlFree).

Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 05:58:18 +00:00
Matthew Dillon
161a8f6519 Add vm_page_dirty() inline with PQ_CACHE sanity check 1999-01-24 05:57:50 +00:00
Greg Lehey
ac4cd383ca Correct #include in vinumioctl.c to compile correctly
without VINUMDEBUG

Submitted-by: peter
1999-01-24 05:14:39 +00:00
Matthew Dillon
257aefa704 Addendum: The original code that the last commit 'fixed' actually did
not have a bug in it, but the last commit did make it more readable so
    we are keeping it.
1999-01-24 03:49:58 +00:00
Matthew Dillon
e4542174b0 vm_pager_put_pages() is passed an rcval array to hold per-page return
values.  The 'int' return value for the procedure was never used and
    not well defined in any case when there are mixed errors on pages, so
    it has been removed.  vm_pager_put_pages() and associated vm_pager
    functions now return void.
1999-01-24 02:32:15 +00:00
Matthew Dillon
e1a4feafd0 Clear PG_MAPPED as well as PG_WRITEABLE when a page is moved to the
cache.
1999-01-24 02:29:26 +00:00
Matthew Dillon
d044d7bfb6 Added warning printf ( needs INVARIANTS ) when busy cache page is found
while trying to free memory.
1999-01-24 01:33:22 +00:00
Greg Lehey
be174c7efd Add comment indicating that the vinum pseudo-device is experimental,
and that vinum should be started as a kld.

Tripped-over-by: many people
1999-01-24 01:22:37 +00:00
Matthew Dillon
89600e8663 There was a situation where sendfile() might attempt to initiate I/O
on a PG_BUSY page, due to a bug in its sequencing of a conditional.
1999-01-24 01:15:58 +00:00
Matthew Dillon
aaba53da90 It is possible for a page in the cache to be busy. vm_pageout.c was not
checking for this condition while it tried to free cache pages.  Fixed.
1999-01-24 01:06:31 +00:00
Matthew Dillon
a7039a1d42 Add invariants to vm_page_busy() and vm_page_wakeup() to check for
PG_BUSY stupidity.
1999-01-24 01:05:15 +00:00
Matthew Dillon
c9fa34cf07 Clear PG_WRITEABLE in vm_page_cache(). This may or may not be a bug,
but the bit should definitely be cleared.
1999-01-24 01:04:04 +00:00
Matthew Dillon
8e3ad7c918 Depreciate vm_object_pmap_copy() - nobody uses it. Everyone uses
vm_object_pmap_copt_1() now, apparently.
1999-01-24 01:01:38 +00:00
Matthew Dillon
bc6d84a6a3 Get rid of unused old_m in vm_fault. Add INVARIANTS to test whether
page is still busy after all the hell vm_fault goes through.. it is
    supposed to be, and printf() if it isn't.  don't panic, though.
1999-01-24 00:55:04 +00:00
Matthew Dillon
377f9b28a6 Don't try to calculate B_CACHE for an NFS related bp that has a
> 0 b_validend.  This will screw up small-writes, causing lots of
    little writes out the network.

    We will assume that NFS handles B_CACHE properly.
1999-01-24 00:51:11 +00:00
Mike Smith
1c2587457f Document root_disk_unit 1999-01-24 00:12:17 +00:00
Mike Smith
c679ae39a8 biosdisk.c
Implement a new variable 'root_disk_unit' which supersedes
	'num_ide_disks' and makes it possible to explicitly set the
	root device unit number regardless of type considerations.

bootinfo.c
	If we can't calculate a dev_t for the root disk, complain and
	don't proceed to boot with an invalid boot device.
1999-01-24 00:12:04 +00:00
Mike Smith
5d3d992565 Fill in the bi_bios_dev field in the bootinfo struct; the loader doesn't
guess this value well in anything other than the simplest of situations.
1999-01-24 00:10:10 +00:00
Archie Cobbs
85abbaa800 Move kernel-only declarations to within #ifdef KERNEL
Prompted by:	gcc warnings when compiling /sbin/ipfw
1999-01-23 23:59:50 +00:00
Nicolas Souchu
7b7bf77e65 Replace DEBUG by PLIP_DEBUG option 1999-01-23 17:07:49 +00:00
Nicolas Souchu
ef8f762601 Add various documented ppbus options 1999-01-23 17:06:01 +00:00
Doug Rabson
8a99777019 Update the alpha port to use the new syscons.
Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly)
1999-01-23 16:53:30 +00:00
Robert Nordier
a29a298674 Fix a dot too many in path.
PR:		9445
Noticed by:	Ying-Chieh Liao <ijliao@Terry.Dorm10.NCTU.edu.tw>
1999-01-23 14:50:28 +00:00
Roger Hardiman
2c401a831e Added detection of Hauppauge IR remote control.
and MSP34xx Audio chip. Fixed i2c read error.
Hauppauge supplied details of new Tuner Types.
Added tuner type 0x1a.
Danny Braniss <danny@cs.huji.ac.il> submitted Bt878
AverMedia detection with PCI subsystem vendor id.
1999-01-23 11:32:06 +00:00
Roger Hardiman
d3697a3ac3 Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
Updated to support Hauppauge IR Remote Control
1999-01-23 11:28:16 +00:00
Kazutaka YOKOTA
fa18887740 Suppress warnings when compiling LINT. No functional change. 1999-01-23 10:55:16 +00:00
Kazutaka YOKOTA
c619f2ac1e - Remove reference to obsolete options.
- Describe options for the vga driver.
Reviewed by: bde
1999-01-23 10:51:58 +00:00
Matthew Dillon
fae1f2e045 Fix an expression parenthesization typo in a conditional. It should not
have any operational effects other then to make the code in question
     a little faster.  Also added a more involved comment.
1999-01-23 06:36:15 +00:00
Matthew Dillon
7615edaa49 Reenable John Dyson's low-memory VM_WAIT code for page reactivations out
of PQ_CACHE.  Add comments explaining what it accomplishes and its
    limitations.
1999-01-23 06:00:27 +00:00
Peter Wemm
461b36ab54 Update userref handling after discussion with submitter of previous
patch.  lf can't be dereferenced after the unload attempt, in case it
was freed.  Instead, decrement first and back it out if the unload failed.
This should be relatively immune to races caused by the user since the
userref count will be zero for the duration of the actual unloading and
will stop further kldunload attempts.

Submitted by:   Ustimenko Semen <semen@iclub.nsu.ru>
1999-01-23 03:45:22 +00:00
Peter Wemm
2c9b3ec2ff Make the -I paths closer to what happens when compiling as part of the
kernel where #include "filename.h" has been disabled.
1999-01-23 01:32:44 +00:00
Peter Wemm
e5ca2df920 Minor tweak to fix 'pseudo-device vinum'. One of these got lost before,
the other is a new file.
1999-01-23 01:29:05 +00:00
Peter Wemm
8492b0d178 Add vinumdaemon.c; sort vinum entries. 1999-01-23 01:25:59 +00:00
Peter Wemm
d2b5b9779e Oops, got my #ifdef's mixed up. Fix an unused variable warning. 1999-01-23 00:28:56 +00:00
Peter Wemm
013b59f2cb Remove stray Makefile that Greg initially imported. 1999-01-23 00:09:07 +00:00
Mike Smith
6a80a16d7d Add EXCEPTION word set.
Make TIB handling use buffer size to conform with ANS Forth.

Add ANS MEMORY-ALLOC word set.

See the PRs for extensive details.

PR:		kern/9412 kern/9442 kern/9514
Submitted by:	PRs from Daniel Sobral <dcs@newsguy.com>
1999-01-22 23:52:59 +00:00
Mike Smith
b7fd9e91ed bootstrap.h
help.common
interp.c
	Rename the 'source' command to 'include' in order to avoid conflict
	with the ANS Forth command of the same name. (kern/9473)

interp_forth.c:
	Changes from kern/9412 (EXCEPTION word), kern/9442 (TIB buffer
	sizing) and an improved version of kern/9460 (set
	version numbers).

load_aout.c:
	Trim some obsolete #if 0'ed cruft.

pnp.c:
	Tidy the pnpscan output, turn off the module scanning until we
	sort out how to do it right.

PR:		kern/9412 kern/9442 kern/9460 kern/9473
Submitted by:	PRs from Daniel Sobral <dcs@newsguy.com>
1999-01-22 23:50:14 +00:00
Peter Wemm
b7b98418bd Convert ccd to a proper module vs. something started by PSEUDO_SET(). 1999-01-22 22:38:28 +00:00
Nick Hibma
7613dbd346 add LEGSUP to uhci_dumpregs 1999-01-22 21:52:46 +00:00
Robert Nordier
9e4af42e20 Fix extraneous free() on error. 1999-01-22 21:33:52 +00:00
Robert Nordier
d0a4f5ea63 Fix read error not being detected. 1999-01-22 18:32:52 +00:00
Garrett Wollman
92af003dd8 Don't forward unicast packets received via link-layer multicast.
Suggested by: fenner
Original complaint: Shiva Shenoy <Shiva.Shenoy@yagosys.com>
1999-01-22 16:50:45 +00:00
Bill Paul
2008c8087c Multicast code isn't quite correct. The RealTek wants the upper six bits
of the CRC as the multicast hash table bit, not the lower six bits. Plus
we have to flip on all bits in the table for multicast mode.

Pointed out by: Kazushi SUGYO <k-sugyou@nwsl.mesh.ad.jp>
1999-01-22 15:25:04 +00:00
Robert Nordier
d7478bf0df Push version numbers up to 1.00. This is just intended to reflect
that the BTX code can be regarded as stable: there are no associated
code changes.

Suggested by: obrien
1999-01-22 13:07:17 +00:00
David Greenman
8ab2fa0073 Gutted softdep_deallocate_dependencies and replaced it with a panic. It
turns out to not be useful to unwind the dependencies and continue in
the face of a fatal error.
Also changed the log() to a printf() in softdep_error() so that it will
be output in the case of a impending panic.
Submitted by:	Kirk McKusick <mckusick@mckusick.com>
1999-01-22 09:07:32 +00:00
David Greenman
33ce4218c6 Don't throw away the buffer contents on a fatal write error; just mark
the buffer as still being dirty. This isn't a perfect solution, but
throwing away the buffer contents will often result in filesystem
corruption and this solution will at least correctly deal with transient
errors.
Submitted by:	Kirk McKusick <mckusick@mckusick.com>
1999-01-22 08:59:05 +00:00
Eivind Eklund
48b4c7d553 __FreeBSD_version -> 400000
Forgotten by:	Some anonymous release engineer
Reminded by:	bde
1999-01-22 08:39:58 +00:00
Nick Hibma
1f7b3fe5be forgotten in previous commit: Lowered default debug level 1999-01-22 01:02:24 +00:00
Nick Hibma
ab521a755e Fixed disconnect for umouse 1999-01-22 00:59:52 +00:00
Nick Hibma
066f67b1ac Make uhub mandatory in usb config (msmith) 1999-01-22 00:57:47 +00:00
Nick Hibma
235dddd4ea Textual changes 1999-01-22 00:51:12 +00:00
Nick Hibma
5602b5091c Fixed bug in disconnect handling in uhub.c 1999-01-22 00:44:31 +00:00
Nick Hibma
a2a2fd2ce4 Added OPTi FireLink and NEC (Toshiba and others) to OHCI ID's 1999-01-22 00:36:46 +00:00
Nick Hibma
cf4e36da61 Fixed bug that made UHCI controllers fail to start. 1999-01-21 23:31:58 +00:00
Nick Hibma
88a610db55 Cleaning up, improving _detach, removing ominous warning (msmith) 1999-01-21 23:06:02 +00:00
Nick Hibma
f8c31e6fac Added ioctl interface 1999-01-21 22:56:10 +00:00
Mike Smith
4291c3b7ad Add 'set tunables' help, list the kernel tunable values that can currently
be overridden.
1999-01-21 22:03:16 +00:00
Mike Smith
8de6e8e102 Allow VM_KMEM_SIZE to be tuned from the kernel environment. This tuning
value *completely* overrides any value precalculated by the kernel.
1999-01-21 21:54:32 +00:00
Kazutaka YOKOTA
325fca905e Add VESA mode support. If the VESA support is compiled into the kernel
or the VESA KLD is preloaded by the boot loader, you can load a 256 color
BMP file larger than 320x200.
1999-01-21 18:29:33 +00:00
Peter Wemm
17cdafdef8 Oops, I accidently had devfs enabled in the vn module.. 1999-01-21 17:23:30 +00:00
Peter Wemm
7ed6908ffd Add vn module to build list. 1999-01-21 17:19:56 +00:00
Peter Wemm
ff598d17ce Build a vn module. I've lost count of the number of times I could have
used vn but didn't have it compiled in.
1999-01-21 17:18:34 +00:00
Peter Wemm
b453f58fcc Convert vn.c into a module (loadable and static). 1999-01-21 17:17:02 +00:00
Peter Wemm
334fab0d48 Typo: s/mdev/bdev/, added in rev 1.47 (must fix in RELENG_3 too) 1999-01-21 16:15:53 +00:00
Peter Wemm
a102abb259 Typo: s/bpreassignbuf/pbreassignbuf/ so the prototype matches it's function 1999-01-21 13:41:12 +00:00
Matthew Dillon
04d986a5fc Mainly changes to support the new swapper. The big adjustment is that
swap blocks are now in PAGE_SIZE'd increments instead of DEV_BSIZE'd
    increments.  We still convert to DEV_BSIZE'd increments for the
    backing store I/O, but everything else is in PAGE_SIZE increments.
1999-01-21 10:17:12 +00:00
Matthew Dillon
aa91dfc69b Move many of the vm_pager_*() functions from vm_pager.c to inlines in
vm_pager.h
1999-01-21 10:15:47 +00:00
Matthew Dillon
f85f2fa903 Move many of the vm_pager_*() functions from vm_pager.c to inlines in
vm_pager.h

     Added argument to getpbuf() and relpbuf() to allow each subsystem to
     specify a different hard limit on the number of simultanious physical
     bufferes that said subsystem may allocate.  Without this feature, one
     subsystem ( e.g. the vfs clustering code ) could hog *ALL* the pbufs,
     causing a deadlock in the pager in a low memory situation.

     Same for trypbuf().
1999-01-21 10:15:24 +00:00
Matthew Dillon
a489f7614b Reorganized some of the low memory testing code to make it more useful.
Removed call to vm_object_collapse(), which can block.  This was being
    called without the pageout code holding any sort of reference on the
    vm_object or vm_page_t structures being manipulated.  Since this code
    can block, it was possible for other kernel code to shred the state
    the pageout code was assuming remained intact.

    Fixed potential blocking condition in vm_pageout_page_free() ( which
    could cause a deadlock in a low-memory situation ).

    Currently there is a hack in-place to deal with clean filesystem meta-data
    polluting the inactive page queue.  John doesn't like the hack, and neither
    do I.

    Revamped and commented a portion of the pageout loop.

    Added protection against potential memory deadlocks with OBJT_VNODE
    when using VOP_ISLOCKED().  The problem is that vp->v_data can be NULL
    which causes VOP_ISLOCKED() to return a less informed answer.

    remove vm_pager_sync() -- none of the pagers use it any more ( the old
    swapper used to.  The new one does not ).
1999-01-21 10:12:54 +00:00
Matthew Dillon
41dbefba28 The TAILQ hashq has been turned into a singly-linked=list link,
reducing the size of vm_page_t.

    SWAPBLK_NONE and SWAPBLK_MASK are defined here.  These actually are
    more generalized then their names imply, but their placement is somewhat
    of a legacy issue from a prior test version of this code that put
    the swapblk in the vm_page_t structure.  That test code was eventually
    thrown away.  The legacy remains.

    Added vm_page_flash() inline.  Similar to vm_page_wakeup() except that
    it does not clear PG_BUSY ( one assumes that PG_BUSY is already clear ).
    Used by a number of routines to wakeup waiters.

    Collapsed some of the code in inline calls to make other inline calls.
    GCC will optimize this well and it reduces duplication.

    vm_page_free() and vm_page_free_zero() inlines added to convert to
    the proper vm_page_free_toq() call.

    vm_page_sleep_busy() inline added, replacing vm_page_sleep() ( which has
    been removed ).  This implements a much more optimizable page-waiting
    function.
1999-01-21 10:06:24 +00:00
Matthew Dillon
060282de8a The hash table used to be a table of doubly-link list headers ( two
pointers per entry ).  The table has been changed to a singly linked
    list of vm_page_t pointers.  The table has been doubled in size, but
    the entries only take half the space so a net-zero change in memory use.

    The hash function has been changed, hopefully for the better.  The
    combination of the larger hash table size of changed function should
    keep the chain length down to a reasonable number (0-3, average 1).

    vm_object->page_hint has been removed.  This 'optimization' was not
    only never needed, but costs as much as a hash chain link to implement.
    While having page_hint in vm_object might result in better locality
    of reference, the cost is not worth the space in vm_object or the
    extra instructions in my view.

    vm_page_alloc*() functions have been inlined and call a generalized
    non-inlined vm_page_alloc_toq() which combines the standard alloc
    and zero-page alloc functions together, reducing code size and the L1
    cache footprint.  Some reordering has been done... not much.  The
    delinking code should be faster ( because unlinking a doubly-linked list
    requires four memory ops and unlinking a singly linked list only requires
    two ), and we get a hash consistancy check for free.

    vm_page_rename() now automatically sets the page's dirty bits.

    vm_page_alloc() does not try to manually inline freeing a cache page.
    Instead, it now properly calls vm_page_free(m) ... vm_page_free() is
    really too complex to manually inline.

    vm_await(), supporting asleep(), has been added.
1999-01-21 10:01:49 +00:00
Matthew Dillon
48f1335479 The vm_object structure is now somewhat smaller due to the removal
of most of the swap-pager-specific fields, the removal of the id,
    and the removal of paging_offset.

    A new inline, vm_object_pip_wakeupn() has been added to subtract an
    arbitrary number n from the paging_in_progress count and then wakeup
    waiters as necessary.  n may be 0, resulting in a 'flash'.
1999-01-21 09:51:21 +00:00
Matthew Dillon
7bc9e80ecc object->id was badly implemented. It has simply been removed.
object->paging_offset has been removed - it was used to optimize a
    single OBJT_SWAP collapse case yet introduced massive confusion throughout
    vm_object.c.  The optimization was inconsequential except for the
    claim that it didn't have to allocate any memory.  The optimization
    has been removed.

    madvise() has been fixed.  The old madvise() could be made to operate
    on shared objects which is a big no-no.  The new one is much more careful
    in what it modifies.  MADV_FREE was totally broken and has now been fixed.

    vm_page_rename() now automatically dirties a page, so explicit dirtying
    of the page prior to calling vm_page_rename() has been removed.
1999-01-21 09:46:55 +00:00
Matthew Dillon
e4ba1db60a Objects associated with raw devices are no longer counted in the VM stats
total because they may contain absurd numbers ( like the size of all
    of physical memory if you mmap() /dev/mem ).
1999-01-21 09:41:52 +00:00
Matthew Dillon
81522c62fa General cleanup related to the new pager. We no longer have to worry
about conversions of objects to OBJT_SWAP, it is done automatically
    now.

    Replaced manually inserted code with inline calls for busy waiting on
    pages, which also incidently fixes a potential PG_BUSY race due to
    the code not running at splvm().

    vm_objects no longer have a paging_offset field ( see vm/vm_object.c )
1999-01-21 09:40:48 +00:00
Matthew Dillon
1d58b2bc7d Potential bug fix, do not just clear PG_BUSY... call vm_page_wakeup()
instead to properly handle any waiters.

    Added comments, added support for M_ASLEEP.  Generally treat M_ flags
    as flags instead of constants to compare against.
1999-01-21 09:38:20 +00:00
Matthew Dillon
6de6079300 Removed low-memory blockages at fork. This is the wrong place to put
this sort of test.  We need to fix the low-memory handling in general.
1999-01-21 09:36:23 +00:00
Matthew Dillon
4c23ae0916 Mainly cleanup. Removed some inappropriate low-memory handling code
and added lots of comments.  Add tie-in to vm_pager ( and thus the
    new swapper ) to deallocate backing swap for dirtied pages on the fly.
1999-01-21 09:35:38 +00:00
Matthew Dillon
9f6fed9017 The default_pager's interaction with the swap_pager has been reorganized,
and the swap_pager has been completely replaced.

    The new swap pager uses the new blist radix-tree based bitmap allocator
    for low level swap allocation and deallocation.   The new allocator
    is effectively O(5) while the old one was O(N), and the new allocator
    allocates all required memory at init time rather then at allocate
    memory on the fly at run time.

    Swap metadata is allocated in clusters and stored in a hash table,
    eliminating linearly allocated structures.

    Many, many features have been rewritten or added.  Swap space is now
    reallocated on the fly providing a poor-mans auto defragmentation of
    swap space.  Swap space that is no longer needed is freed on a timely
    basis so no garbage collection is necessary.

    Swap I/O is marked B_ASYNC and NFS has been fixed to do the right
    thing with it, so NFS-based paging now has around 10x the performance
    as it did before ( previously NFS enforced synchronous I/O for paging ).
1999-01-21 09:33:07 +00:00
Matthew Dillon
50c7d0d513 Added support for VOP_FREEBLKS(), reducing MFS's impact on swap and
increasing performance by deallocating at least some of the backing
    store when files are removed.

    Protect mfsp->buf_queue access at splbio().
1999-01-21 09:27:03 +00:00
Matthew Dillon
3fe2487dfc Access to mfsp->buf_queue must be protected at splbio(). Other minor
adjustments also made, such as passing mfsp to mfs_doio() directly.
1999-01-21 09:24:46 +00:00
Eivind Eklund
053a2b61f7 Move EXT2FS to be more visible, and give it a description. Also make
the text from my last commit somewhat better.
1999-01-21 09:24:28 +00:00
Matthew Dillon
fa70685a6c Renamed M_KERNEL to a more appropriate M_USE_RESERVE. 1999-01-21 09:23:21 +00:00