Commit Graph

5684 Commits

Author SHA1 Message Date
Bruce Evans 5d1999ec59 Synced with Makefile.i386: added -Wunused. 1996-06-17 15:11:10 +00:00
Bruce Evans 43be698cb6 Moved initialization of defaults for the label for the whole disk from
disklabel(8) to the kernel (dsopen()).  Drivers should initialize the
hardware values (rpm, interleave, skews).  Drivers currently don't do
this, but it usually doesn't matter since rotational position stuff is
normally disabled.
1996-06-17 14:43:54 +00:00
Bruce Evans 7d64a7fe80 Added support for TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Original version by John Hay.

Simplified timestamp code by reading the time exactly when necessary.
This may slow down the interrupt handler with extra calls to microtime(),
but only in bad configurations - the input fifo should normally be
disabled if timestamps on input are being used, since otherwise the
timestamp won't be precisely associated with any particular input event.
The interrupt handler remains slowed down by one test and branch for
each input (and now DCD change) event - avoiding this is not practical
yet.

The simplifications also fixed:
- timestamps for input sometimes being clobbered by output and modem
  status interrupts.
- valid timestamps not being available unless the port is configured with
  vector siointrts.  siointrts no longer exists.
- compiler warnings about siointr* in some configurations.

Simplified timestamp and probe code by depending on recent changes in
microtime() and DELAY() to preserve the interrupt enable flag.
1996-06-17 14:23:39 +00:00
Bruce Evans 99450dcc1d Added TIOCDCDTIMESTAMP (enable/get timestamp of last DCD rise).
Reformatted FreeBSD additions in a consistent style.
1996-06-17 13:08:09 +00:00
Bruce Evans 16263f7a8b In getit(), use read_eflags()/write_eflags() to preserve the interrupt
enable flag instead of enable_intr() to restore it to its usual state.
getit() is only called from DELAY() so there is no point in optimising
its speed (this wasn't so clear when it was extern), and using
enable_intr() made it inconvenient to call DELAY() from probes that need
to run with interrupts disabled.
1996-06-17 12:50:22 +00:00
Bruce Evans b7911dc3bb In microtime(), use pushfl/popfl to preserve the interrupt enable flag
instead of sti to it restore to its usual state.  pushfl/popfl is
actually faster in protected mode on Pentiums (4+3 cycles instead of 9),
and using sti made it extremely inconvenient to call microtime() from
fast interrupt handlers.  pushfl/popfl is a couple of cycles slower than
sti on 486's and a couple more cycles slower on 386's, but the relative
cost of using it is not large since microtime() has to use slow i/o
instructions on the old cpus.
1996-06-17 12:43:04 +00:00
John Dyson 23fd45be00 Disable direct writes for non-blocking output. 1996-06-17 05:15:01 +00:00
John Dyson ef743ce6ed Several bugfixes/improvements:
1) Make it much less likely to miss a wakeup in vm_page_free_wakeup
	2) Create a new entry point into pmap: pmap_ts_referenced, eliminates
	   the need to scan the pv lists twice in many cases.  Perhaps there
	   is alot more to do here to work on minimizing pv list manipulation
	3) Minor improvements to vm_pageout including the use of pmap_ts_ref.
	4) Major changes and code improvement to pmap.  This code has had
	   several serious bugs in page table page manipulation.  In order
	   to simplify the problem, and hopefully solve it for once and all,
	   page table pages are no longer "managed" with the pv list stuff.
	   Page table pages are only (mapped and held/wired) or
	   (free and unused) now.  Page table pages are never inactive,
	   active or cached.  These changes have probably fixed the
	   hold count problems, but if they haven't, then the code is
	   simpler anyway for future bugfixing.
	5) The pmap code has been sorely in need of re-organization, and I
	   have taken a first (of probably many) steps.  Please tell me
	   if you have any ideas.
1996-06-17 03:35:40 +00:00
Alexander Langer 6875d5c1b3 Fix chain numbering bug when the highest line number installed >= 65435
and the rule being added has no explicit line number set.

Submitted by:	Archie Cobbs <archie@whistle.com>
1996-06-17 00:00:35 +00:00
John Dyson b5b40fa62b Various bugfixes/cleanups from me and others:
1) Remove potential race conditions on waking up in vm_page_free_wakeup
   by making sure that it is at splvm().
2) Fix another bug in vm_map_simplify_entry.
3) Be more complete about converting from default to swap pager
   when an object grows to be large enough that there can be
   a problem with data structure allocation under low memory
   conditions.
4) Make some madvise code more efficient.
5) Added some comments.
1996-06-16 20:37:31 +00:00
Joerg Wunsch 9306343284 Explain the options for the `od' driver. 1996-06-16 20:04:47 +00:00
Joerg Wunsch c30bc9dba0 Miscellaneous cleanup and minor fixes by Shunsuke and by me.
. use new-style options
. introduce an option OD_AUTO_TURNOFF
. try to use the native geometry as reported by the drive instead of
  a faked on -- MOs do have a ``classical'' geometry
. make the scsi_start_unit() actually working
. some cosmetic fixes

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-06-16 19:58:24 +00:00
Joerg Wunsch bf3b9d70ed Make sure to update the SDEV_MEDIA_LOADED flag also when working on
the control device.

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-06-16 19:54:02 +00:00
Peter Wemm bde5e68a33 Fix cut/paste error; a read-only variable should have been read/write. 1996-06-16 13:32:16 +00:00
Gary Palmer 75cc5f07de Cosmetic change: make the ``ready to run'' line match the
``ready for devices'' printed out earlier by changing `devs '
to be `DEVFS: '
1996-06-15 20:37:22 +00:00
Peter Wemm 4a32095f34 A small bit of defensive programming in case the panic is during process
exit and cleanup.  the 'ps' command assumes that there are always 'nproc'
processes on the lists and will walk off the end without checking if not,
causing ddb to trap during the 'ps' command.
1996-06-15 07:08:02 +00:00
Nate Williams 771acaaa0a Whoops, I accidentally deleted a necessary ":" which is part of the
parameters to printf() using the "D" format.  (Why this even worked on
my box during testing I don't know, but as soon as I powered it on/off
it quite working.)
1996-06-15 00:43:03 +00:00
David Greenman 664275648a Move a case of PG_MAPPED being set before a pmap_enter(). This will likely
make no difference, but it will make it consistent with other uses of
PG_MAPPED.
1996-06-14 23:26:40 +00:00
Nate Williams 333f7d7bb6 At long last, we know have support for the 3C589 in a FreeBSD release
using the existing files using the existing PCCARD support.  Now that
this is in place I would like to fixup the PCCARD hooks and remove the
if_zp driver.  At this point, we support everything we used to support
*AND MORE* with the PCCARD code.

Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp> (via the Nomad release)

[ This works on both my 3C589B and 3C589C ]
1996-06-14 22:11:38 +00:00
Nate Williams 8ca7c1c4a0 Better code for switching the ethernet transceiver.
My 3C509B-COMBO works fine with the following patch. Switching between
UTP and BNC is quite easy. (Just type 'ifconfig ep0 link1 -link2' or 'ifconifg
ep0 link2 -link1'.)

[ I tested this with the additional PC-CARD patches and it works on both
connectors on my 3C589B and 3C589C ]

Reviewed by:	nate
Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp>
1996-06-14 21:28:35 +00:00
Garrett Wollman bd22f58e11 This is the `netkey' kernel key-management service (the PF_KEY analogue
to PF_ROUTE) from NRL's IPv6 distribution, heavily modified by me for
better source layout, formatting, and textual conventions.  I am told
that this code is no longer under active development, but it's a useful
hack for those interested in doing work on network security, key management,
etc.  This code has only been tested twice, so it should be considered
highly experimental.

Obtained from: ftp.ripe.net
1996-06-14 17:22:18 +00:00
Garrett Wollman 51fb392203 Better selection of initial retransmit timeout when no cached
RTT information is available.

Submitted by: kbracey@art.acorn.co.uk (Kevin Bracey)
(slightly modified by me)
1996-06-14 17:17:32 +00:00
Poul-Henning Kamp 5b28a6011f Fix for NFS_NOSERVER
Poul mentioned that he thought this was some kind of timing problem, and
that started me thinking. After a little poking around, I found that
nfs_timer() was completely disabled when NFS_NOSERVER was #defined.
But after looking at nfs_timer(), it seemed like it was something
required by both the client and server code, and disabling it outright
just didn't seem to make any sense. Parts of it relate only to the
NFS server side code, so I disabled those, but I re-enabled the rest
of the function and made sure that it would be called from nfs_init()
(in nfs_subs.c).

With nfs_timer() re-enabled, everything seems to work again. The only
other changes I made were to #ifdef away some variable declarations
in the NFS_NOSERVER case so that gcc would stop complaining about
unused variables.

Reviewed by:	phk
Submitted by:	Bill Paul <wpaul@skynet.ctr.columbia.edu>
1996-06-14 11:13:21 +00:00
Satoshi Asami 33fef343f9 Oops, forgot to delete some garbage from working code. 1996-06-14 11:10:19 +00:00
Satoshi Asami ad63a118b2 The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.

Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 11:02:28 +00:00
Satoshi Asami 4c7278c696 The PC98-specific files.
Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 10:04:54 +00:00
Satoshi Asami f7ef42a091 Document LINT.
Reminded by:	jkh, j, bde
1996-06-14 09:42:52 +00:00
David Greenman 0648f71275 Updated this driver to a newer version from Matt. This should fix several
bugs related to support of dc21041 chips and other problems.

Submitted by:	Matt Thomas <matt@3am-software.com>
1996-06-14 05:25:32 +00:00
Stefan Eßer 21219d2116 Change CONF1_ENABLE_MSK to 0x7ff00000 in another attempt to decide
whether a system could possibly support PCI configuration mechanism 1
(or whether it rather is an EISA only system ...).
1996-06-13 21:50:41 +00:00
Gary Palmer 5d2541dab0 Don't try to include opt_ipfw.h in LKMs
Submitted by:	Ollivier Robert <roberto@keltia.freenix.fr>
1996-06-13 17:35:28 +00:00
Satoshi Asami d7629dff3b A fast memory copy for Pentiums using floating point registers.
It is called from copyin and copyout.

The new routine is conditioned on I586_CPU and I586_FAST_BCOPY, so you
need

options "I586_FAST_BCOPY"

(quotes essenstial) in your kernel config file.

Also, if you have other kernel types configured in your kernel, an
additional check to make sure it is running on a Pentium is inserted.
(It is not clear why it doesn't help on P6s, it may be just that the
 Orion chipset doesn't prefetch as efficiently as Tritons and friends.)

Bruce can now hack this away. :)
1996-06-13 07:17:21 +00:00
David Greenman 34bed8b0ee Keep ether_type in network order for BPF to be consistent with other
systems.

Submitted by:	Ted Lemon, Matt Thomas, and others. Retrofitted for
		-current by me.
1996-06-13 02:54:19 +00:00
Nate Williams a136e00402 Only print out the new masks if bootverbose is set. 1996-06-12 20:07:09 +00:00
Gary Palmer 74a9466cc2 Convert ipfw to use opt_ipfw.h 1996-06-12 19:34:33 +00:00
Gary Palmer a614bfe060 Since the updates to ifnet.if_lastchange are so rare (relatively
speaking), go for the extra accuracy and call microtime() to get
the current time.

Pointed Out By:		bde
1996-06-12 19:24:03 +00:00
Joerg Wunsch 6b1d48f79c Externalize the declaration of dc_list. This is required in order to
get a ``generic'' kernel (``config kernel swap generic'') to compile.
1996-06-12 15:10:30 +00:00
John Dyson 419702a468 Fix a very significant cnt.v_wire_count leak in vm_page.c, and some
minor leaks in pmap.c.  Bruce Evans made me aware of this problem.
1996-06-12 06:52:12 +00:00
Gary Palmer a01e62f093 Add -Wunused to try and catch any future offenders
Reviewed by:	bde
1996-06-12 05:54:46 +00:00
Gary Palmer c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Gary Palmer 1409e0b384 Clean up -Wunused warnings. Julian asked me to just ifdef
out unused code as this is still work in progress.

Reviewed by:		bde
1996-06-12 05:08:34 +00:00
Gary Palmer 10a466c7d3 Clean up -Wunused warnings. Also clean up a -Winline warning while here.
Reviewed by:		bde
1996-06-12 05:04:51 +00:00
Gary Palmer 7b3628096c Clean up -Wunused warnings.
Reviewed by:	 Greg Ungerer <gerg@stallion.oz.au>
1996-06-12 04:26:36 +00:00
John Dyson 5fcf66debe Fix some serious errors in vm_map_simplify_entries. 1996-06-12 04:03:21 +00:00
Satoshi Asami d02dcfb382 Add ccd. 1996-06-12 03:49:35 +00:00
Satoshi Asami 8bbe70f4a7 A Makefile for a ccd lkm. You need to explicitly /sbin/modload it for
now.  Someday I'll add a hook to ccdconfig to do it automatically.
1996-06-12 03:49:15 +00:00
David Greenman 2f9bae59d6 Moved the fsnode MALLOC to before the call to getnewvnode() so that the
process won't possibly block before filling in the fsnode pointer (v_data)
which might be dereferenced during a sync since the vnode is put on the
mnt_vnodelist by getnewvnode.

Pointed out by Matt Day <mday@artisoft.com>
1996-06-12 03:37:57 +00:00
David Greenman 74ae43213c Moved the fsnode MALLOC to before the call to getnewvnode() so that the
process won't possibly block before filling in the fsnode pointer (v_data)
which might be dereferenced during a sync since the vnode is put on the
mnt_vnodelist by getnewvnode.
1996-06-12 03:36:23 +00:00
Nate Williams 22ceda90c7 Fixed GET/SETIPDOMAIN ioctl on /dev/socksys, which is used by various
other socket functions (gethostname() for one).

Reviewed by:	sef
1996-06-12 01:10:26 +00:00
John Dyson dc48d43a6c Properly lock the vm space when accessing the memory in a process. This
fix could solve some "interesting" problems that could happen during
process rundown.
1996-06-11 23:52:27 +00:00
John Dyson 47dcd2e56c Change the symbol name used in the last commit from USRSTACK to
VM_MAXUSER_ADDRESS.  Even though they are the same, the new name
is more descriptive.
1996-06-11 23:50:48 +00:00