peter [Mon, 4 Dec 2000 21:15:14 +0000 (21:15 +0000)]
Cleanup some leftover lint from the old interrupt system.
Also, while here, run up to 32 interrupt sources on APIC systems.
Normalize INTREN/INTRDIS so they are the same on both UP and SMP systems
rather than sometimes a macro, and sometimes a function.
joerg [Mon, 4 Dec 2000 20:16:06 +0000 (20:16 +0000)]
Turn off the load_eject bit in cdstartunit(). It causes an `Invalid
field in CDB' error when attempting to start a caddy-type CD drive,
since those drives apparently in general refuse to load a medium. Since
we never advertised the feature to load the medium upon calling
cdstartunit() (i. e. upon receipt of a CDIOCSTART ioctl command), nobody
should have relied on it. Besides, nobody noticed so far at all that
this command is failing for caddy-type drives... Only few applications
seem to use it at all (among them is workman, which made me notice it).
ume [Mon, 4 Dec 2000 18:02:12 +0000 (18:02 +0000)]
- __ivaliduser_sa() was introduced for forthcoming IPv6 support to lpd
- iruserok_sa() and __ivaliduser_af() were re-organized to use
__ivaliduser_sa()
- __icheckhost() was re-written to use getaddrinfo() instead of
getipnodebyname()
- better handling of multiple destination addresses in rcmd()
These changes were basically taken from KAME and changed to fit our
rcmd.c.
mjacob [Mon, 4 Dec 2000 17:21:46 +0000 (17:21 +0000)]
Fix for vanilla PC164 systems to use a slightly different PALcode magic
tweak to enable/disable interrupt sources. Seems to work. It is unclear
how many of the PC164 models actually might needs this, and whether or
not there are other hidden issues.
Obtained from:Bernd Walter <ticso@cicely8.cicely.de>
jake [Mon, 4 Dec 2000 12:38:03 +0000 (12:38 +0000)]
(1) Allow a stray lock prefix to be compiled out with the
MPLOCKED macro
(2) Use decimal 12 rather than hex 0xc in an addl
(3) Implement MTX_ENTER for the I386_CPU case
(4) Use semi-colons between instructions to allow MTX_ENTER
and MTX_ENTER_WITH_RECURSION to be assembled
(5) Use incl instead of incw to increment the recusion count
(6) 10 is not a valid label, use 7, 8 and 9 rather than 8, 9 and 10
(7) Sort numeric labels
jdp [Mon, 4 Dec 2000 01:45:57 +0000 (01:45 +0000)]
When recording the original arguments, stop short if we encounter
a NULL argument. Some programs change the contents of the argv
array, typically to remove some special arguments. They shorten
argv by storing a NULL where an argument pointer used to be. Such
programs core dumped if they called setproctitle(), because it
would try to apply strlen() to a NULL pointer.
jdp [Mon, 4 Dec 2000 01:26:29 +0000 (01:26 +0000)]
When recording the original arguments, don't (ab)use "nargc" for
iterating over the arguments. Doing so wipes out the value which
is about to be stored into the ps_strings structure.
nsayer [Sun, 3 Dec 2000 17:07:19 +0000 (17:07 +0000)]
We now have the ability to assign the correct IRQ when PNP-OS is turned
on. So stop failing the attach if the IRQ is unassigned. With this
patch, I can now boot with PNP-OS YES in my BIOS no differently than
PNP-OS NO (which is a good thing since Windows hangs with PNP-OS NO).
dwmalone [Sun, 3 Dec 2000 11:32:26 +0000 (11:32 +0000)]
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.
msmith [Sun, 3 Dec 2000 02:11:35 +0000 (02:11 +0000)]
- 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)
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.
jhb [Sun, 3 Dec 2000 01:22:34 +0000 (01:22 +0000)]
- 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().
jake [Sun, 3 Dec 2000 01:09:59 +0000 (01:09 +0000)]
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.
gallatin [Sat, 2 Dec 2000 20:08:33 +0000 (20:08 +0000)]
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..
markm [Sat, 2 Dec 2000 18:40:16 +0000 (18:40 +0000)]
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.
mjacob [Sat, 2 Dec 2000 18:08:35 +0000 (18:08 +0000)]
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.
mjacob [Sat, 2 Dec 2000 18:06:03 +0000 (18:06 +0000)]
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).
jake [Sat, 2 Dec 2000 05:41:30 +0000 (05:41 +0000)]
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.
gallatin [Sat, 2 Dec 2000 04:15:17 +0000 (04:15 +0000)]
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.
scottl [Sat, 2 Dec 2000 01:14:14 +0000 (01:14 +0000)]
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.
bmilekic [Sat, 2 Dec 2000 00:40:57 +0000 (00:40 +0000)]
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.
gad [Sat, 2 Dec 2000 00:07:56 +0000 (00:07 +0000)]
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).
gallatin [Fri, 1 Dec 2000 22:28:04 +0000 (22:28 +0000)]
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)
imp [Fri, 1 Dec 2000 19:41:14 +0000 (19:41 +0000)]
Add device ID for the 3c565C card. I followed exactly the 3c575c, but
further tweaks may be necessary down the road. This does nothing with
the serial side of the card.
gallatin [Fri, 1 Dec 2000 15:27:48 +0000 (15:27 +0000)]
Convert the pcib_{read,write}_config args from signed to unsigned,
like the args to the config space accessors these functions replaced.
This reduces the likelyhood of overflow when the args are used in
macros on the alpha. This prevents memory management faults when
probing the pci bus on sables, multias and nonames.
Approved by: dfr
Tested by: Bernd Walter <ticso@cicely8.cicely.de>