Commit Graph

568 Commits

Author SHA1 Message Date
John Dyson
164fd96f34 These changes fix a bug in the clustering code that I made worse when adding
support for EXT2FS.  Note that the Sig-11 problems appear to be caused by
this, but there is still probably an underlying VM problem that let this
clustering bug cause vnode objects to appear to be corrupted.

The direct manifestation of this bug would have been severely mis-read
files.  It is possible that processes would Sig-11 on very damaged
input files and might explain the mysterious differences in system
behaviour when phk's malloc is being used.
1995-09-23 21:12:45 +00:00
Bruce Evans
c1b0bf4649 Update machine-generated files. 1995-09-19 13:56:09 +00:00
Bruce Evans
d60a9ca6ab Oops. Avoid literal $Id in an awk string to stop cvs from substituting it. 1995-09-19 13:50:26 +00:00
Bruce Evans
3cb43dbdaf Generate prototypes for syscall-implementing functions. Put them in
<sys/sysproto.h> and use them (so far only) in kern/init_sysent.c.

Don't put $Id in generated files.

kern/syscalls.master:
I had to add some new fields to describe some non-orthogonal names.
E.g., the args struct for the syscall-implementing function foo()
is usually named `foo_args', but for getpid() it is named `args'.

sys/sysent.h:
sy_call_t is still incomplete to hide a couple of warnings.
1995-09-19 13:31:04 +00:00
Bruce Evans
04cc52dfc3 Don't clear the session pointer in ptcclose(). It must be left alone
until the session leader exits so that a SIGHUP gets sent to the process
group and the pty slave gets revoked.
1995-09-19 12:26:47 +00:00
Bruce Evans
191e1a59da Remove transitory labelling code. Labels are now handled by essentially
the original 4.4lite code.  Machine Specific Partitions are now handled
separately.
1995-09-16 17:04:06 +00:00
Bruce Evans
5e3e8d2b88 Generate prototypes for VOP functions. I decided to keep the old-style
definitions even though the functions are inline.  If vnode_if.h was
compiled by a non-ANSI compiler, then `inline' would be defined away,
so vnode_if.h might compile correctly.
1995-09-11 16:05:16 +00:00
Bruce Evans
e7451974bb Make pcvt and syscons live in the same kernel. If both are enabled, then
the first one in the config has priority.  They can be switched using
userconfig().

i386/i386/conf.c:
Initialize the shared syscons/pcvt cdevsw entry to `nx'.

Add cdevsw registration functions.

Use devsw functions of the correct type if they exist.

i386/i386/cons.c:
Add renamed syscons entry points to constab.

i386/i386/cons.h:
Declare the renamed syscons entry points.

i386/i386/machdep.c:
Repeat console initialization after userconfig() in case the current
console has become wrong.  This depends on cn functions not wiring down
anything important.

sys/conf.h:
Declare new functions.

i386/isa/isa.[ch]:
Add a function to decide which display driver has priority.  Should be
done better.

i386/isa/syscons.c:
Rename pccn* -> sccn*.

Initialize CRTC start address in case the previous driver has moved it.

i386/isa/syscons.c, i386/isa/pcvt/*
Initialize the bogusly shared variable Crtat dynamically in case the
stored value was changed by the previous driver.

Initialize cdevsw table from a template.

Don't grab the console if another display driver has priority.

i386/isa/syscons.h, i386/isa/pcvt/pcvt_hdr.h:
Don't externally declare now-static cdevsw functions.

i386/isa/pcvt/pcvt_hdr.h:
Set the sensitive hardware flag so that pcvt doesn't always have lower
priority than syscons.  This also fixes the "stupid" detection of the
display after filling the display with text.

i386/isa/pcvt/pcvt_out.c:
Don't be confused the off-screen cursor offset 0xffff set by syscons.

kern/subr_xxx.c:
Add enough nxio/nodev/null devsw functions of the correct type for syscons
and pcvt.
1995-09-10 21:36:12 +00:00
Bruce Evans
f2cb5630d0 cons.c:
Split off cdevsw initialization in cninit() into a new function
cninit_finish() that isn't called until all hardware device drivers
have been attached.  The bdevsw entry of the driver for the physical
console needs to be hooked after the physical driver has been
attached in case the attachment modified the entry.

Rearrange cninit() to avoid changing cn_tab until the driver for the
physical console has been initialized, so that the previous driver
(if any) can be used for debugging.

Start removing half-baked lint support.  bdevsw functions usually have
unused args but /*ARGSUSED*/ was used for only about 5% of them.

cons.h:
Declare cn_init_finish().

autoconf.c:
Call cn_init_finish().

Start adding prototypes.  Functions with bogus linkage (extern where
static is probably should be static) are explicitly declared as extern
so that the can be found easily (extern in a non-header is usually
wrong).

All:
Continue cleaning up init stuff: init functions shall be static;
INITs should be at the start of files...
1995-09-10 18:57:26 +00:00
Bruce Evans
e7c89b42c5 Fix wakeups for TIOCDRAINWAIT. The conditional wakeups introduced in rev
1.59 defeated the point of doing the wakeups (having reduced timeouts
take effect immediately).
1995-09-10 11:48:13 +00:00
David Greenman
4590fd3a2a Fixed init functions argument type - caddr_t -> void *. Fixed a couple of
compiler warnings.
1995-09-09 18:10:37 +00:00
David Greenman
1984b014a0 Fix my copyright. 1995-09-08 13:24:33 +00:00
Bruce Evans
6003967057 Fix benign type mismatches in devsw functions. 82 out of 299 devsw
functions were wrong.
1995-09-08 11:09:15 +00:00
Nate Williams
4756154a9e Removed unused local variable from shutdown_nice() 1995-09-06 15:23:20 +00:00
John Dyson
c83ebe7781 Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block count
for VOP_BMAP.  Updated affected filesystems...
1995-09-04 00:21:16 +00:00
John Dyson
41db6f5f99 VOP_BMAP will eventually need an additional argument, but not yet. This
backs out that modification to minimize the window during which this
is not yet correct.
1995-09-03 20:32:52 +00:00
John Dyson
8c601f7da8 Improvements to the cluster code, minor vfs_bio efficiency:
Better performance -- more aggressive read-ahead
	under certain circumstanses.

	Mods to support clustering on small
	( < PAGE_SIZE) block size filesystems (e.g. ext2fs,
	msdosfs.)
1995-09-03 19:56:15 +00:00
Julian Elischer
8af5d536ff devfs changes..
changes to allow devices that don't probe (e.g. /dev/mem)
to create devfs entries
this required giving 'configure' its own SYSINIT entry
so we could duck in just before it with a DEVFS init
and some device inits..
my devfs now looks like:
./misc
./misc/speaker
./misc/mem
./misc/kmem
./misc/null
./misc/zero
./misc/io
./misc/console
./misc/pcaudio
./misc/pcaudioctl
./disks
./disks/rfloppy
./disks/rfloppy/fd0.1440
./disks/rfloppy/fd1.1200
./disks/floppy
./disks/floppy/fd0.1440
./disks/floppy/fd1.1200
also some sligt cleanups.. DEVFS needs a lot of work
but I'm getting back to it..
1995-09-03 05:43:50 +00:00
John Dyson
5dce41c5a5 Increase the size of the pipe buffer as denoted by PIPSIZ from
4k to 8k.  This has a significant effect on the pipe performance.  In
the future it might be good to increase this to 16k.  PIPSIZ is now
tunable for experimentation.
1995-08-31 01:39:31 +00:00
Bruce Evans
088f73968c Fix several sysinit functions that had the wrong type and unnecessarily
external linkage.

Remove useless comments saying that SYSINIT() does system initialization.

shm.c:
Remove nearly useless comment that gave wrong pseudo-prototypes.
1995-08-30 00:33:02 +00:00
Bruce Evans
41a93c86d6 Fix benign type mismatch in a sysinit function arg. 1995-08-30 00:17:18 +00:00
Bruce Evans
9ef6c28ae2 Fix benign type mismatches and nested extern declarations in new sysinit
code.

Fix old and new missing prototypes.
1995-08-29 23:59:22 +00:00
Bruce Evans
5c7761b2af kmstartup had the wrong type and unnecessarily external linkage for a
sysinit function.

subr_prof.c:
Remove useless comment.
1995-08-29 03:09:14 +00:00
Bruce Evans
4bb0ce8ce3 Fix correct_writedisklabel() and writedisklabel(). Their setting of
bp->b_flags has been broken for many years:
a) they didn't set B_BUSY for doing i/o.  This has been fatal since
   1995/07/25 when biodone() started checking that B_BUSY is set.
b) they didn't set B_INVAL for releasing the buffer.  This at best
   just put a useless buffer in the LRU queue for a little while.

Fix a couple of spelling errors and complete a couple of function
pointer declarations.
1995-08-28 16:09:11 +00:00
Julian Elischer
2b14f991e6 Reviewed by: julian with quick glances by bruce and others
Submitted by:	terry (terry lambert)
This is  a composite of 3 patch sets submitted by terry.
they are:
New low-level init code that supports loadbal modules better
some cleanups in the namei code to help terry in 16-bit character support
some changes to the mount-root code to make it a little more
modular..

NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able
to test those cases..

certainly mounting root of disk still works just fine..
mfs should work but is untested. (tomorrows task)

The low level init stuff includes a total rewrite of init_main.c
to make it possible for new modules to have an init phase by simply
adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can
be added to the kernel without editing any other files other than the
'files' file.
1995-08-28 09:19:25 +00:00
Bruce Evans
430179f0c3 Don't compile the diagnostic functions vhold() and holdrele() unless
DIAGNOSTIC is defined.
1995-08-25 20:49:44 +00:00
Bruce Evans
5e319b84a1 Remove extra arg from one of the calls to (*pr_usrreq)(). 1995-08-25 20:27:46 +00:00
Bruce Evans
e3546115f3 Call nosys() from lkmnosys() with the correct number and type of args
instead of with none.  The first (struct proc *) arg is used if lkmnosys()
if is actually called.

Implement lkmnosys() with the correct number and type of args so that
the first of them can be used and the others won't need to be fixed
lated.
1995-08-25 20:03:02 +00:00
David Greenman
9f95e53cff Another minor optimization, this time to incore(). 1995-08-24 13:59:14 +00:00
David Greenman
ff3aaf2582 Minor optimization. 1995-08-24 13:28:16 +00:00
David Greenman
229296b0cf Killed some gratuitous #include's. 1995-08-24 12:54:11 +00:00
David Greenman
c0e5de7d88 Moved setting of VTEXT flag into the appropriate image activators. This
fixes a bug where linux binaries would get the flag set inappropriately.
1995-08-24 10:32:37 +00:00
Doug Rabson
27df97742b Add support for amd direct maps.
Reviewed by:	Thomas Graichen <graichen@sirius.physik.fu-berlin.de>
1995-08-24 10:17:39 +00:00
Jordan K. Hubbard
215b0e62d5 Don't clip d_ncylinders to value used by partitions. 1995-08-23 11:43:45 +00:00
Jordan K. Hubbard
b8ef36f62e Properly initialize the d_ncylinders field to the maximum number of
cylinders.
1995-08-23 10:41:57 +00:00
David Greenman
4219d2b2ac A couple of micro optimizations to improve NULL syscall performance by
about 2%.
1995-08-21 18:06:48 +00:00
David Greenman
cd92a6182d Call boot() instead of cpu_reset() if init isn't running in shutdown_nice. 1995-08-20 04:42:25 +00:00
Bruce Evans
cf2455a3ec The cred' and proc' args were missing for some VOP_OPEN() and VOP_CLOSE()
calls.

Found by: gcc -Wstrict-prototypes after I supplied some of the 5000+
missing prototypes.  Now I have 9000+ lines of warnings and errors
about bogus conversions of function pointers.
1995-08-17 11:53:51 +00:00
Bruce Evans
bf25be48a5 Make everything except the unsupported network sources compile cleanly
with -Wnested-externs.
1995-08-16 16:14:28 +00:00
David Greenman
628641f8a6 Converted mountlist to a CIRCLEQ.
Partially obtained from: 4.4BSD-Lite2
1995-08-11 11:31:18 +00:00
David Greenman
b4c196550c Move mbuf frees to after call to sorflush().
Submitted by:	Matt Dillon
1995-08-08 02:22:16 +00:00
David Greenman
74ca9fa64f On closer inspection, it turns out that all of the callers of disksort
are already at splbio()...so back out the last change to disksort.
1995-08-07 14:20:27 +00:00
David Greenman
5d210d3fd4 Since buffers can be pulled off of the disk queue at interrupt time and
disksort is called at non-interrupt time and can be actively traversing
the list when that happens, there is a very small window of vulnerability.
Close it by protecting disksort with splbio().
1995-08-07 11:55:32 +00:00
David Greenman
b4224c9c6c Woops, I committed the wrong version of the diff in the last rev. 1995-08-07 08:40:49 +00:00
David Greenman
6c8897cf98 Made msgbuf range checking more robust and clean. 1995-08-07 07:58:23 +00:00
David Greenman
02d5c7b197 Restore check for msg_bufx being negative. Changed if() expression to be
in Lite2 style.
1995-08-06 22:00:17 +00:00
Joerg Wunsch
352abcd4a7 Extentd David's recent change to shutdown_nice() by calling
cpu_reset() directly in case init(8) is *not* running.
1995-08-06 19:45:34 +00:00
David Greenman
d63abe4172 Resize both VMIO and non-VMIO buffers if the size changes. 1995-08-06 12:10:39 +00:00
Andrey A. Chernov
e581051d3d Preserve current termios speed for TIOCSET*, if it matched with
nearest valid. It means that gtty+stty transaction (without speed
change) not breaks non-standard speeds now.
1995-08-02 12:53:14 +00:00
Andrey A. Chernov
4e5f73581c Better approximation for TIOCGETP (gtty) for non-standard speeds.
Old variant returns 38400 for them, now it returns nearest matched
rounded down, expect speeds in range 0 > speed < 50 rounded up
to not produce hangup.
1995-08-02 12:03:12 +00:00