Commit Graph

1602 Commits

Author SHA1 Message Date
Bruce Evans
2c305bdb3c Nuke the losing version of microtime. The assembler version now works
for all reasonable HZ's.  HZ > 1000 doesn't work because of sloppy
conversions in hzto() (division by (tick / 1000) == 0).  This was
fixed in 1.1.5.

Eliminate some extern declarations by including the appropriate header
files that now contain appropriate declarations.
1994-11-06 01:33:03 +00:00
Bruce Evans
94096616ab Public function declarations moved to <machine/npx.h>. 1994-11-06 00:58:06 +00:00
Bruce Evans
5eb4d8cfd4 Abort writes if a signal is received (don't ignore the value returned by
tsleep()).  Try `dd if=/dev/zero of=/dev/pcaudio bs=640k count=1'.  The
write takes a few hundred seconds to drain, and if it is killed by a
signal, it still takes a few hundred seconds to drain and all of those
seconds are spent busy-waiting.

Clean up includes and declarations.  Remove bogus casts of args to
timeout functions.
1994-11-06 00:46:21 +00:00
Bruce Evans
4a7472ce04 The style in my patch011 is inconsistent and out of date. It should
have been changed _before_ committing the patch.
1994-11-06 00:30:16 +00:00
Bruce Evans
2f31d30b01 Work around microtime() enabling interrupts. 1994-11-06 00:23:45 +00:00
Bruce Evans
a3b33372b9 Maintain a new variable `timer0_overflow_threshold' so that microtime()
doesn't have to calculate it every call.

Rename `timer0_prescale' to `timer0_prescaler_count' and maintain it
correctly.  Previously we lost a few 8253 cycles for every "prescaled"
clock interrupt, and the lossage grows rapidly at 16 KHz.  Now we
only lose a few cycles for every standard clock interrupt.

Rename `*_divisor' to `*_max_count'.

Do the calculation of TIMER_DIV(rate) only once instead of 3 times each
time the rate is changed.

Don't allow preposterously large interrupt rates.  Bug fixes elsewhere
should allow the system to survive rates that saturate the system, however.

Clean up declarations.

Include <machine/clock.h> to check our own declarations.
1994-11-05 23:55:07 +00:00
Bruce Evans
ae406484f0 Fix a bug introduced between 1.1 and 1.1.5. Loading the time was moved
outside the critical region.

Make it work with 2.0.  It wasn't designed to be called at splclock().

Make it work with prescaling.  The overflow threshold was bogus.

Make it work for any HZ.  Side effect of fixing prescaling.

Speed it up.  Allocate registers better.  Reduce multiplication and
division to multiplication and a shift.  Speed is now 5-6 usec on a
486DX/33, was about 3 usec more.

Optimize for the non-pentium case.  The pentium code got moved around
a bit and hasn't been tested.

Change #include's to 2.0 style.
1994-11-05 23:53:46 +00:00
Bruce Evans
a1ca704e29 Declare all functions exported by the npx driver.
Uniformize idempotency ifdefs.
1994-11-05 22:59:09 +00:00
Bruce Evans
65af765646 Declare the full uglyness of the interfaces to the clock driver (except
things declared in machine-independent files).
1994-11-05 22:51:17 +00:00
Bruce Evans
c342b9faa3 Disable the direct call from hardclock() to softclock(). Support
for it is incomplete and buggy.  There is no problem unless Xintr0()
is reentered or should be reentered, but high clock interrupt
frequencies for pcaudio cause Xintr0() to be reentered (or clock
ticks to be lost when Xintr0() should have been reentered but
wasn't), and we lose little by delaying the call to softclock().

Move declarations related to the clock driver to clock.h.

Move declarations related to the npx driver to npx.h.

Clean up the remaining declarations.
1994-11-05 22:44:34 +00:00
Andrey A. Chernov
c897ebc21a Change -O2 to -O
With each gcc version -O2 can cause absolutely unpredicatable things
Second stage boot still fits in allowed size
1994-11-05 21:06:16 +00:00
Jordan K. Hubbard
2405ced306 Argh! Missing quotes. 1994-11-05 07:41:08 +00:00
Jordan K. Hubbard
4525c93ebf We need CD9660 and MSDOS filesystems built-in if the floppy is to have
a hope of getting at these types of filesystems without dragging all
the LKM stuff in.
1994-11-05 07:38:50 +00:00
David Greenman
c4a7b7e10c From tim@cs.city.ac.uk (Tim Wilkinson):
Find enclosed a short bugfix to get the union filesystem up and running
in FreeBSD-current.  We don't think we've got all the problems yet but
these fixes sort out the major ones (which mostly concert bad locking
of vnodes), no doubt we'll post others as necessary.  Known problems
include the inability of the umount command (not the system call) to unmount
unions in certain circumstances (this is due the way "realpath" works),
and the failure of direntries to always get all available files in
unioned subdirectories.  We are, as they say, working on it.

Submitted by:	tim@cs.city.ac.uk (Tim Wilkinson)
1994-11-04 14:41:46 +00:00
Poul-Henning Kamp
5ffd7168ce Last commit was bogus. Changed b_bsize to b_bcount. 1994-11-04 05:21:17 +00:00
Jordan K. Hubbard
fb59d6ab65 __386BSD__ -> __FreeBSD__
I know that many of these entries are bogus and need to be revisited,
but let's get the tree working again for now and then do a pass through
looking at all the __FreeBSD__ entries, shall we?
1994-11-04 02:14:13 +00:00
David Greenman
fb21f2fe90 Backed out mbuf performance improvement. mbufs are allocated with various
different types, and with the 'local cache', what is freed isn't necessarily
what was originally malloced. This screws malloc's statistics and type
allocation limits, resulting eventually in a deadlock when one of the
limits is bogusly reached. Recent performance tests on a Pentium machine
indicate no improvement with this optimization anyway (this is something
to be looked at further).
1994-11-04 00:28:38 +00:00
Garrett Wollman
df00058df7 Fix off-by-one error reported to NetBSD by Karl Fox in
<9411031449.AA11102@gefilte.MorningStar.Com>.
1994-11-03 21:04:21 +00:00
Joerg Wunsch
f73af18476 |Both, the wd and the sd driver do not reject invalid request of odd
|sizes. They simply pass them to the disks, which usually causes
|fatal errors then.
1994-11-03 18:20:15 +00:00
Paul Traina
c7aed1527d Assign character device 20 to be the user reserved device. 1994-11-03 17:49:01 +00:00
Jordan K. Hubbard
b851eb1523 Eliminate USERCONFIG. This option is now standard. 1994-11-03 15:51:38 +00:00
Jordan K. Hubbard
8cf0da9ceb Unconditionalize USERCONFIG. Uh, thanks, David. 1994-11-03 14:57:54 +00:00
Andrey A. Chernov
5a3391bf7f Fix for 'pstat -t' works on vtys
Submitted by: jhay@mikom.csir.co.za
1994-11-03 11:41:34 +00:00
Jordan K. Hubbard
f7f7fee018 Whoops - make sure TRUE and FALSE are defined now. 1994-11-03 05:02:41 +00:00
Jordan K. Hubbard
906c074f8d Add extra id_enabled flag for userconfig to manipulate. If id_enabled
is FALSE, the device will not be probed.  id_enabled is TRUE by default.
1994-11-03 04:15:04 +00:00
Jordan K. Hubbard
be4bdae3ac Make the enable & disable commands finally work. 1994-11-03 04:14:23 +00:00
Gary Palmer
97555463a4 Cosmetic changes in comment at start (it's no longer a GENERICAH config
file!)
1994-11-03 01:46:59 +00:00
Garrett Wollman
bb0135e920 Completely replace JTW's idea with my (incompletely implemented) original
idea.  This is les likely to crash your machine.  As before, this code is only
enabled under `options IN_RMX'.
1994-11-03 01:05:34 +00:00
Garrett Wollman
f084e01477 Collapse two fields so that we have space for another 32 flags.
NB: You will have to recompile programs which use the `rt_use' member in
order to get the correct values.  This should not cause incorrect operation,
but the statistics may look a little confusing.
1994-11-03 01:04:32 +00:00
Stefan Eßer
66da596420 Submitted by:
Added hooks for "lsdev" ...
PCI devices should need no individual code for lsdev.
1994-11-02 23:47:14 +00:00
Stefan Eßer
1b851d5210 Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de>
Modifications required for PCI support.
1994-11-02 23:44:11 +00:00
Jordan K. Hubbard
0729dc4924 Whoops. When you `ls' a kernel with lots and lots of devices, guess what?
It scrolls off your screen! :-)  Add crude "more" type processing.
1994-11-02 09:30:27 +00:00
Jordan K. Hubbard
5e235068bc Back out Joerg's latest commit. Sorry, Joerg, but this breaks the install
floppies now.  I'm not sure why, but things hang when it gets to the
`changing root to fd0c' part.  Without your latest commit, everything works
fine.  Maybe you can figure out what you broke after ALPHA! :)
1994-11-02 09:08:40 +00:00
Garrett Wollman
d4a8d8f240 This is the file that actually implements the smarter behavior. 1994-11-02 04:42:14 +00:00
Garrett Wollman
5c2dae8edc Add code to be a bit smarter about IP routes, conditioned on the option
IN_RMX.  (Eventually this will be standard, but I just wrote the code today
and don't want to break anyone.)
1994-11-02 04:41:39 +00:00
Garrett Wollman
d29895dc1a Fix Jordan's misplaced IPFIREWALL option. Fix style of other previous commits.
Document ARP_PROXYALL.
1994-11-02 01:11:03 +00:00
Garrett Wollman
ac234f9399 Clean up ARP error messages: format IP addresses, explain arplookup()
failures in English.
1994-11-02 00:58:29 +00:00
Garrett Wollman
d9e91095ab Forward-declare a few structures to avoid warning messages. 1994-11-02 00:11:00 +00:00
Bruce Evans
f23c6e08df Fix a very old, very stupid race clearing the mask bit for the current
interrupt.  Other bits in imen and icu+1 are volatile.

INTREN() and INTRDIS() in icu.h need to be changed similarly.

Change #include's to 2.0 style.
1994-11-01 23:29:50 +00:00
Bruce Evans
25dd4b72b8 Only log errors every second (instead of every 5-10 msec) and check for
errors at a lower ipl.  clist starvation problems can cause hundreds of
tty buffer overflows per second and logging them all amplified the
problems.  This problem was less serious in 1.1.5.

Avoid a race in the check for starting a new block of output.  com_events
was sometimes messed up and siopoll() looped endlessly.  This bug was
introduced in 2.0.

Clean up previous 2 commits.  Rename sio_registerdev() to sioregisterdev()
to match the (bad) surrounding naming conventions.  There should be a
generic_registerdev().
1994-11-01 23:09:29 +00:00
Bruce Evans
e8b7f39747 Return immediately from ttwrite() if the ttysleep()s that wait for
a clist return with an error.  There are some clist starvation/deadlock
bugs elsewhere and killing clist hogs didn't help because the breaks
only exited from the inner loops.
1994-11-01 22:23:29 +00:00
Garrett Wollman
cb2646da64 Make it compile again. XXX - this is not really the right way to fix
this problem.
1994-11-01 22:18:34 +00:00
Jordan K. Hubbard
2ee03071cb John Hay's patches to prevent missing gateway from dumping core.
Submitted by:	jhay
1994-11-01 22:12:35 +00:00
Jordan K. Hubbard
6b4ec83ca6 Fix from John Hay to avoid kernel panics when ap->a_eofflag is NULL.
I'm not sure if this is just masking another problem (like, should
ap->a_eofflag EVER be NULL?), but if it prevents a panic for now then
it may save an ALPHA customer.
Submitted by:	jhay
1994-11-01 21:14:45 +00:00
Andrey A. Chernov
0c9159ecd7 DMA automode patch, fix SB16 clicks
Submitted by: tim@cs.city.ac.uk
1994-11-01 17:26:50 +00:00
Paul Traina
c9014e4e10 Make PPP compile cleanly 1994-11-01 09:03:20 +00:00
Andrey A. Chernov
0c8e8c63a8 Implement CPU_ADJKERNTZ in different way: call resettodr()
on writting this variable. adjkerntz pgm changes will follow.
1994-11-01 06:04:12 +00:00
Paul Traina
5ea2be93cd Add kernel hooks for /dev/vatio -- a minimalistic BSD audio driver emulator
created by Amancio Hasty (specificly, this, in conjunction with his sound
driver mods for dual-mode DMA will allow VAT compiled for BSD/386 1.1 to
run under FreeBSD 2.x.)
1994-11-01 01:47:22 +00:00
Jordan K. Hubbard
0a87b23329 Latest changes from Uben.
Submitted by:	uben
1994-10-31 23:58:04 +00:00
Poul-Henning Kamp
beef52db54 Changed RAW_PART to RAWPART so it comes from disklabel.h.
Force RAW_PART to have the right size.
Set d_secperunit in the disklabel.
1994-10-31 23:45:40 +00:00