Commit Graph

47803 Commits

Author SHA1 Message Date
Bruce M Simpson
573eefe98f style(9) and whitespace cleanup.
Use C99 types. Use ANSI function definitions. Sort prototypes.
Split long lines correctly. Punctuate/wordsmith comments.
Use device_printf()/if_printf() where possible.

Reviewed by:	-net (silence)
2004-07-05 02:46:42 +00:00
Bruce M Simpson
7f8851d0b9 Reintroduce and clean up locking in xl(4).
- Eliminate the use of a recursive mutex.
 - Mark the driver as INTR_MPSAFE.
 - Split the default media choice code out into xl_choose_media() to
   avoid making poor assumptions about the state of the lock during attach.
 - The miibus upcall/downcall paths may still be racy.
   Change to commented-out locking assertions there for now.
 - Tested with nfsclient, routed, ssh, ntp, dhclient and quagga bgpd.
 - This needs SMP test coverage. I do not have such resources.

Tested on:	UP, !debug.mpsafenet && debug.mpsafenet
Hardware:	3C905B-TX (0x905510b7)
2004-07-05 02:34:35 +00:00
Don Lewis
faf1b66d1d Rework syncer termination code:
Speed up the syncer when shutting down by sleeping for a shorter
    period of time instead of cranking up rushjob and using the
    normal one second sleep.

    Skip empty worklist slots when shutting down to avoid lengthy
    intervals of inactivity.

    Give I/O more time to complete between steps by not speeding the
    syncer quite as much.

    Terminate the syncer after one full pass through the worklist
    plus one second with the worklist containing nothing but syncer
    vnodes.

    Print an indication of shutdown progress to the console.

Add a sysctl, vfs.worklist_len, to allow the size of the syncer worklist
to be monitored.
2004-07-05 01:07:33 +00:00
Bruce M Simpson
f1aeae1b95 Use if_printf() and device_printf() where appropriate, i.e.:
- Use device_printf() during device probe/attach.
 - Move if_xname initialization to before xl_reset() is called.
 - Use if_printf() at all other times after struct ifnet has been
   initialized.
2004-07-05 00:15:23 +00:00
Bruce M Simpson
2cf7254e65 ANSIfy function definitions.
Remove unnecessary return keywords.
Other minor stylistic changes.
2004-07-04 23:31:28 +00:00
Poul-Henning Kamp
6fba12f206 Mark our interrupt shareable and don't insist on DMA. This gets us closer
to working with a secondary floppy controller on a PC.
2004-07-04 23:16:04 +00:00
Poul-Henning Kamp
c555963fd1 Give synthetic root filesystem device vnodes a v_bsize of DEV_BSIZE. 2004-07-04 22:33:22 +00:00
Bruce M Simpson
6776cbbd07 Fix whitespace, indentation, long line wrapping and comments. 2004-07-04 22:20:52 +00:00
Bruce M Simpson
16a649385e Fix whitespace and comments. 2004-07-04 22:19:50 +00:00
Alfred Perlstein
2d1dca73ee Pass the operation in with the fsidctl.
Remove some fsidctls that we will not be using.
Correct prototypes for fs sysctls.
2004-07-04 20:21:58 +00:00
Poul-Henning Kamp
7f6599fec6 Make the last commit handle non-phk root devices better. 2004-07-04 19:42:25 +00:00
Bruce M Simpson
588f096065 Check the return value of bus_dmamem_alloc() correctly.
Submitted by:	Darron Broad (with cleanups)
2004-07-04 18:40:36 +00:00
Bruce M Simpson
29c2dfbe32 Workaround a locking problem in vlan(4). vlan_setmulti() may be called
with sleepable locks held from further up in the network stack, and
attempts to allocate memory to hold multicast group membership information
with M_WAITOK.

This panic was triggered specifically when an exiting routing daemon
process closes its raw sockets after joining multicast groups on them.

While we're here, comment some possible locking badness.

PR:	kern/48560
2004-07-04 18:32:54 +00:00
Bruce M Simpson
15a66c21c0 style(9)/whitespace cleanup while I'm in this file. 2004-07-04 16:43:24 +00:00
Poul-Henning Kamp
c24097e458 Add modemcontrol support for DTR and DCD.
Tested by:	ambrisko
2004-07-04 16:27:58 +00:00
Warner Losh
dfbaec0a6d Make the default memory range in the top 2GB of ram in the hopes that
this more accurately reflects what the underlying hardware of most
acpi machines that don't have children pci busses.

We still need a better way to get this information from acpi/hardware.
2004-07-04 16:23:25 +00:00
Stefan Farfeleder
5908d366fb Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
Warner Losh
1877e5a42f meta_p is a void *, so a variable that's of type void * can't be
dereferenced directly.  Toss an ifdef around it for the moment and
allow this to compile.  This likely means that priority packets aren't
queued to the special high priority queue.  The maintainer of this
should look into the problem.

This is likely fallout from the netgraph migration to using a more
generic meta tag from the mbug recently.

Fixes: pc98 tinerbox
2004-07-04 16:10:36 +00:00
Bosko Milekic
0d0837ee6d Introduce debug.nosleepwithlocks sysctl, 0 by default. If set to 1
and WITNESS is not built, then force all M_WAITOK allocations to
M_NOWAIT behavior (transparently).  This is to be used temporarily
if wierd deadlocks are reported because we still have code paths
that perform M_WAITOK allocations with lock(s) held, which can
lead to deadlock.  If WITNESS is compiled, then the sysctl is ignored
and we ask witness to tell us wether we have locks held, converting
to M_NOWAIT behavior only if it tells us that we do.

Note this removes the previous mbuf.h inclusion as well (only needed
by last revision), and cleans up unneeded [artificial] comparisons
to just the mbuf zones.  The problem described above has nothing to
do with previous mbuf wait behavior; it is a general problem.
2004-07-04 16:07:44 +00:00
Brian Feldman
7a708c3626 Reextend the M_WAITOK-disabling-hack to all three of the mbuf-related
zones, and do it by direct comparison of uma_zone_t instead of strcmp.

The mbuf subsystem used to provide M_TRYWAIT/M_DONTWAIT semantics, but
this is mostly no longer the case.  M_WAITOK has taken over the spot
M_TRYWAIT used to have, and for mbuf things, still may return NULL if
the code path is incorrectly holding a mutex going into mbuf allocation
functions.

The M_WAITOK/M_NOWAIT semantics are absolute; though it may deadlock
the system to try to malloc or uma_zalloc something with a mutex held
and M_WAITOK specified, it is absolutely required to not return NULL
and will result in instability and/or security breaches otherwise.
There is still room to add the WITNESS_WARN() to all cases so that
we are notified of the possibility of deadlocks, but it cannot change
the value of the "badness" variable and allow allocation to actually
fail except for the specialized cases which used to be M_TRYWAIT.
2004-07-04 15:59:25 +00:00
Bruce M Simpson
4c9e94d42c The net.link.ether.bridge.enable sysctl MIB variable enables bridge
functionality by setting to a non-zero value. This is an integer, but
is treated as a boolean by the code, so clamp it to a boolean value
when set so as to avoid unnecessary bridge reinitialization if it's
changed to another value.

PR:		kern/61174
Requested by:	Bruce Cran
2004-07-04 15:53:28 +00:00
Poul-Henning Kamp
8529ce7a87 We only need to check for overlaps if we increasing access counts. 2004-07-04 13:44:48 +00:00
Poul-Henning Kamp
e6bbb69149 Add LibAliasOutTry() which checks a packet for a hit in the tables, but
does not create a new entry if none is found.
2004-07-04 12:53:07 +00:00
Poul-Henning Kamp
1cbb1e02c4 Blocksize for I/O should be a property of the vnode and not found by groping
around in the vnodes surroundings when we allocate a block.

Assign a blocksize when we create a vnode, and yell a warning (and ignore it)
if we got the wrong size.

Please email all such warnings to me.
2004-07-04 12:49:04 +00:00
Alfred Perlstein
94ed9c8af5 Introduce a new kevent filter. EVFILT_FS that will be used to signal
generic filesystem events to userspace.  Currently only mount and unmount
of filesystems are signalled.  Soon to be added, up/down status of NFS.

Introduce a sysctl node used to route requests to/from filesystems
based on filesystem ids.

Introduce a new vfsop, vfs_sysctl(mp, req) that is used as the callback/
entrypoint by the sysctl code to change individual filesystems.
2004-07-04 10:52:54 +00:00
Alfred Perlstein
903ac7c219 Revision 1.496 would not boot on my system due to
ffs_mount -> bdevvp -> getnewvnode(..., mp = NULL, ...) ->
 insmntqueue(vp, mp = NULL) -> KASSERT -> panic

Make getnewvnode() only call insmntqueue() if the mountpoint parameter
is not NULL.
2004-07-04 10:19:15 +00:00
MIHIRA Sanpei Yoshiro
b866026be5 Add device ID for atuwi USB wlan driver, Linksys WUSB11 v2.8 wireless adapter.
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

PR:		kern/68465
Submitted by:	Suihong Liang <s2liang@uwaterloo.ca>
2004-07-04 09:13:53 +00:00
Poul-Henning Kamp
e3c5a7a4dd When we traverse the vnodes on a mountpoint we need to look out for
our cached 'next vnode' being removed from this mountpoint.  If we
find that it was recycled, we restart our traversal from the start
of the list.

Code to do that is in all local disk filesystems (and a few other
places) and looks roughly like this:

		MNT_ILOCK(mp);
	loop:
		for (vp = TAILQ_FIRST(&mp...);
		    (vp = nvp) != NULL;
		    nvp = TAILQ_NEXT(vp,...)) {
			if (vp->v_mount != mp)
				goto loop;
			MNT_IUNLOCK(mp);
			...
			MNT_ILOCK(mp);
		}
		MNT_IUNLOCK(mp);

The code which takes vnodes off a mountpoint looks like this:

	MNT_ILOCK(vp->v_mount);
	...
	TAILQ_REMOVE(&vp->v_mount->mnt_nvnodelist, vp, v_nmntvnodes);
	...
	MNT_IUNLOCK(vp->v_mount);
	...
	vp->v_mount = something;

(Take a moment and try to spot the locking error before you read on.)

On a SMP system, one CPU could have removed nvp from our mountlist
but not yet gotten to assign a new value to vp->v_mount while another
CPU simultaneously get to the top of the traversal loop where it
finds that (vp->v_mount != mp) is not true despite the fact that
the vnode has indeed been removed from our mountpoint.

Fix:

Introduce the macro MNT_VNODE_FOREACH() to traverse the list of
vnodes on a mountpoint while taking into account that vnodes may
be removed from the list as we go.  This saves approx 65 lines of
duplicated code.

Split the insmntque() which potentially moves a vnode from one mount
point to another into delmntque() and insmntque() which does just
what the names say.

Fix delmntque() to set vp->v_mount to NULL while holding the
mountpoint lock.
2004-07-04 08:52:35 +00:00
Warner Losh
48375ebec9 These don't need RMAN_RESOURCE_VISIBLE now that rman is visible 2004-07-03 20:56:16 +00:00
Warner Losh
c82338ca27 Really remove __RMAN_RESORUCE_VISIBLE 2004-07-03 20:49:00 +00:00
Warner Losh
8acf75a06d Use the rman_* functions in preference to reaching into struct resource.
Remove __RMAN_RESOURCE_VISIBLE after compilation confirms it is now not
needed.
2004-07-03 20:48:01 +00:00
Warner Losh
8b68b82381 Don't define __RMAN_RESOURCE_VISISBLE. They aren't needed here after
I've converted the direct accessing of struct resource members to the
preferred interface.
2004-07-03 20:11:49 +00:00
Poul-Henning Kamp
cfa5e80af8 Remove stale comment 2004-07-03 19:37:06 +00:00
Robert Watson
3a54d6a8a8 Change M_WAITOK argument to sodupsockaddr() to M_NOWAIT. When the call
to dup_sockaddr() was renamed to sodupsockaddr(), the argument was
changed from '1' to 'M_WAITOK', which changed the semantics.  This
resulted in a WITNESS warning about a potential sleep while holding the
NFS server mutex.  Now this will no longer happen, restoring a possible
bug present in the original code (setting RC_NAM even though the malloc
to copy the addres may fail).  bde observes that the flag names here
should probably not be the same as the malloc flags for name space
reasons.

Bumped into by:	kuriyama
2004-07-03 19:17:06 +00:00
Scott Long
b524342941 Commit the first of half of changes that allow busdma to transparently
honor the alignment and boundary constraints in the dma tag when loading
buffers.  Previously, these constraints were only honored when allocating
memory via bus_dmamem_alloc().  Now, bus_dmamap_load() will automatically
use bounce buffers when needed.

Also add a set of sysctls to monitor the global busdma stats.  These are:

hw.busdma.free_bpages
hw.busdma.reserved_bpages
hw.busdma.active_bpages
hw.busdma.total_bpages
hw.busdma.total_bounced
hw.busdma.total_deferred
2004-07-03 18:18:36 +00:00
Brian Feldman
cf107c1d1a Limit mbuma damage. Suddenly ALL allocations with M_WAITOK are subject
to failing -- that is, allocations via malloc(M_WAITOK) that are required
to never fail -- if WITNESS is not defined.  While everyone should be
running WITNESS, in any case, zone "Mbuf" allocations are really the only
ones that should be screwed with by this hack.

This hack is crashing people, and would continue to do so with or without
WITNESS.  Things shouldn't be allocating with M_WAITOK with locks held,
but it's not okay just to always remove M_WAITOK when !WITNESS.

Reported by:	Bernd Walter <ticso@cicely5.cicely.de>
2004-07-03 18:11:41 +00:00
Poul-Henning Kamp
279f949ee5 Add NULL arg to mi_switch() call to stop kernel compiles from breaking. 2004-07-03 16:57:51 +00:00
Poul-Henning Kamp
bffd1b7af4 Remove "register" keyword and trailing white space. 2004-07-03 16:56:45 +00:00
Tim J. Robbins
3bc482ec1c By popular request, add a workaround that allows large (>128GB or so)
FAT32 filesystems to be mounted, subject to some fairly serious limitations.

This works by extending the internal pseudo-inode-numbers generated from
the file's starting cluster number to 64-bits, then creating a table
mapping these into arbitrary 32-bit inode numbers, which can fit in
struct dirent's d_fileno and struct vattr's va_fileid fields. The mappings
do not persist across unmounts or reboots, so it's not possible to export
these filesystems through NFS. The mapping table may grow to be rather
large, and may grow large enough to exhaust kernel memory on filesystems
with millions of files.

Don't enable this option unless you understand the consequences.
2004-07-03 13:22:38 +00:00
Bruce M Simpson
968bc43646 SMPng locking cleanup for vr(4).
- Remove recursive locking situations. Remove the MTX_RECURSE bit.
 - Take the lock for any routine which is not called from within if_vr.c
   itself; this includes entry points called by newbus, ifnet, callout,
   ifmedia, and polling subsystems.
 - Remove spl references from the code added to miibus callbacks in rev 1.60.
 - Add the INTR_MPSAFE bit.
 - Tidy up some assignments; locks are not needed for taking the address
   of something at a known offset, for example.
 - Tested on the machine this was committed from.

Tested on:	UP only, !debug.mpsafenet && debug.mpsafenet
Reviewed by:	rwatson
2004-07-03 02:59:02 +00:00
Bruce M Simpson
ca83b553e6 - Another whitespace pass; make locking calls more obvious.
- Use C99 types for vr_miibus_readreg().
2004-07-03 02:52:32 +00:00
John Baldwin
b5cbda5055 Add a NULL param to an mi_switch() that I missed.
Reported by:	Jung-uk Kim jkim at niksun dot com
2004-07-03 02:38:03 +00:00
Marcel Moolenaar
d7d057c585 Unbreak -O2 build: initialize nstatus to avoid uninitialized warning. 2004-07-03 02:10:52 +00:00
Bosko Milekic
abdb4e5d01 Fix SCHED_ULE build on SMP. The previous revision (1.110)
introduced a KSE_CAN_MIGRATE() invocation with one argument
missing (class).  Either this is a genuine forget or it crept
in from JHB's repo where he may have modified it.  If it's
the latter then it may require more attention.  For now fix
the make depend.
2004-07-03 01:19:46 +00:00
Marcel Moolenaar
8b44a2e2c9 Unbreak build for the the !PREEMPTION case: don't define variables
that aren't used in that case.
2004-07-03 00:57:43 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Bruce M Simpson
e37a7c5f5a style(9) compliance.
Put some braces around the busy-wait loop in vr_rxeoc() to make the
no-op semicolon more obvious.
No functional changes.
Running on the machine I am committing from without problems.

Reviewed by:	jmallett
2004-07-02 23:51:44 +00:00
Olivier Houchard
4428e74324 ithread_schedule() now only takes one argument. 2004-07-02 22:30:42 +00:00
Olivier Houchard
0e564675e4 Define __RMAN_RESOURCE_VISIBLE where appropriate. 2004-07-02 22:30:10 +00:00
Ruslan Ermilov
69cc5b91a0 Fixed what appeared to be a hard sentence break. 2004-07-02 21:49:22 +00:00
John Baldwin
0c0b25ae91 Implement preemption of kernel threads natively in the scheduler rather
than as one-off hacks in various other parts of the kernel:
- Add a function maybe_preempt() that is called from sched_add() to
  determine if a thread about to be added to a run queue should be
  preempted to directly.  If it is not safe to preempt or if the new
  thread does not have a high enough priority, then the function returns
  false and sched_add() adds the thread to the run queue.  If the thread
  should be preempted to but the current thread is in a nested critical
  section, then the flag TDF_OWEPREEMPT is set and the thread is added
  to the run queue.  Otherwise, mi_switch() is called immediately and the
  thread is never added to the run queue since it is switch to directly.
  When exiting an outermost critical section, if TDF_OWEPREEMPT is set,
  then clear it and call mi_switch() to perform the deferred preemption.
- Remove explicit preemption from ithread_schedule() as calling
  setrunqueue() now does all the correct work.  This also removes the
  do_switch argument from ithread_schedule().
- Do not use the manual preemption code in mtx_unlock if the architecture
  supports native preemption.
- Don't call mi_switch() in a loop during shutdown to give ithreads a
  chance to run if the architecture supports native preemption since
  the ithreads will just preempt DELAY().
- Don't call mi_switch() from the page zeroing idle thread for
  architectures that support native preemption as it is unnecessary.
- Native preemption is enabled on the same archs that supported ithread
  preemption, namely alpha, i386, and amd64.

This change should largely be a NOP for the default case as committed
except that we will do fewer context switches in a few cases and will
avoid the run queues completely when preempting.

Approved by:	scottl (with his re@ hat)
2004-07-02 20:21:44 +00:00
Nate Lawson
5a66986def Remove duplicate FreeBSD id. 2004-07-02 20:15:53 +00:00
Brooks Davis
f93dfa28b1 Don't announce the ethernet address when it's 00:00:00:00:00:00. It's
not of any interest.  This primairly happens when vlan(4) interfaces are
created.
2004-07-02 19:44:59 +00:00
Pawel Jakub Dawidek
e1237b285b Introduce GEOM_LABEL class.
This class is used for detecting volume labels on file systems:
UFS, MSDOSFS (FAT12, FAT16, FAT32) and ISO9660.
It also provide native labelization (there is no need for file system).

g_label_ufs.c is based on geom_vol_ffs from Gordon Tetlow.
g_label_msdos.c and g_label_iso9660.c are probably hacks, I just found
where volume labels are stored and I use those offsets here,
but with this class it should be easy to do it as it should be done by
someone who know how.
Implementing volume labels detection for other file systems also should
be trivial.

New providers are created in those directories:
/dev/ufs/ (UFS1, UFS2)
/dev/msdosfs/ (FAT12, FAT16, FAT32)
/dev/iso9660/ (ISO9660)
/dev/label/ (native labels, configured with glabel(8))

Manual page cleanups and some comments inside were submitted by
Simon L. Nielsen, who was, as always, very helpful. Thanks!
2004-07-02 19:40:36 +00:00
Nate Lawson
99eb9c8b3b Get rid of the strict aliasing error by retrieving the ECDT via a table
header pointer and then casting it to the ecdt pointer.  This fixes the
-O2 build.  I'm unsure what changed recently to reveal this error since
this code has been unchanged for months.
2004-07-02 19:17:27 +00:00
John Baldwin
bf0acc273a - Change mi_switch() and sched_switch() to accept an optional thread to
switch to.  If a non-NULL thread pointer is passed in, then the CPU will
  switch to that thread directly rather than calling choosethread() to pick
  a thread to choose to.
- Make sched_switch() aware of idle threads and know to do
  TD_SET_CAN_RUN() instead of sticking them on the run queue rather than
  requiring all callers of mi_switch() to know to do this if they can be
  called from an idlethread.
- Move constants for arguments to mi_switch() and thread_single() out of
  the middle of the function prototypes and up above into their own
  section.
2004-07-02 19:09:50 +00:00
Alexander Leidinger
a92c890fd1 Implement SNDCTL_DSP_SETDUPLEX. This may fix sound apps which want to
use full duplex mode.

Approved by:	matk
2004-07-02 15:31:44 +00:00
Warner Losh
828a0b7110 Disable native ata support for now, too much breaks 2004-07-02 13:42:36 +00:00
Max Laier
7929aa036c Bring in the first chunk of altq driver modifications. This covers the
following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4),
sis(4) and xl(4)

More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take
a look and tell me if "your" driver is missing, so I can fix this.

Tested-by:	many
No-objection:	-current, -net
2004-07-02 12:16:02 +00:00
David Xu
f3b929bf42 Allow ptrace to deal with lwpid.
Reviewed by: marcel
2004-07-02 09:19:22 +00:00
Mark Santcroos
bde5ba82c2 Local change: Allow access to the field if it is within the region
size rounded up to a multiple of the access byte width.  This overcomes
"off-by-one" programming errors in the AML often found in Toshiba
laptops.
2004-07-02 08:38:55 +00:00
Mark Santcroos
2e8f631a0d Local diff: allow use of the disassembler. 2004-07-02 08:37:56 +00:00
Mark Santcroos
727fde6f33 Unchanged files that are off the vendor branch. 2004-07-02 08:34:19 +00:00
Mark Santcroos
648474d5f4 This commit was generated by cvs2svn to compensate for changes in r131440,
which included commits to RCS files with non-trunk default branches.
2004-07-02 08:14:36 +00:00
Mark Santcroos
671d52d8aa Vendor import of Intel ACPI-CA 20040527 2004-07-02 08:14:36 +00:00
Alfred Perlstein
95f004dccd We allocate an array of pointers to the global file table while
not holding the filelist_lock.  This means the filelist can change
size while allocating.  Detect this race and retry the allocation.
2004-07-02 07:40:10 +00:00
John Baldwin
a3a7017895 Tidy up uprof locking. Mostly the fields are protected by both the proc
lock and sched_lock so they can be read with either lock held.  Document
the locking as well.  The one remaining bogosity is that pr_addr and
pr_ticks should be per-thread but profiling of multithreaded apps is
currently undefined.
2004-07-02 03:50:48 +00:00
John Baldwin
16f9f20579 - Assert that any process that has statclock called on it has both a
stats structure and a vmspace as this should always be true rather
  than checking the always true condition in an if statement.
- Remove never-false check: if ((ru = &pstats->p_ru) != NULL)
- Remove pstats variable that is only used once and inline its one use
  instead.
2004-07-02 03:48:09 +00:00
Scott Long
3320b0b2e5 Allocate s/g segments in the tag rather than on the stack. 2004-07-02 03:47:28 +00:00
John Baldwin
d202e0cccc - Don't use a variable to point to the user area that we only use once.
Just use p2->p_uarea directly instead.
- Remove an old and mostly bogus assertion regarding p2->p_sigacts.
- Use RANGEOF macro ala fork1() to clean up bzero/bcopy of p_stats.
2004-07-02 03:45:07 +00:00
John Baldwin
b68c582ef8 Add support for the VIA Apollo KT400/400A/600 AGP host bridges which use
the VIA v3 register offsets.

PR:		68545
Submitted by:	Ariff Abdullah <skywizard@mybsd.org.my>
2004-07-02 03:39:33 +00:00
Marcel Moolenaar
cd28f17da2 Change the thread ID (thr_id_t) used for 1:1 threading from being a
pointer to the corresponding struct thread to the thread ID (lwpid_t)
assigned to that thread. The primary reason for this change is that
libthr now internally uses the same ID as the debugger and the kernel
when referencing to a kernel thread. This allows us to implement the
support for debugging without additional translations and/or mappings.

To preserve the ABI, the 1:1 threading syscalls, including the umtx
locking API have not been changed to work on a lwpid_t. Instead the
1:1 threading syscalls operate on long and the umtx locking API has
not been changed except for the contested bit. Previously this was
the least significant bit. Now it's the most significant bit. Since
the contested bit should not be tested by userland, this change is
not expected to be visible. Just to be sure, UMTX_CONTESTED has been
removed from <sys/umtx.h>.

Reviewed by: mtm@
ABI preservation tested on: i386, ia64
2004-07-02 00:40:07 +00:00
Marcel Moolenaar
c2589102b0 Regen. 2004-07-02 00:38:56 +00:00
Oliver Eikemeier
51a153627b Bump __FreeBSD_version for package tools revision 20040629 2004-07-02 00:01:34 +00:00
Don Lewis
e06500dde5 When shutting down the syncer kernel thread, first tell it to run
faster and iterate to over its work list a few times in an attempt
to empty the work list before the syncer terminates.  This leaves
fewer dirty blocks to be written at the "syncing disks" stage and
keeps the the "giving up on N buffers" problem from being triggered
by the presence of a large soft updates work list at system shutdown
time.  The downside is that the syncer takes noticeably longer to
terminate.

Tested by:	"Arjan van Leeuwen" <avleeuwen AT piwebs DOT com>
Approved by:	mckusick
2004-07-01 23:59:19 +00:00
Jayanth Vijayaraghavan
a0445c2e2c On receiving 3 duplicate acknowledgements, SACK recovery was not being entered correctly.
Fix this problem by separating out the SACK and the newreno cases. Also, check
if we are in FASTRECOVERY for the sack case and if so, turn off dupacks.

Fix an issue where the congestion window was not being incremented by ssthresh.

Thanks to Mohan Srinivasan for finding this problem.
2004-07-01 23:34:06 +00:00
Tony Ackerman
6ff8a07467 PR kern/68474:
Changed if_ipending to if_flags
2004-07-01 22:37:47 +00:00
Scott Long
c0daeb2592 Remove stray i386 math emulator references. 2004-07-01 22:18:06 +00:00
Lukas Ertl
acd6dd0ca1 MFNetBSD.
rev 1.66, author: mycroft
   Fix an endianness problem (EHCI_NULL was being double-swapped).

Obtained from:  NetBSD
2004-07-01 21:17:50 +00:00
Lukas Ertl
c88e858068 MFNetBSD.
rev. 1.68, author: mycroft
   Ignore a port error that happens to come in at the same time as a
   connect status change.  Some root hubs seem to report both.

Obtained from:   NetBSD
2004-07-01 21:14:03 +00:00
Ruslan Ermilov
c9a246418d Bumped document date.
Fixed markup.
Fixed examples to match the new API.
2004-07-01 17:51:48 +00:00
Warner Losh
a4da0c4b6b Remove duplicate FreeBSD id 2004-07-01 17:23:49 +00:00
Warner Losh
87573bee79 While this file still needs __RMAN_RESOURCE_VISIBLE to get the size of
the struct resource for a malloc, it no longer needs it for the r_
elements of struct resource with this commit.
2004-07-01 17:23:11 +00:00
Warner Losh
d9aa98f83b After re-exporting rman, et al, __RMAN_RESOURCE_VISIBLE is no longer
necessary for this file.  It just needed the size and guts of struct
rman.
2004-07-01 17:21:18 +00:00
Brooks Davis
c9e7c6f4fb Add support to the uftdi driver for Intrepid Control Systems' vehicle
bus interfaces.  These interfaces use the FTDI chipset with different
Vendor and Product IDs.

Add two additional baud rate enumerations.  The vehicle bus interfaces
use a baud rate of 2000000.  Also add 3000000 as it is the other FTDI
baud divisor special case.

I've commited a slightly different patch from that provided in the PR as
I changed the matching code a bit yesterday.

Submitted by:	Mike Durian <durian at shadetreesoftware.com>
PR:		kern/67357
2004-07-01 17:16:20 +00:00
Warner Losh
da35daffaf Add ability to set start/end for rman 2004-07-01 16:22:10 +00:00
Warner Losh
deb9654818 Soften __RMAN_RESOURCE_VISIBLE a little: expose rman and the
resource_head types.  Also add a way to set start and end so fewer
things need to reach into struct resource.

Pointy hat to: imp for breaking the build on so many platforms.
2004-07-01 16:20:58 +00:00
Pawel Jakub Dawidek
9ecdd506ea Remove unused argument for good. 2004-07-01 15:42:03 +00:00
Mark Peek
213fbd7666 Fix build: the return type for t_break changed from int to void. 2004-07-01 15:19:08 +00:00
Andrew Gallatin
5fd93b771b Catch up with __RMAN_RESOURCE_VISIBLE enough to get GENERIC to build 2004-07-01 15:07:27 +00:00
Pawel Jakub Dawidek
916a3aa05b Free only if pointer isn't NULL. 2004-07-01 12:42:13 +00:00
Yoshihiro Takahashi
7f1fb91a0a This needs __RMAN_RESOURCE_VISIBLE if PC98 is defined. 2004-07-01 09:36:31 +00:00
Yoshihiro Takahashi
6f5e06c605 MFi386: revision 1.1163 2004-07-01 09:34:15 +00:00
Yoshihiro Takahashi
b9d41c7aae Merged from sys/dev/sio/sio.c revision 1.446. 2004-07-01 09:32:32 +00:00
Peter Grehan
6cc1cdf47b Modify loop test when cycling through phys_avail array. It's possible
for an OpenFirmware implementation to have a single memory region
(hello PearPC).
2004-07-01 08:01:49 +00:00
Peter Grehan
57dc54db86 Catch up with __RMAN_RESOURCE_VISIBLE change 2004-07-01 07:59:08 +00:00
Peter Grehan
6c62609340 Move soft structs back to C files to avoid exposing rman fields
to clients now that it's protected with __RMAN_RESOURCE_VISIBLE
2004-07-01 07:56:56 +00:00
John Baldwin
39981fed82 Trim a few things from the dmesg output and stick them under bootverbose to
cut down on the clutter including PCI interrupt routing, MTRR, pcibios,
etc.

Discussed with:	USENIX Cabal
2004-07-01 07:46:29 +00:00
Paul Saab
2673a44621 Use a separate flag when doing a kernel coredump when polling for
completion instead of abusing the interrupt enable flag.
2004-07-01 06:56:10 +00:00
Paul Saab
b7c29ad503 When building a kernel or the loader, let the hostname be overridden 2004-07-01 06:40:12 +00:00