Commit Graph

54668 Commits

Author SHA1 Message Date
hm
0755fde449 Bugfix: enable interrupt sharing for ELSA Microlink ISDN PCI 2000-12-03 16:20:33 +00:00
dwmalone
ec806a1972 Use M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	mark_salyzyn@adaptec.com
2000-12-03 13:21:55 +00:00
dwmalone
f2af31fc63 Check return value of malloc correctly and use M_ZERO. 2000-12-03 13:18:49 +00:00
dwmalone
ce16361e19 Tidy up some prototypes:
make sure there is exactly one prototype for each function,
        use K&R style definitions everywhere to match dominant style,
        make flag_signal take an int to avoid problems if we have
                ANSI prototypes and K&R definitions.
2000-12-03 11:32:26 +00:00
wilko
9355b54319 Update SCSI info for PC164
Obtained from:	discussions on netbsd-alpha
2000-12-03 11:03:55 +00:00
msmith
0767ccf15b - add support for crashdumps (courtesy of ps and Y!)
- standardise error reporting for commands
 - simplify the driver-to-controller bio transfer
 - add bio in/out accounting
 - correctly preserve the command ID in twe_ioctl (thanks to joel@3ware)
2000-12-03 02:11:35 +00:00
jhb
5870e2e9f0 Fix up a whitespace glitch in PHOLD() and fix it to use do { ... } while(0)
instead of { ... }.
2000-12-03 02:09:47 +00:00
marcel
134e569eff Include machine/cpu.h for cpu_getstack().
Spotted by: jake
2000-12-03 01:56:15 +00:00
dg
bf7a8acc8f Changed second argument in a call to sf_buf_free() to be NULL instead of
PAGE_SIZE to match the prototype better. The argument is ignored, so this
is just to silence the compile-time warning.

Pointed out by:	jhb
2000-12-03 01:35:46 +00:00
marcel
5611047489 Don't auto-generate the syscalls. 2000-12-03 01:30:31 +00:00
marcel
ccdb84bb6b Don't auto-generate syscalls. 2000-12-03 01:28:51 +00:00
jhb
fb0ab4bf94 - Add a mutex to the proc structure p_mtx that will be used to lock accesses
to each individual proc.
- Initialize the lock during fork1(), and destroy it in wait1().
2000-12-03 01:22:34 +00:00
jake
d33c1d168c Change cpu_switch to explicitly popl the callers program counter and
pushl that of the new process, rather than doing a movl (%esp) and
assuming that the stack has been setup right.  This make the initial
stack setup slightly more sane, and will make it easier to stick
an interrupted process onto the run queue without its knowing.
2000-12-03 01:09:59 +00:00
obrien
f7e4c19113 tm.h should include the platform specific ELF header if it exists. 2000-12-03 00:11:19 +00:00
abial
b34e81139a Properly check the return values from malloc(3).
Remove some PNP-related dead code that is unlikely to survive the
changes in -current PNP anyway.

Submitted by:	fixes from Chris Faulhaber <jedgar@freebsd.org>
2000-12-03 00:09:08 +00:00
marcel
4289ffee6c Fix dependency for auto-generated files. This commit is
for archiving purposes only; auto-generation is going to
be reverted.

requested by: obrien
submitted: gallatin
2000-12-02 23:47:41 +00:00
green
990b31ea80 Make some style changes to the ident_stream() code.
Partially submitted by:	alfred
Reviewed by:	alfred
2000-12-02 21:18:11 +00:00
will
65a98afaed There's also no point in #typedef'ing void/char pointers. Accordingly,
rip out ClientData/Address pointers and use standard types.

Obtained from:	OpenBSD
2000-12-02 20:24:42 +00:00
asmodai
33a20c676d Use a size_t instead of an int. 2000-12-02 20:21:13 +00:00
gallatin
397a29f117 Correct int/long type mismatch in the proper place this time. freevnodes
and numvnodes are longs in the kernel.  They should remain longs in systat,
what really needs to change is that they should be using SYSCTL_LONG rather
than SYSCTL_INT.   I also changed wantfreevnodes to SYSCTL_LONG because I
happened to notice it.

I wish there was a way to find all of these automatically..

Pointed out by: bde
2000-12-02 20:08:33 +00:00
asmodai
85f201535e Properly constify some static arrays.
Also #if out some sccsid's and add rcsid's.
2000-12-02 19:10:12 +00:00
will
797262c9e9 There's no reason to use fancy forms of NULL. Replace all instances
of NIL, NILLST, NILLGNODE, etc. with NULL.

Obtained from:		OpenBSD
2000-12-02 18:58:01 +00:00
markm
d04b66b7bc Major speedup to /dev/random and the kernel thread that reseeds it.
There is no more TAILQ fifo to harvest the entropy; instead, there
is a circular buffer of constant size (changeable by macro) that
pretty dramatically improves the speed and fixes potential slowdowns-
by-locking.

Also gone are a slew of malloc(9) and free(9) calls; all harvesting
buffers are static.

All-in-all, this is a good performance improvement.

Thanks-to:	msmith for the circular buffer concept-code.
2000-12-02 18:40:16 +00:00
mjacob
b60dc7dc10 Add USEC_SLEEP macro support. Change the location at which we define
ISP_LOCK/ISP_UNLOCK macros.
2000-12-02 18:33:29 +00:00
markm
14f55e3a6c Default the /dev/random loadable module to blocking-on-bootup,
but leave a commented-out macro to change this.
2000-12-02 18:29:18 +00:00
mjacob
c1744a5f77 Make the Not RESPONSE in RESPONSE QUEUE message have a bit more info
(specifically, how many entries we've looked at so far). Maintain
interrupt instrumentation. Use USEC_SLEEP instead of USEC_DELAY in
a number of places (this allows us to drop locks and sleep instead
of spin). Track changes to configuration options for topology preference.
Fix botched order of printout for Channel, Target, Lun.
2000-12-02 18:08:35 +00:00
mjacob
c17af18f47 Add interrupt instrumentation. Change ISP_CFG_NPORT config option to
a set of options that allows specific loop, loop-only, nport, nport-only
topology settings. Define a required macro for all platforms (USEC_SLEEP).
2000-12-02 18:06:03 +00:00
markm
f0aab59cdd Namespace cleanup. Remove some #includes in favour of an explicit
declaration.

Asked for by:	bde
2000-12-02 17:59:41 +00:00
markm
5a9b5f7c13 Recouple arc4random(9) to the entropy device. This works whether the
entropy device is loaded or not.

If the entropy device is NOT loaded, the the quality of perturbations
supplied by this will suffer.
2000-12-02 16:23:54 +00:00
julian
0bade0c230 Add splhigh()s to protect against a race condition
that shows up when running with ethernet bridging
at high speed.

Submitted by: Chris Csanady <ccsanady@iastate.edu>
(and extended by me)
2000-12-02 13:27:58 +00:00
bde
2f9fb1a43d Backed out previous commit. Don't depend on namespace pollution in
<sys/buf.h>.
2000-12-02 12:03:58 +00:00
jhb
967c93e448 Protect p_stat with sched_lock. 2000-12-02 06:09:44 +00:00
jake
cec123a65f Remove last vestiges of thr_sleep and thr_wakeup from libc. 2000-12-02 05:58:03 +00:00
jake
11d57dad0a Regen. 2000-12-02 05:45:32 +00:00
jake
c0513a881e Forgot this file in previous commit to remove file kern_threads.c 2000-12-02 05:42:30 +00:00
jake
7cd1ca1cdc Remove thr_sleep and thr_wakeup. Remove fields p_nthread and p_wakeup
from struct proc, which are now unused (p_nthread already was).
Remove process flag P_KTHREADP which was untested and only set
in vfs_aio.c (it should use kthread_create).  Move the yield
system call to kern_synch.c as kern_threads.c has been removed
completely.

moral support from:	alfred, jhb
2000-12-02 05:41:30 +00:00
gallatin
8fe9172d64 introduce support for static compilation of the osf/1 module via the
COMPAT_OSF1 option
2000-12-02 04:17:19 +00:00
gallatin
14c37370d1 exec_osf1_imgact() should return -1 for non OSF1/ECOFF binaries, it should
not return ENOEXEC.  This is because image activators should return -1 if they
don't claim an image. They should return ENOEXEC if they do claim it,
but cannot load it due to sime problem with the image.   This bug was
preventing static compilation of the osf/1 module.  I'm surprised it
did not cause more problems.
2000-12-02 04:15:17 +00:00
jhb
b8b5877ce7 Protect p_stat with sched_lock. 2000-12-02 03:29:33 +00:00
gallatin
e72e697e0d cleanup: remove redundant mp_machdep.c and non-existent simplelock.s.
Ironically enough, simple locks are implemented in mp_machdep.c..
2000-12-02 02:09:28 +00:00
jhb
ad7f89f777 Protect p_stat with the sched_lock.
Reviewed by:	jake
2000-12-02 01:58:15 +00:00
jhb
6dfe475f40 Protect p_stat with sched_lock. 2000-12-02 01:32:51 +00:00
scottl
53f8c633d9 Revert attach() back to the old behaviour of calling bus_generic_attach().
The new way doesn't seem to work reliably and was causing devices to not
be seen.

Approved by:	msmith
2000-12-02 01:14:14 +00:00
bmilekic
e91e9907ef Make sure to free the sf_buf if we've allocated it but fail to allocate
an mbuf (ENOBUFS) before returning so that we don't leak sf_bufs in
the case where we're out of mbufs.

Submitted by: David Greenman (dg)
2000-12-02 00:40:57 +00:00
gad
2b0e48c014 Fix some error-handling logic so that ferror is called before fclose,
instead of immediately after the fclose.  The previous logic did work
on freebsd, but is somewhat risky practice (and causes trouble when
porting to other OS's).

PR:		bin/22965
Reviewed by:	Garrett Wollman
2000-12-02 00:07:56 +00:00
jhb
6a64e36210 Protect p_stat with sched_lock. 2000-12-01 23:43:15 +00:00
gallatin
537bde557a Alter isa interrupt behaviour on alpha. Rather than send a non-specific
EOI after the ithread runs, send the EOI when we get the interrupt and
disable the source.  After the ithread is run, the source is renabled.
Also, add isa_handle_fast_intr() which handles fast interrupts by sending
an EOI after the handler is run.

This fixes the chronic missing interrupt problems under heavy NFS load
on my UP1000 and should result in greater stability for alphas which
route all irqs through an isa pic.

Discussed with: jhb, bde (sending non-specific EOIs early was bde's idea)
2000-12-01 22:28:04 +00:00
phk
fe5dbadbbc Make labels mandatory for vn(4). 2000-12-01 22:27:40 +00:00
phk
a2f3d44766 Make <struct.h> #error instead of #warn that it is going away on jan 1st. 2000-12-01 22:15:56 +00:00
jkh
e957a4f81c Also list kernel target so one can get to it. 2000-12-01 22:00:33 +00:00