Commit Graph

709 Commits

Author SHA1 Message Date
Bruce Evans
d14122ea44 Fixed staticization of DDB functions. 1995-12-14 23:01:51 +00:00
Bruce Evans
47daf5d5d6 Nuked ambiguous sleep message strings:
old:				new:
	netcls[] = "netcls"		"soclos"
	netcon[] = "netcon"		"accept", "connec"
	netio[] = "netio"		"sblock", "sbwait"
1995-12-14 22:51:13 +00:00
Bruce Evans
947803d7d8 Restored unused function ttrstrt(). It would be used if the low level
drivers supported inter-character delays.
1995-12-14 22:32:52 +00:00
Peter Wemm
b1529bda75 GENERIC/LINT: Remove redundant quoting on some option lines.
LINT: add a couple of new/missing/undocumented options
files.i386: add linux code so that you can compile a kernel with static
linux emulation ("options LINUX")
i386/*: use #if defined(COMPAT_LINUX) || defined(LINUX) to enable static
support of linux emulation (just like "IBCS2" makes ibcs2 static)

The main thing this is going to make obvious, is that the LINUX code
(when compiled from LINT) has a lot of warnings, some of which dont look
too pleasant..
1995-12-14 14:35:36 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
Poul-Henning Kamp
87b6de2b76 A Major staticize sweep. Generates a couple of warnings that I'll deal
with later.
A number of unused vars removed.
A number of unused procs removed or #ifdefed.
1995-12-14 08:32:45 +00:00
Poul-Henning Kamp
5e46340891 Make math_emulators LKMable. 1995-12-14 08:21:33 +00:00
Julian Elischer
6ba9ebce28 devsw tables are now arrays of POINTERS to struct [cb]devsw
seems to work hre just fine though  I can't check every file
that changed due to limmited h/w, however I've checked enught to be petty
happy withe hte code..

WARNING... struct lkm[mumble] has changed
so it might be an idea to recompile any lkm related programs
1995-12-13 15:13:57 +00:00
John Dyson
1cdb60485c Fix a problem that was caused by new (partial) support for merged cache
metadata and VBLK type devices.  The code is currently mostly disabled,
and a work-around has been added to disabled attempted clustered writes
for VBLK type device buffers.  Clustered write of meta-data is currently
a work in progress.
1995-12-13 03:47:01 +00:00
John Dyson
beb2f78fb0 This should have fixed some conditions that could cause the
"getblk" hang.  The B_WANTED flag was being cleared gratuitously,
also the optimization of gbincore for ignoring the B_INVAL flag was
incorrect.  There is no place in the code where buffers are on the
hash list that are B_INVAL and not B_BUSY.
1995-12-12 04:18:10 +00:00
John Dyson
a316d390bd Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
Bruce Evans
c73feca0b7 Removed new alias d_size_t for d_psize_t.
Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
1995-12-10 15:55:34 +00:00
Poul-Henning Kamp
154c04e573 Last commit this round: Staticize.
we are now down to about 1146 symbols being global, of which
I estimate that about 100 are validly so.
1995-12-10 13:45:30 +00:00
Poul-Henning Kamp
7dfe504fe2 Remove various unused symbols and procedures. 1995-12-09 20:40:43 +00:00
Poul-Henning Kamp
162a9e8732 Move sysctl machdep.consdev to cons.c 1995-12-09 20:39:47 +00:00
Peter Wemm
1ed012f969 Reorganise ps_strings in order to gain BSD/OS 2.0 binary compatability.
This is now in line with NetBSD as well..

Note that once this series of commits is finished, you must recompile
libkvm, then ps and maybe 'w'.  If you are running the recently imported
sendmail-8.7, you should recompile that too (src/conf.c at least).
1995-12-09 04:29:11 +00:00
Poul-Henning Kamp
d2f265fab8 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
David Greenman
efeaf95a41 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
Bruce Evans
2baeef32b6 Removed unnecessary #includes of vm stuff. Most of them were once
prerequisites for <sys/sysctl.h>.

subr_prof.c:
Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
1995-12-06 23:37:44 +00:00
Bruce Evans
40560c4471 Don't #include vm stuff in vnode_if.[ch]. Enough vm stuff (a
single typedef) is now declared in <sys/types.h>.

This is the first of 4 commits that will remove some excessive
includes of vm*.h and user.h.  The total speed improvement isn't
as large as I first thought.  `make depend; make' for LINT only
improved from 2180 seconds to 2108 seconds user time.
1995-12-06 23:33:39 +00:00
Poul-Henning Kamp
65d0bc1387 A couple of minor tweaks to the sysctl stuff. 1995-12-06 13:27:39 +00:00
Bruce Evans
4cb03b1b55 Include <vm/vm.h> or <vm/vm_page.h> explicitly to avoid breaking when
vnode_if.h doesn't include vm stuff.
1995-12-05 21:51:45 +00:00
Poul-Henning Kamp
946bb7a268 A major sweep over the sysctl stuff.
Move a lot of variables home to their own code (In good time before xmas :-)

Introduce the string descrition of format.

Add a couple more functions to poke into these marvels, while I try to
decide what the correct interface should look like.

Next is adding vars on the fly, and sysctl looking at them too.

Removed a tine bit of defunct and #ifdefed notused code in swapgeneric.
1995-12-04 16:48:58 +00:00
Jordan K. Hubbard
f205c88775 Close PR: kern/865
Submitted by:	Juergen Lock <nox@jelal.hb.north.de>
1995-12-04 02:26:53 +00:00
Bruce Evans
fb98064487 Oops, the last commit left a redundant declaration. 1995-12-03 18:00:35 +00:00
Bruce Evans
98d938220c Completed function declarations and/or added prototypes. 1995-12-02 18:58:56 +00:00
Bruce Evans
d841aaa740 Finished (?) cleaning up sysinit stuff. 1995-12-02 17:11:20 +00:00
Bruce Evans
7ee050b70c Staticized.
Added prototypes.
1995-12-02 16:32:03 +00:00
Julian Elischer
ee0bc7c399 I fixed this before than committed it on my machine and not on freefall.
(window confusion)
1995-12-02 13:08:20 +00:00
Julian Elischer
9fd7da5843 Submitted by: Heikki Suonsivu
Made the pty devices creates in devfs match the present MAKEDEV naming
1995-12-02 07:30:19 +00:00
Julian Elischer
e7a301c64f Submitted by: jb@cimlogic.com.au (John Birrell)
Obtained from:  NetBSD as well (He submitted it there too)

make sure that teh shm region is beyond the sum of the text and data segs
as it was big progs could collide with the shm region.
1995-11-30 07:58:50 +00:00
Julian Elischer
de1676f933 A pair of really tiny patches that not only allow it all to compile
but also IT ACTUALLY WORKS!
FreeBSD with options  JREMOD now runs with no entries in the devsw tables
prior to the devices puting their own entries there..

Thanks to bde and terry for thoughts and comments.
next stop 'Real' devfs support in devices.
1995-11-30 05:59:09 +00:00
Garrett Wollman
8e050b2e86 Disallow LKM manipulations when in seure mode.
Noticed by: bde
1995-11-29 17:45:59 +00:00
Julian Elischer
7198bf4725 If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
Julian Elischer
adb2dc299a #ifdef out nearly the entire file of conf.c when JREMOD is defined
add a few safety checks in specfs because
now it's possible to get entries in [cd]devsw[] which are ALL NULL
so it's better to discover this BEFORE jumping into the d_open() entry..

more check to come later.. this getsthe code to the stage where I
can start testing it, even if I haven't caught every little error case...
I guess I'll find them quick enough..
1995-11-29 12:38:49 +00:00
Poul-Henning Kamp
2d0b1d708c A test was backwards.
Noticed by:	Cheng, Hsiao-Yang <sycheng@cis.ufl.edu>
1995-11-29 11:28:00 +00:00
Julian Elischer
53ac6efbd8 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
Bruce Evans
43cbfcb357 Removed all #includes of the unused file <sys/device.h>. 1995-11-28 07:29:59 +00:00
Peter Wemm
6884d2aae7 Implement read/write to kernel space - I use this for a self-loading/
self-decompressing ram disk that I'm fiddling with..

(Note, this depends on the various syscalls having correctly set uio_segflag
 before calling physio - I've checked and they look correct.)
1995-11-28 02:40:38 +00:00
John Dyson
dc4a0cee58 Update the wd.c driver to use the new TAILQ scheme for device
buffer queue.  Also, create a new subroutine 'tqdisksort' that
is an improved version of the original disksort that also uses
TAILQs.
1995-11-23 07:24:41 +00:00
Poul-Henning Kamp
4b2af45f4b Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
1995-11-20 12:42:39 +00:00
Poul-Henning Kamp
48cee07655 Put cbstat() under #ifdef DDB 1995-11-20 12:15:45 +00:00
Poul-Henning Kamp
78535df223 Remove unused var. 1995-11-20 12:14:40 +00:00
Poul-Henning Kamp
a5d3a44198 Close the "unused" warning for things in linker-sets.
This will also allow us to catch typos in the setname by running a
nm through a grep.
1995-11-20 12:08:08 +00:00
John Dyson
fec16d9994 Yet another small block FS bug fix. 1995-11-20 04:53:45 +00:00
John Dyson
10c8eaff67 Fix more clustering bugs for FSes with block sizes < PAGE_SIZE. 1995-11-20 03:55:48 +00:00
John Dyson
fb9ca17e1e Changed an incorrect splhigh to splbio. 1995-11-19 20:42:25 +00:00
John Dyson
5fe17eeb8a General fixes to the vfs clustring code:
1) Make cluster buffer list be a non-malloced chain.  This eliminates
yet another 'evil' M_WAITOK and generally cleans up the code.
2) Fix write clustering for ext2fs.  It was just broken.  Also, ffs
clustering had an efficiency problem that more bawrites were happening
than should have been.
3) Make changes to buf.h to support the above, plus remove b_pfcent
at the request of David Greenman.
Reviewed by: davidg (partially)
1995-11-19 19:54:31 +00:00
Bruce Evans
0808c591da Fixed settimeofday():
- don't allow invalid timevals.
- normalize timevals as they are built - don't call timevaladd() with
  a possibly invalid timeval and normalize the result.

Fixed a warning.
1995-11-19 00:59:22 +00:00