Commit Graph

6121 Commits

Author SHA1 Message Date
Bruce Evans
a1971699ac Fixed lots of warnings from gcc-2.7.x about "left-hand operand of
comma expression has no effect" in the MAKE_SET() macro.  This also
fixes compiling with -O3 (which removes static functions unless
there is a suitable reference to them).  Declaring all the static
symbols as __unused would also fix the warning, but would be bogus
(they are used) and wouldn't fix -O3.  However, the dummy pointers
for the references waste about 1.5K text and 20K symbol space for
GENERIC.  This wastage hasn't changed - the dummy pointers are just
nonzero now.
1996-09-20 14:36:14 +00:00
David Greenman
eadd5e3a24 Fixed a bug in the receive buffer allocation code that resulted in a
panic if an mbuf cluster couldn't be allocated. This was caused by a
failure to re-initialize m_data when the old mbuf/mbcluster was recycled.
1996-09-20 11:05:39 +00:00
Paul Traina
9c4b2574d4 Handle ICMP codes defined in RFC1812 more appropriately 1996-09-20 08:23:54 +00:00
Nate Williams
d977b72dbd Whoops, I should've used the LINT config file. More ts -> tv changes
for timespec structure.
1996-09-20 05:56:36 +00:00
Nate Williams
95a1574e4f Whoops, I should've used the LINT config file. More ts -> tv changes
for timespec structure.
1996-09-20 05:51:12 +00:00
David Greenman
3163485ccc Add back shutdown support, this time using the at_shutdown() mechanism. 1996-09-20 04:35:15 +00:00
David Greenman
4a684684f4 When the devconf stuff was ripped out of the kernel, the ripper neglected
to deal with the fact that we relied on devconf to do the shutdown
callouts in various drivers. The changes in this commit are to add support
for device shutdown in this driver via the new at_shutdown() mechanism.
Similar changes need to be made to all of the other drivers that need
a shutdown routine called (if_de.c comes to mind immediately).
1996-09-20 04:11:53 +00:00
John Dyson
08c2c9ddf5 Fix an spl window, a page manipulation at interrupt time that was
incorrect, and correct the support for B_ORDERED.  The spl window
fix was from Peter Wemm, and his questions led me to find the problem with
the interrupt time page manipulation.
1996-09-20 02:26:35 +00:00
Poul-Henning Kamp
e6c4b9ba32 Add the utrace(caddr_t addr,size_t len) syscall, that will store the
data pointed at in a ktrace file, if this process is being ktrace'ed.
I'm using this to profile malloc usage.
The advantage is that there is no context around this call, ie, no
open file or socket, so it will work in any process, and you can
decide if you want it to collect data or not.
1996-09-19 19:49:13 +00:00
Nate Williams
030e2e9ebb In sys/time.h, struct timespec is defined as:
/*
         * Structure defined by POSIX.4 to be like a timeval.
         */
        struct timespec {
                time_t  ts_sec;         /* seconds */
                long    ts_nsec;        /* and nanoseconds */
        };

        The correct names of the fields are tv_sec and tv_nsec.

Reminded by:	James Drobina <jdrobina@infinet.com>
1996-09-19 18:21:32 +00:00
David Greenman
cd6eea255f Fixed bug with reversed trunc/round_page() in madvise...start must be
trunced, end must be rounded.
1996-09-19 10:12:41 +00:00
David Greenman
f9be9005ce Implemented a better, dynamic, mechanism for adjusting the transmit
threshold.
1996-09-19 09:15:20 +00:00
Poul-Henning Kamp
a6e173ca49 Various de-bogotifications of userconfig. 1996-09-19 08:32:37 +00:00
Poul-Henning Kamp
e8993539b8 Add APM_IDLE_CPU option, that is off by default.
I maintain that it saves more power to simply "hlt" the CPU than to
spend tons of time trying to tell the APM bios to do the same.
In particular if you do it 100 times a second...
1996-09-19 08:28:16 +00:00
Paul Traina
0570e4476a Add a new sysctl variable kern.sominqueue to override the MINIMUM queue
specified in a listen(2) system call.
1996-09-19 00:54:36 +00:00
David Greenman
7af18210c3 Increased transmit threshold to 1024 bytes to fix a problem with underruns
on machines with poor PCI performance.
1996-09-18 16:18:05 +00:00
John Dyson
f9da2540d2 Add needed spl protection, and some minor cleanups in vfs_vmio_release.
Submitted by:	Peter Wemm <peter@spinner.dialix.com> and me.
1996-09-18 15:57:41 +00:00
David Greenman
40e4ce5ab9 Updated driver to a newer version from Matt Thomas, preserving our local
changes. This version should fix a number of bugs such as with auto-
speed sensing and at least one known panic.

Submitted by:	Matt Thomas (matt@3am-software.com)
1996-09-18 14:44:31 +00:00
Steven Wallace
b3618bcf57 .TARGETOBJDIR has been removed from make and CANONICALOBJDIR set in
bsd.obj.mk.  Also, a make target called objwarn checks to see
if ${.OBJDIR} != ${.CURDIR} and ${.OBJDIR} != ${CANONICALOBJDIR}
and outputs a warning.  (No warning for the latter if MAKEOBJDIR or MAKEOBJDIRP
REFIX is set).  objwarn is called from all targets in bsd.prog.mk, bsd.kmod.mk,
and bsd.lib.mk.

Reviewed by:	bde
1996-09-18 06:09:19 +00:00
Peter Wemm
7b8830a51e Argh, I have had one "uid 0 on /: file system full" too many. The problem
is that it doesn't say _what_ did it! (the core dumped console message
is very useful for listing the process name and pid).  This adds similar
information.
1996-09-17 14:38:16 +00:00
Rodney W. Grimes
7ccde0654a Re-enable conf82371fb2 now that I have verified that it works, even if
it only prints 2 bits out of hundreds.  (Minimizing the diff between
-head and 2.1.5.)
1996-09-16 08:56:39 +00:00
Poul-Henning Kamp
1e882d2791 Fix something that has annoyed me since day one of userconfig: when the
<More> prompt receives a 'q', just abandon the list, the user wants out.
1996-09-15 19:35:23 +00:00
Bruce Evans
dd106ca742 Removed iprintf(). It was copied to db_iprintf() in ddb. 1996-09-15 11:24:21 +00:00
Bruce Evans
c7c34a24a3 Attached vm ddb commands show map', show vmochk', `show object',
`show vmopag', `show page' and `show pageq'.  Moved all vm ddb stuff
to the ends of the vm source files.

Changed printf() to db_printf(), `indent' to db_indent, and iprintf()
to db_iprintf() in ddb commands.  Moved db_indent and db_iprintf()
from vm to ddb.

vm_page.c:
Don't use __pure.  Staticized.

db_output.c:
Reduced page width from 80 to 79 to inhibit double spacing for long
lines (there are still some problems if words are printed across
column 79).
1996-09-14 11:54:59 +00:00
Bruce Evans
831031ce00 Attached simple external ddb commands show rtc', show pgrpdump'
and `show cbstat'.  The pgrpdump code was previously controlled by
`#ifdef DEBUG'.
1996-09-14 10:53:48 +00:00
Bruce Evans
6337f4efa8 Support statically attaching of ddb commands in non-ddb modules.
The details are hidden in the DB_COMMAND(cmd_name, func_name) and
DB_SHOW_COMMAND(cmd_name, func_name) macros.  DB_COMMAND() adds to
the top-level ddb command table and DB_SHOW_COMMAND adds to the
`show' subtable.  Most external commands will probably be `show'
commands with no side effects.  They should check their pointer
args more carefully than `show map' :-), or ddb should trap internal
faults better (like it does for memory accesses).

The vm ddb commands are temporarily unattached.

ddb.h:
Also declare `db_indent' and db_iprintf() which will replace vm's
`indent' and iprintf().
1996-09-14 09:13:15 +00:00
Bruce Evans
2e82980a4c Moved instantiation of `poff' to sys.c. It is no longer used in disk.c.
Saved a few bytes by copying `dosdev' and/or `name' to local variables.
This optimization (for dosdev) was done in one place before but this
was lost in the devread() cleanup.   This optimization (for dosdev)
can almost be done by bogusly declaring dosdev as const, but gcc still
often space-pessimizes code like the following:

	extern const int dosdev; ... foo(dosdev); bar(dosdev);

gcc often doesn't bother to copy dosdev to a temporary local because
the local would have to be preserved in memory across the call to
foo().  OTOH, for

	extern int dosdev; ... auto int dosdev_copy = dosdev; ...
		foo(dosdev_copy); bar(dosdev_copy);

the copy must be made because foo() might alter dosdev.
1996-09-14 07:41:00 +00:00
Bruce Evans
310abe0579 Removed declarations of recently deleted variables and cleaned up
#includes.
1996-09-14 07:38:14 +00:00
Bruce Evans
d154cceba7 Potentially saved a whole 4 bytes and reduced bogusness by eliminating
the pointer to the string "/kernel".  This pointer was once only
statically to once save space, but it has had to be dynamically
initialized for some time, so the static initialization just wastes
space.  The string gets moved to the text section, so the actual
savings may be negative due to padding.
1996-09-14 07:12:02 +00:00
John Dyson
8fdfa820e4 Clean up some more problems with freeing busy or wired pages. The
vfs_bio code was not waiting properly for page state until manipulating
it.
1996-09-14 04:40:33 +00:00
Bruce Evans
a7f8f2ab55 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
1996-09-14 04:31:09 +00:00
Bruce Evans
4fab2f9bc7 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

pcvt_drv.c:
Partially fixed pccncheckc().  It returned a boolean value instead of
the character that it fetches from the input fifo (if any).  I think
it still discards characters after the first for multi-char input.
1996-09-14 04:30:32 +00:00
Bruce Evans
daed6ffd24 Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.

syscons.c:
Added missing spl locking in sccncheckc().  Return the same value as
sccngetc() would.  It is wrong for sccngetc() to return non-ASCII, but
stripping the non-ASCII bits doesn't help.
1996-09-14 04:27:46 +00:00
Bruce Evans
40b55a34ae Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
1996-09-14 04:25:32 +00:00
Bruce Evans
8b3fb3e16d Removed another devconf leftover. A fat devconf support function was
still being used just to support printing of the device name in the
probe.  Restored the method used in rev.1.6 and changed it to print
the same strings as the previous revision.

Reviewed by:	Paul Richards
1996-09-14 01:26:16 +00:00
Bruce Evans
d966b8d1c4 Fixed Id. 1996-09-14 01:04:18 +00:00
Paul Traina
561c2ad31c Move TCPCTL_KEEPINIT to end of MIB list (sigh) 1996-09-13 23:54:03 +00:00
Paul Traina
7b40aa327d Make the misnamed tcp initial keepalive timer value (which is really the
time, in seconds, that state for non-established TCP sessions stays about)
a sysctl modifyable variable.

[part 1 of two commits, I just realized I can't play with the indices as
 I was typing this commit message.]
1996-09-13 23:51:44 +00:00
Paul Traina
7ff19458de Receipt of two SYN's are sufficient to set the t_timer[TCPT_KEEP]
to "keepidle".  this should not occur unless the connection has
been established via the 3-way handshake which requires an ACK

Submitted by:	jmb
Obtained from:	problem discussed in Stevens vol. 3
1996-09-13 18:47:03 +00:00
Bruce Evans
fc0b1dbf68 Don't use __dead in the kernel. It was an obfuscation for gcc >= 2.5
and a no-op for gcc >= 2.6.
1996-09-13 09:20:15 +00:00
Bruce Evans
c254b6e8db Made debugging code (pmap_pvdump()) compile again so that I can test LINT.
I don't know if it actually works.
1996-09-13 07:10:00 +00:00
Bruce Evans
fddbd6ddb8 Removed another devconf leftover.
Fixed a new #include style bug.
Removed an unused #include.
1996-09-13 06:48:21 +00:00
Bruce Evans
5a175c1c5d Don't compile a 256-byte unused table in the pca driver.
The other 256-byte table in ulaw.h still gets duplicated if both
pca and snd are configured.
1996-09-13 06:29:30 +00:00
Bruce Evans
cefdbb0448 Added undocumented option SPX_HACK. 1996-09-13 05:54:39 +00:00
John Dyson
9fc1279b79 A modification that allows the driver strategy to modify the
B_ASYNC flag broke things pretty bad (freeing buffer already on
queue or other wierd buffer queue errors.)  The broken code is
left in commented out, but this makes the problem go away for
now.
1996-09-13 03:15:45 +00:00
Satoshi Asami
07aacf5723 Back out typo introduced by latest commit.
Corrected by:	Michio "Karl" Jinbo <karl@marcer.nagaokaut.ac.jp>
1996-09-12 11:36:09 +00:00
Satoshi Asami
0e408c25a1 Another round of merge/update.
(1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic
(2) Move PC98 specific code out of cpufunc.h (to pc98.h)
(3) Let the boot subtrees look more alike

Submitted by:	The FreeBSD(98) Development Team
		<freebsd98-hackers@jp.freebsd.org>
1996-09-12 11:12:18 +00:00
John Dyson
dba940b46e Primarily a fix so that pages are properly tracked for being
modified.  Pages that are removed by the pageout daemon were
the worst affected.  Additionally, numerous minor cleanups,
including better handling of busy page table pages.  This
commit fixes the worst of the pmap problems recently introduced.
1996-09-12 04:54:55 +00:00
Bruce Evans
caa05533fb Added a struct tag `fsid' for fsid_t so that sysproto.h can declare
prototypes for the lfs syscalls without having to include <sys/mount.h>
and its nested spam.
1996-09-12 03:16:34 +00:00
Poul-Henning Kamp
96fc6efbe3 Make userconfig two (default: on) options:
USERCONFIG to enable
	VISUAL_USERCONFIG to get the gui stuff too.
Requested by: pst
1996-09-11 19:53:45 +00:00