Commit Graph

103946 Commits

Author SHA1 Message Date
obrien
fc16e4b6bc Add casts so all these quantities are a constant type. 2004-06-24 02:24:39 +00:00
obrien
7be7405478 Cast variable-sized (based on platform) quantities before printing out. 2004-06-24 02:21:17 +00:00
rwatson
c7066663ca In ip_ctloutput(), acquire the inpcb lock around some of the basic
inpcb flag and status updates.
2004-06-24 02:05:47 +00:00
rwatson
cb68990cb8 When asserting non-Giant locks in the network stack, also assert
Giant if debug.mpsafenet=0, as any points that require synchronization
in the SMPng world also required it in the Giant-world:

- inpcb locks (including IPv6)
- inpcbinfo locks (including IPv6)
- dummynet subsystem lock
- ipfw2 subsystem lock
2004-06-24 02:01:48 +00:00
gad
7bca1f4af1 Rework the logic for `-t <tty>', such that it accepts "ttyp0" and "console",
in addition to "/dev/ttyp0" or "p0"  and  "/dev/console" or "co".
2004-06-24 01:57:59 +00:00
njl
4dedf94d49 Attach the correct handle, not the one that was just deleted. Also,
remove some duplicated code.
2004-06-24 01:57:31 +00:00
rwatson
40db50e360 Clean up use of ng_hdhasb_mtx a little:
- Assert the mutex in NG_IDHASH_FIND() since the mutex is required to
  safely walk the node lists in the ng_ID_hash table.

- Acquire the ng_nodelist_mtx when walking ng_allnodes or ng_allhooks
  to generate state dump output from the netgraph sysctls.
2004-06-24 01:47:31 +00:00
rwatson
dd4659a313 Acquire socket lock in the "waiting for connection" loop in
kern_connect(), replacing tsleep() with msleep() with the socket
mutex.
2004-06-24 01:43:23 +00:00
rwatson
017688133d Introduce sbreserve_locked(), which asserts the socket buffer lock on
the socket buffer having its limits adjusted.  sbreserve() now acquires
the lock before calling sbreserve_locked().  In soreserve(), acquire
socket buffer locks across read-modify-writes of socket buffer fields,
and calls into sbreserve/sbrelease; make sure to acquire in keeping
with the socket buffer lock order.  In tcp_mss(), acquire the socket
buffer lock in the calling context so that we have atomic read-modify
-write on buffer sizes.
2004-06-24 01:37:04 +00:00
rwatson
d9c4d0106b Slide socket buffer lock earlier in sopoll() to cover the call into
selrecord(), setting up select and flagging the socker buffers as SB_SEL
and setting up select under the lock.
2004-06-24 00:54:26 +00:00
njl
eede11a25f Run the power off code directly instead of using indirection through
smp_rendezvous() to ensure we run on the BSP.  This reverts rev 1.128.
Add a comment indicating that MI code should be the one that runs all
shutdown functions on the BSP with the APs halted.  This should work
around problems in power off while waiting for the MI code to be improved.
2004-06-24 00:48:45 +00:00
rwatson
52ac3f55d4 Remove spls from portal_open(). Acquire socket lock while sleeping
waiting for the socket to connect and use msleep() on the socket
mute rather than tsleep().  Acquire socket buffer mutexes around
read-modify-write of socket buffer flags.
2004-06-24 00:47:23 +00:00
njl
47daef0c17 Use uintmax_t for CPU statistics and add a cast to prevent truncation of
the statistics in a multiply.

Pointed out by:	YONETANI Tomokazu
2004-06-24 00:38:51 +00:00
marcel
979ae42da6 s/ARCH/ARCH_SUBDIR/g -- This reduces the chance of possible conflicts
with the user's environment.

Wondered why his cross-builds kept failing: marcel
2004-06-24 00:02:32 +00:00
le
e83112121f Add a function to clean up RAID5 packets and use it when I/O has
finished or when building the complete packet fails.
2004-06-23 23:52:55 +00:00
gad
79a2e0f111 Change "struct varent" to use the standard queue(8) macros, instead of
using it's own version of the same basic algorithm.

Submitted by:	part by Cyrille Lefevre, part of it done by me
2004-06-23 23:48:09 +00:00
markus
4ccd7a6cd2 s/udi_peed/udi_speed/
Approved by:	brueffer
MFC after:	3 days
2004-06-23 23:25:58 +00:00
le
0804f4d367 Remove two debugging printfs that are currently rather disturbing
than helpful.
2004-06-23 22:32:01 +00:00
gad
340f5cd515 Fix a test of bit-flag "P_SA" by adding parenthesis around the expression.
Submitted by:	Cyrille Lefevre
2004-06-23 21:59:56 +00:00
bmilekic
9034d8448c Make uma_mtx MTX_RECURSE. Here's why:
The general UMA lock is a recursion-allowed lock because
there is a code path where, while we're still configured
to use startup_alloc() for backend page allocations, we
may end up in uma_reclaim() which calls zone_foreach(zone_drain),
which grabs uma_mtx, only to later call into startup_alloc()
because while freeing we needed to allocate a bucket.  Since
startup_alloc() also takes uma_mtx, we need to be able to
recurse on it.

This exact explanation also added as comment above mtx_init().

Trace showing recursion reported by: Peter Holm <peter-at-holm.cc>
2004-06-23 21:59:03 +00:00
scottl
7e2282d27b Make the udf_vnops side endian clean. 2004-06-23 21:49:03 +00:00
ps
c42a8920e0 Move the sack sysctl's under net.inet.tcp.sack
net.inet.tcp.do_sack -> net.inet.tcp.sack.enable
net.inet.tcp.sackhole_limit -> net.inet.tcp.sack.sackhole_limit

Requested by:	wollman
2004-06-23 21:34:07 +00:00
gad
5204a359d0 Replace a call to strncpy() with a call to strlcpy()
Submitted by:	Cyrille Lefevre
2004-06-23 21:31:43 +00:00
gad
8c0b0acc88 Add a check for defunct processes in saveuser(), so the output for "args"
(aka "command") will display "<defunct>", as does the output from "comm"
for those processes.  Also do better checking for malloc() failures.

Submitted by:	Cyrille Lefevre
2004-06-23 21:17:25 +00:00
le
6c192418aa Accept "sd len 0" and auto-size the subdisk correctly.
Spotted by: csjp
2004-06-23 21:15:55 +00:00
ps
c5835caf7a Add support for TCP Selective Acknowledgements. The work for this
originated on RELENG_4 and was ported to -CURRENT.

The scoreboarding code was obtained from OpenBSD, and many
of the remaining changes were inspired by OpenBSD, but not
taken directly from there.

You can enable/disable sack using net.inet.tcp.do_sack. You can
also limit the number of sack holes that all senders can have in
the scoreboard with net.inet.tcp.sackhole_limit.

Reviewed by:	gnn
Obtained from:	Yahoo! (Mohan Srinivasan, Jayanth Vijayaraghavan)
2004-06-23 21:04:37 +00:00
scottl
9598ca3ce3 First half of making UDF be endian-clean. This addresses the vfsops side. 2004-06-23 19:36:09 +00:00
rik
dacab795c4 Use bus_dma* instead of contigmalloc()+vtophys() for RELENG_5. 2004-06-23 18:13:10 +00:00
jhb
fc8a357159 Finally implement bus_config_intr() support for I/O APIC interrupt sources.
This should fix problems with older SMP systems that only have ISA/EISA
IRQs when routing virgin PCI interrupts as well as on other boxes whose
MADT does not have any interrupt override entries for ISA IRQs that are
used to route PCI interrupts even in APIC mode.
2004-06-23 18:11:33 +00:00
jhb
54c83ff589 Fetch the actual acpi0 device_t and use device_is_attached() to see if
it's alive rather than trying to fetch its softc pointer via its devclass.

Glanced at by:	imp, njl
2004-06-23 17:59:01 +00:00
brooks
930f5f47ac el(4) stopped needing to me a count device in December 2000. 2004-06-23 17:33:25 +00:00
jhb
5c60e9ddb1 - Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources are
actually used.  For most ACPI devices this means deferring the call
  until bus_alloc_resource().
  - Add a function acpi_config_intr() to call BUS_CONFIG_INTR() for an
    ACPI IRQ resource using the trigger mode and polarity information
    stored in the ACPI resource object.
  - Add a function acpi_lookup_irq_resource() to lookup the ACPI IRQ
    resource that corresponds to a specified rid and new-bus resource.
  - Have the ACPI PCI bridge driver call BUS_CONFIG_INTR() on interrupts
    that it routes through link devices.
- Remove needactivate variable from acpi_alloc_resource() by changing the
  function not modify the flags variable but just mask off RF_ACTIVE when
  calling rman_reserve_resource().

Reviewed by:	njl (1, an earlier version)
2004-06-23 17:21:02 +00:00
jhb
02335c45bd Various cleanups in support of a future ioapic_config_intr() function:
- Allow ioapic_set_{nmi,smi,extint}() to be called multiple times on the
  same pin so long as the pin's mode is the same as the mode being
  requested.
- Add a notion of bus type for the interrupt associated with interrupt pin.
  This is needed so that we can force all EISA interrupts to be active high
  in the forthcoming ioapic_config_intr().
- Fix a bug for EISA systems that didn't remap IRQs.  This would have broken
  EISA systems that tried to disable mixed mode for IRQ 0.
2004-06-23 15:29:20 +00:00
bms
b1c1a50c42 In swap_pager_getpages(), bp->b_dev can be NULL, particularly for the
case of NFS mounted swap, so do not try to dereference it.

While we're here, brucify the printf() call which happens when we
time out on acquisition of vm_page_queue_mtx.

PR:		kern/67898
Submitted by:	bde (style)
2004-06-23 15:15:07 +00:00
jhb
ace6c2a22b Now that we associate a device_t with ACPI device handles, lookup the
device associated with any PCI devices that are enumerated in the ACPI
tree when adding children to an ACPI PCI bus and remove the duplicate
ACPI-only device_t and replace the device_t associated with the handle with
the ACPI and PCI aware device_t.
2004-06-23 15:08:40 +00:00
rik
8711d7fb19 Clean CLEANFILES. 2004-06-23 14:22:14 +00:00
imp
bba2e51a2e Improve the kludge assignment of sub-bus numbers a little by fixing an
off by one error.  subbus must be > than pribus, so the right test is
<= not just <.

Reported by: Peter Losher
2004-06-23 13:49:46 +00:00
gad
d13d90025b Avoid padding the value of "ucomm" when it is the last column in the line.
Submitted by:	Cyrille Lefevre
2004-06-23 12:18:36 +00:00
gad
2bf98c522e Make sure the value of "upr" (scheduling priority on return from system call)
is scaled in the same way that "pri" (scheduling priority) is scaled.

Submitted by:	Cyrille Lefevre
2004-06-23 11:56:57 +00:00
gad
06ba5558e4 Include the `-c' option in the usage() message.
Submitted by:	Cyrille Lefevre
2004-06-23 11:40:56 +00:00
gad
30779de17a In the sorting routine, sort by thread-id if two processes have the same PID.
Submitted by:	Cyrille Lefevre
2004-06-23 11:28:17 +00:00
rik
d770273d44 Make code more clean: backout support for 3.x branch. 2004-06-23 11:23:54 +00:00
le
965f205e82 MFNetBSD 1.60, author: augustss
Several changes:
    * Implement read for ulpt.
    * If the device is not opened for reading, occasionally drain any
      data the printer might have (but don't hammer the printer with reads).
    * Lower the buffer size to one page.
   The driver seems to work with more printers now.

Obtained from: NetBSD
2004-06-23 11:16:12 +00:00
phk
8ec69c51e8 save a few redundant lines by moving the retry loop further backwards. 2004-06-23 10:28:09 +00:00
mlaier
724caf6adc It's /usr/sbin/nologin not /sbin/nologin
Found-by:	brueffer
Pointy-hat-to:	mlaier
2004-06-23 09:42:19 +00:00
dwmalone
5280eeb92f Fix some style bugs I introduced pointed out by bde. Also add a blank
line after the empty variable declarations.

Reviewed by:	md5
2004-06-23 08:26:31 +00:00
phk
a4c1f3a407 Since we grew struct xtty, t_dev doesn't have to be schizofrenic anymore. 2004-06-23 08:25:23 +00:00
alc
082a1c5c41 - Remove unused definitions.
- Move a definition inside the scope of a #ifdef _KERNEL.
2004-06-23 08:06:52 +00:00
den
fb339cc205 Update copyright years. 2004-06-23 07:40:52 +00:00
bms
64c9b070f5 MFamd64: Document the machdep.hlt_cpus sysctl MIB variable.
PR:		i386/65729
Submitted by:	Craig Rodrigues
2004-06-23 07:12:34 +00:00