Commit Graph

35210 Commits

Author SHA1 Message Date
Eric Melville
3a0f9fbc5e Increment version number for the addition of getopt_long(3) to libc. 2002-10-01 00:44:11 +00:00
Brooks Davis
a5d0e57adc Use if_printf(ifp, "blah") instead of printf("ar%d: blah", ifp->if_unit). 2002-10-01 00:42:51 +00:00
Jake Burkholder
c7f73b67b5 Use M_NOWAIT instead of M_WAITOK when allocating dmamaps; the allocations
functions may be called from a device strategy routine when sleeping is
bad.

Submitted by:	phk
Reviewed by:	tmm
2002-10-01 00:17:39 +00:00
Juli Mallett
a88b260a86 Back out code changes that snuck into the previous forced commit. 2002-10-01 00:16:17 +00:00
Juli Mallett
226e1171e1 (Forced commit, to clarify previous commit of ksiginfo/signal queue code.)
I've added a structure, kernel-private, to represent a pending or in-delivery
signal, called `ksiginfo'.  It is roughly analogous to the basic information
that is exported by the POSIX interface 'siginfo_t', but more basic.  I've
added functions to allocate these structures, and further to wrap all signal
operations using them.

Once the operations are wrapped, I've added a TailQ (see queue(3)) of these
structures to 'struct proc', and all pending signals are in that TailQ.  When
a signal is being delivered, it is dequeued from the list.  Once I finish
the spreading of ksiginfo throughout the tree, the dequeued structure will be
delivered to the process in question, whereas currently and normally, the
signal number is what is used.
2002-10-01 00:07:28 +00:00
Juli Mallett
f4430f22b8 Lock access to the signal queue, and related structures, with PROC_LOCK.
Submitted by:	jhb
2002-09-30 21:15:33 +00:00
John Baldwin
dc183990ca - Add a new per-process flag PS_XCPU to indicate that at least one thread
has exceeded its CPU time limit.
- In mi_switch(), set PS_XCPU when the CPU time limit is exceeded.
- Perform actual CPU time limit exceeded work in ast() when PS_XCPU is set.

Requested by:	many
2002-09-30 21:13:54 +00:00
John Baldwin
f4cd8f9ff4 Change p_cpulimit to be in seconds instead of microseconds. Since
p_runtime now is a bintime, it is no longer an optimization to store
p_cpulimit as microseconds.

Suggested by:	phk
2002-09-30 21:08:38 +00:00
Robert Watson
0626774f08 Move vnode MAC label initialization to after the release of the vnode
interlock in getnewvnode() to avoid possible sleeps while holding
the mutex.  Note that the warning from Witness is a slight false
positive since we know there will be no contention on the interlock
since we haven't made the vnode available for use yet, but the theory
is not a bad one.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-30 20:51:48 +00:00
Robert Watson
c031391bd5 Add tunables for the existing sysctl twiddles for pipe and vm
enforcement so they can be disabled prior to kernel start.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-30 20:50:00 +00:00
Juli Mallett
70d4d0c0f5 Convert use of p_siglist and old SIG*() macros to use <sys/ksiginfo.h>
prototyped functions to get a sigset_t, and further to check for any
queued signals, rather than an empty signal set, to go with the move
to signal queues rather than signal sets.
2002-09-30 20:48:29 +00:00
Peter Wemm
425f8660a7 Use as's --defsym switch to compensate for the loss of the M4 substitution
of SIOPRT which broke kgzldr and therefore make release.

Pointed out by:	 murray
2002-09-30 20:37:58 +00:00
Juli Mallett
1226f694e6 First half of implementation of ksiginfo, signal queues, and such. This
gets signals operating based on a TailQ, and is good enough to run X11,
GNOME, and do job control.  There are some intricate parts which could be
more refined to match the sigset_t versions, but those require further
evaluation of directions in which our signal system can expand and contract
to fit our needs.

After this has been in the tree for a while, I will make in kernel API
changes, most notably to trapsignal(9) and sendsig(9), to use ksiginfo
more robustly, such that we can actually pass information with our
(queued) signals to the userland.  That will also result in using a
struct ksiginfo pointer, rather than a signal number, in a lot of
kern_sig.c, to refer to an individual pending signal queue member, but
right now there is no defined behaviour for such.

CODAFS is unfinished in this regard because the logic is unclear in
some places.

Sponsored by:	New Gold Technology
Reviewed by:	bde, tjr, jake [an older version, logic similar]
2002-09-30 20:20:22 +00:00
Justin T. Gibbs
655a5ce411 Remove a left over '&' from the conversion to using our
softc referenced seeprom store.

MFC after:	1 day
2002-09-30 19:55:42 +00:00
Poul-Henning Kamp
50c2233141 Plug memory leaks.
Detected by:	FlexeLint
Approved by:	jhb
2002-09-30 19:19:47 +00:00
Josef Karthauser
854add2319 Gremlins ate my comment!
Submitted by:	Clive Lin <clive@tongi.org>
2002-09-30 19:12:43 +00:00
Matthew Dillon
a84db8f49e Guido found another bug. There is a situation with
timestamped TCP packets where FreeBSD will send DATA+FIN and
A W2K box will ack just the DATA portion.  If this occurs
after FreeBSD has done a (NewReno) fast-retransmit and is
recovering it (dupacks > threshold) it triggers a case in
tcp_newreno_partial_ack() (tcp_newreno() in stable) where
tcp_output() is called with the expectation that the retransmit
timer will be reloaded.  But tcp_output() falls through and
returns without doing anything, causing the persist timer to be
loaded instead.  This causes the connection to hang until W2K gives up.
This occurs because in the case where only the FIN must be acked, the
'len' calculation in tcp_output() will be 0, a lot of checks will be
skipped, and the FIN check will also be skipped because it is designed
to handle FIN retransmits, not forced transmits from tcp_newreno().

The solution is to simply set TF_ACKNOW before calling tcp_output()
to absolute guarentee that it will run the send code and reset the
retransmit timer.  TF_ACKNOW is already used for this purpose in other
cases.

For some unknown reason this patch also seems to greatly reduce
the number of duplicate acks received when Guido runs his tests over
a lossy network.  It is quite possible that there are other
tcp_newreno{_partial_ack()} cases which were not generating the expected
output which this patch also fixes.

X-MFC after:	Will be MFC'd after the freeze is over
2002-09-30 18:55:45 +00:00
John Baldwin
92ceafffd0 - Give legacy an identify routine that always adds 'legacy0' at an order
of 1 so that it is not probed until after acpi0 is probed and attached.
- In legacy_probe(), return ENXIO if acpi0 is around and alive.
- nexus_attach() is now much simpler and just lets its child drivers do
  all the work.
2002-09-30 18:47:11 +00:00
John Baldwin
31a51bf683 Trash the PnPBIOStable pointer later on when we know that the acpi probe
and attach routines have succeeded so that if they fail we can still use
the PnP BIOS to find ISA on-board devices.  The fact that we do this here
is gross but fixing it properly involves a lot more work.
2002-09-30 18:45:20 +00:00
Josef Karthauser
fe74650816 In rev 1.51 of usb_port.h I switched over to using the USB_USE_SOFTINTR
code path to fix a bug in the non USB_USE_SOFTINTR path that caused
the usb bus to hang and generally misbehave when devices were unplugged.
In the process though it also reduced the throughput of usb devices because
of a less than optimal implementation under FreeBSD.

This commit fixes the non USB_USE_SOFTINTR code in uhci and ohci
so that it works again, and switches back to using this code path.

The uhci code has been tested, but the ohci code hasn't.  It's
essentially the same anyway and so I don't envisage any difficulties.

Code for uhci submitted by:	Maksim Yevmenkin <myevmenk@exodus.net>
2002-09-30 17:50:18 +00:00
Yoshihiro Takahashi
a92b303976 Call bus_set_resource() to set the ioport resource. 2002-09-30 16:41:47 +00:00
David E. O'Brien
dbe57134ec Turn back on the "SMP: AP CPU #N Launched!" message on normal boots.
Peter's rev 1.189 should fix the lost console on SCSI-based systems due
to this message.
2002-09-30 15:39:57 +00:00
Poul-Henning Kamp
c91a63aa2c Add support for DIOCGMEDIASIZE and DIOCGSECTORSIZE.
Remove all traces of disklabel.

Sponsored by:	DARPA & NAI Labs.
2002-09-30 13:53:22 +00:00
Poul-Henning Kamp
150b2bdfb2 If GEOM is in the kernel, take these three out. I have no way of
testing any modifications to them, they shouldn't even bother with
disklabels in the first place and they are just plain obsolete old
hardware which should be axed entirely before 5.0-R IMO.

Sponsored by:	DARPA & NAI Labs.
2002-09-30 13:49:20 +00:00
Poul-Henning Kamp
419f39ce0f Prefix private BIO commands with "FD" so people get a hint that they
are in fact private.

Sponsored by:	DARPA & NAI Labs.
2002-09-30 13:42:06 +00:00
Guido van Rooij
467f686e93 Add quirk for Apacer HandyDrive
MFC after:	1 week
2002-09-30 10:11:34 +00:00
Poul-Henning Kamp
3a24c28f37 Don the asbestos underwear and add the code which lets DIOCWDINFO
write modified disklabels back to disk.

Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:59:59 +00:00
Poul-Henning Kamp
72840432e0 Retire g_io_fail() and let g_io_deliver() take an error argument instead.
Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:54:46 +00:00
Poul-Henning Kamp
90b1cd5615 Introduce g_write_data() function.
Sponsored by:	DARPA & NAI Labs
2002-09-30 08:50:47 +00:00
Poul-Henning Kamp
5b3317e9e6 Add missing g_enc_le2().
Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:47:46 +00:00
Poul-Henning Kamp
5dcf28b202 Disable the g_sanity() check unless people ask for it in the debugflags.
Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:46:29 +00:00
Poul-Henning Kamp
cd4f50fbb8 Make sure we don't loose our topology lock in a call_me() handler.
Sponsored by:	DARPA & NAI Labs.
2002-09-30 08:27:29 +00:00
Poul-Henning Kamp
f46708e081 Don't leak memory in case device_add_child_ordered() returns NULL.
Found by:	FlexeLint
2002-09-30 07:56:12 +00:00
David E. O'Brien
469541bfde Only print out the "SMP: AP CPU #N Launched!" message on verbose boots.
The kernel printf() isn't race-free
2002-09-30 07:03:16 +00:00
David E. O'Brien
e4544528f6 Save the FP state in the PCB as that is compatable with releng4 binaries.
This is a band-aid until the KSE pthread committers get back on the ground
and have their machines setup.

Submitted by:	eischen
2002-09-30 07:02:22 +00:00
Matthew N. Dodd
0e0e9411f2 HARP driver for the IDT77201/211 NICStAR ATM Adapter (Including Fore LE155).
Obtained from:	 Richard Hodges <rh@matriplex.com>
2002-09-30 05:12:39 +00:00
David E. O'Brien
940f2da74e Use fcntl.h from inside /sys.
Reviewd by:	scottl
2002-09-30 02:47:23 +00:00
Warner Losh
0d9ad27e7e mbuf leak in the error case has been fixed. When we have
an error, go ahead and m_freem the buffer.

PR: 32666
Submitted by: Chi-Fung Fan
2002-09-30 00:18:12 +00:00
Warner Losh
559e54225b Make beep not depend on HZ setting.
PR: 25201
Submitted by: Akio Marita-san
# This is the last part of the PR uncommitted.
2002-09-29 23:41:25 +00:00
Warner Losh
521c179f7d SMIENB not needed, but maybe PCI_CLOCK is, so put it in #if 0'd out 2002-09-29 23:37:07 +00:00
Warner Losh
253b72896c Parens considered good. 2002-09-29 23:36:17 +00:00
Julian Elischer
2735483034 uh, commit all of the patch 2002-09-29 23:28:58 +00:00
Julian Elischer
e081731767 commit the version I actually tested..
Submitted by:	davidxu
2002-09-29 23:23:25 +00:00
Julian Elischer
9eb1fdea37 Implement basic KSE loaning. This stops a hread that is blocked in BOUND mode
from stopping another thread from completing a syscall, and this allows it to
release its resources etc. Probably more related commits to follow (at least
one I know of)

Initial concept by: julian, dillon
Submitted by:	davidxu
2002-09-29 23:04:34 +00:00
Warner Losh
d909f3e20c Fix comment 2002-09-29 18:42:14 +00:00
Warner Losh
7f2907fd70 Limit the TX key to a valid range
PR: 39960, 39961 (patches here pointed out problem, but didn't quite fix it)
2002-09-29 18:40:35 +00:00
Warner Losh
214c0b3da4 Don't leak the bar list for each thing we allocate.
# This code really needs a rewrite

Spotted by the eagle eyes of: phk
2002-09-29 18:07:29 +00:00
Yoshihiro Takahashi
7698537b29 Added some buggy PC-98 PnP cards support. 2002-09-29 13:31:26 +00:00
Bruce Evans
a7f6243009 Fixed some of the namespace pollution in rev.1.33. <sys/systm.h> was
included here because it was once a prerequisite of <sys/mutex.h>
although that bug was fixed long ago.
2002-09-29 12:09:08 +00:00
Bruce Evans
65c66e222d Include <sys/systm.h> instead of depending on namespace pollution in
<net/if_var.h>.  But depend on the standard pollution in <sys/param.h>.
Removed unused includes.
2002-09-29 12:01:36 +00:00