]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years ago - Restore runq to manipulating threads directly by putting runq links and
jeff [Thu, 20 Mar 2008 05:51:16 +0000 (05:51 +0000)]
 - Restore runq to manipulating threads directly by putting runq links and
   rqindex back in struct thread.
 - Compile kern_switch.c independently again and stop #include'ing it from
   schedulers.
 - Remove the ts_thread backpointers and convert most code to go from
   struct thread to struct td_sched.
 - Cleanup the ts_flags #define garbage that was causing us to sometimes
   do things that expanded to td->td_sched->ts_thread->td_flags in 4BSD.
 - Export the kern.sched sysctl node in sysctl.h

16 years agoforced commit to add that the fix in the previous commit was submitted by Devon H...
kmacy [Thu, 20 Mar 2008 05:45:27 +0000 (05:45 +0000)]
forced commit to add that the fix in the previous commit was submitted by Devon H. O'Dell

16 years agoDon't re-initialize the interface if it is already running.
kmacy [Thu, 20 Mar 2008 05:35:02 +0000 (05:35 +0000)]
Don't re-initialize the interface if it is already running.

This one line change makes the following code found in many ethernet device drivers
(at least em, igb, ixgbe, and cxgb) gratuitous

case SIOCSIFADDR:
if (ifa->ifa_addr->sa_family == AF_INET) {
/*
 * XXX
 * Since resetting hardware takes a very long time
 * and results in link renegotiation we only
 * initialize the hardware only when it is absolutely
 * required.
 */
ifp->if_flags |= IFF_UP;
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
EM_CORE_LOCK(adapter);
em_init_locked(adapter);
EM_CORE_UNLOCK(adapter);
}
arp_ifinit(ifp, ifa);
} else
error = ether_ioctl(ifp, command, data);
break;

16 years ago- Add the Corega CG-WLUSB2GL from NetBSD
kevlo [Thu, 20 Mar 2008 05:05:37 +0000 (05:05 +0000)]
- Add the Corega CG-WLUSB2GL from NetBSD
- Add the Corega CG-WLUSB2GPX

16 years agoImprove VT_WAITACTIVE semantics.
bland [Thu, 20 Mar 2008 04:10:52 +0000 (04:10 +0000)]
Improve VT_WAITACTIVE semantics.
- Wait for requested vty activation regardless its open state.
- Remove redundant console cleanup.

Approved by: kib
MFC after: 1 week

16 years agoadd some debug msgs for tracking xfers
sam [Thu, 20 Mar 2008 03:11:07 +0000 (03:11 +0000)]
add some debug msgs for tracking xfers

16 years agoadd support for %b printing of request + xfer flags
sam [Thu, 20 Mar 2008 03:09:59 +0000 (03:09 +0000)]
add support for %b printing of request + xfer flags

16 years ago - Remove the unused and redundant sched_newproc() function.
jeff [Thu, 20 Mar 2008 03:09:15 +0000 (03:09 +0000)]
 - Remove the unused and redundant sched_newproc() function.
 - Remove the unused and redundant sched_newthread() which peaks into scheduler
   private structures.

16 years ago - There is no sense in calling sched_newthread() at thread_init() and
jeff [Thu, 20 Mar 2008 03:07:57 +0000 (03:07 +0000)]
 - There is no sense in calling sched_newthread() at thread_init() and
   thread_fini().  The schedulers initialize themselves properly during
   sched_fork_thread() anyhow.  fini is only called when we're returning
   the memory to the allocator which surely doesn't care what state the
   memory is in.

16 years ago - ULE and 4BSD share only one line of code from sched_newthread() so implement
jeff [Thu, 20 Mar 2008 03:06:33 +0000 (03:06 +0000)]
 - ULE and 4BSD share only one line of code from sched_newthread() so implement
   the required pieces in sched_fork_thread().  The td_sched pointer is already
   setup by thread_init anyway.

16 years ago - Don't call the empty sched_newproc() function. sched_newproc() already
jeff [Thu, 20 Mar 2008 03:05:17 +0000 (03:05 +0000)]
 - Don't call the empty sched_newproc() function.  sched_newproc() already
   existed as sched_fork() which is a non empty function in both schedulers.

16 years agoResolve conflicts.
delphij [Thu, 20 Mar 2008 02:56:24 +0000 (02:56 +0000)]
Resolve conflicts.

16 years agoUpdate upgrade instructions to reflect 1.0.5 import; add FREEBSD-vendor
delphij [Thu, 20 Mar 2008 02:45:32 +0000 (02:45 +0000)]
Update upgrade instructions to reflect 1.0.5 import; add FREEBSD-vendor
metadata file.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r177420,
delphij [Thu, 20 Mar 2008 02:16:44 +0000 (02:16 +0000)]
This commit was generated by cvs2svn to compensate for changes in r177420,
which included commits to RCS files with non-trunk default branches.

16 years agoVirgin import (trimmed) of Bzip2 version 1.0.5.
delphij [Thu, 20 Mar 2008 02:16:44 +0000 (02:16 +0000)]
Virgin import (trimmed) of Bzip2 version 1.0.5.

16 years ago - Move maybe_preempt() from kern_switch.c to sched_4bsd.c. This is function
jeff [Thu, 20 Mar 2008 02:14:02 +0000 (02:14 +0000)]
 - Move maybe_preempt() from kern_switch.c to sched_4bsd.c.  This is function
   is only used by 4bsd.
 - Create a new runq_choose_fuzz() function rather than polluting runq_choose()
   with 4BSD specific code.
 - Move the fuzz sysctl into sched_4bsd.c
 - Remove some dead code from kern_switch.c

16 years ago - Directly include opt_sched.h in sched_4bsd.
jeff [Thu, 20 Mar 2008 01:32:48 +0000 (01:32 +0000)]
 - Directly include opt_sched.h in sched_4bsd.

16 years ago - Add an option to compile in SCHED_STATS.
jeff [Thu, 20 Mar 2008 01:30:49 +0000 (01:30 +0000)]
 - Add an option to compile in SCHED_STATS.
 - Add some more information about SLEEPQUEUE_PROFILING to NOTES.

16 years agoReplace really convoluted code that simplifies to "a ^= 0x01;"
julian [Wed, 19 Mar 2008 22:29:11 +0000 (22:29 +0000)]
Replace really convoluted code that simplifies to "a ^= 0x01;"

16 years agofix link management bug and conditionally allow the PHY to be kept on at all times...
kmacy [Wed, 19 Mar 2008 20:56:51 +0000 (20:56 +0000)]
fix link management bug and conditionally allow the PHY to be kept on at all times for allowing non-conformant link state checks

16 years agoRename vm_pageq_requeue() to vm_page_requeue() on account of its recent
alc [Wed, 19 Mar 2008 20:24:35 +0000 (20:24 +0000)]
Rename vm_pageq_requeue() to vm_page_requeue() on account of its recent
migration to vm/vm_page.c.

16 years agoRe-enable the CVS build.
obrien [Wed, 19 Mar 2008 15:21:44 +0000 (15:21 +0000)]
Re-enable the CVS build.

16 years agoUpdate for version 1.11-20080310.
obrien [Wed, 19 Mar 2008 15:19:42 +0000 (15:19 +0000)]
Update for version 1.11-20080310.
Make our changes to CVS_RSH & CVS_SSH settings here instead of
  contrib/cvs/src/cvs.h.

16 years ago+ Make it clear this was taken from the CVS 1.11 branch on 10-March-2008.
obrien [Wed, 19 Mar 2008 15:18:03 +0000 (15:18 +0000)]
+ Make it clear this was taken from the CVS 1.11 branch on 10-March-2008.
+ Depend on $CVSDIR/configure also - so things get properly remade if we tweak.

16 years agoRemove FreeBSD ID's so these are exact copies of the vendor sources.
obrien [Wed, 19 Mar 2008 15:15:26 +0000 (15:15 +0000)]
Remove FreeBSD ID's so these are exact copies of the vendor sources.

16 years agoWe use the stock versions of these files.
obrien [Wed, 19 Mar 2008 15:11:46 +0000 (15:11 +0000)]
We use the stock versions of these files.

16 years agoActually our rev 1.21(change default from "rsh" to "ssh") tweaking is
obrien [Wed, 19 Mar 2008 15:10:20 +0000 (15:10 +0000)]
Actually our rev 1.21(change default from "rsh" to "ssh") tweaking is
moving to gnu/usr.bin/cvs/lib/config.h.proto.  So the rev 1.21 no longer
is applicable here.

16 years agoMerge rev 1.9 (new long flag to ignore the CVSROOT/passwd file)
obrien [Wed, 19 Mar 2008 15:08:01 +0000 (15:08 +0000)]
Merge rev 1.9 (new long flag to ignore the CVSROOT/passwd file)
rev 1.2 (local tag/$Id$ keyword support)  into version 1.11-20080310.

16 years agoMerge rev 1.9 (update "-T" Template support) and rev 1.2 (-D'date'
obrien [Wed, 19 Mar 2008 15:07:28 +0000 (15:07 +0000)]
Merge rev 1.9 (update "-T" Template support) and rev 1.2 (-D'date'
option with -r'branch' on update)  into version 1.11-20080310.

16 years agoMerge rev 1.28 (CAN-2005-0753 / FreeBSD-SA-05:05.cvs fixes),
obrien [Wed, 19 Mar 2008 15:06:50 +0000 (15:06 +0000)]
Merge rev 1.28 (CAN-2005-0753 / FreeBSD-SA-05:05.cvs fixes),
rev 1.27 ("iso8601" option keyword) revs 1.12/1.10/1.5/1.4 ($CVSHeader$
support) rev 1.2 ($CVS_LOCAL_BRANCH_NUM support for local commit
feature of cvsup)  into version 1.11-20080310.

16 years agoMerge rev 1.2 (extensions to the $CVSROOT/config syntax) and
obrien [Wed, 19 Mar 2008 15:05:27 +0000 (15:05 +0000)]
Merge rev 1.2 (extensions to the $CVSROOT/config syntax) and
rev 1.4 (1.12 CVSROOT/config keyword expansion forward compatability)
into version 1.11-20080310.
Note the vendor has also added some forward compatability support.
We should determine if we can live with just the vendor's method.

16 years agoMerge rev 1.25 ("iso8601" option keyword), rev 1.17 (environtmental var
obrien [Wed, 19 Mar 2008 15:00:43 +0000 (15:00 +0000)]
Merge rev 1.25 ("iso8601" option keyword), rev 1.17 (environtmental var
"CVS_OPTIONS"), rev 1.14 ('-g' option to support shared-group access),
rev 1.7 ('-R' read-only repository mode), rev 1.6 (support for checking
out from a read-only repository), revs 1.4 & 1.5 ("tagexpand=")
into version 1.11-20080310.  Note the vendor accepted my "blame" alias.

16 years agoMerge rev. 1.2 ("iso8601" option keyword) into version 1.11-20080310.
obrien [Wed, 19 Mar 2008 14:56:41 +0000 (14:56 +0000)]
Merge rev. 1.2 ("iso8601" option keyword)  into version 1.11-20080310.
Note the vendor added our '-n' feature to the offical code base.

16 years agoMerge rev 1.3 (catch write-lock attempts immediately if running in
obrien [Wed, 19 Mar 2008 14:55:59 +0000 (14:55 +0000)]
Merge rev 1.3 (catch write-lock attempts immediately if running in
read-only mode) & rev 1.2 (check out from read-only repository support)
into version 1.11-20080310.

16 years agoMerge rev 1.21: change default from "rsh" to "ssh", rev 1.14: comprehensive
obrien [Wed, 19 Mar 2008 14:50:22 +0000 (14:50 +0000)]
Merge rev 1.21: change default from "rsh" to "ssh", rev 1.14: comprehensive
-T CVS/Template support, rev 1.9: new long flag that causes cvs to ignore
the CVSROOT/passwd file, rev 1.3: support for checking out from a read-only
repository, rev. 1.2: support for local $Id$ keyword  into cvs 1.11-20080310.

16 years agoMerge rev 1.7: always upload new files, even if the timestamps match,
obrien [Wed, 19 Mar 2008 14:49:14 +0000 (14:49 +0000)]
Merge rev 1.7: always upload new files, even if the timestamps match,
rev 1.2: fix a problem sometimes seen when doing checkouts from a local repo
and committing via remote cvs (a cvs -d override of the mismatched CVS/Root
files was missing)  into cvs 1.11-20080310.

Note that rev 1.4 (default CVS_RSH to "ssh") will not be handled thru the
vendor's config.h.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r177391,
obrien [Wed, 19 Mar 2008 14:46:59 +0000 (14:46 +0000)]
This commit was generated by cvs2svn to compensate for changes in r177391,
which included commits to RCS files with non-trunk default branches.

16 years agoImport of 1.11 branch snapshot - using the 10-March-2008 code base.
obrien [Wed, 19 Mar 2008 14:46:59 +0000 (14:46 +0000)]
Import of 1.11 branch snapshot - using the 10-March-2008 code base.

16 years agoBe sure to run rc.d/zfs before mountcritremote. This way we can for example
pjd [Wed, 19 Mar 2008 14:44:55 +0000 (14:44 +0000)]
Be sure to run rc.d/zfs before mountcritremote. This way we can for example
configure devfs rules in /etc/devfs.conf for ZVOLs.

Submitted by: Yarema <yds@CoolRat.org>

16 years agoDisable CVS build.
obrien [Wed, 19 Mar 2008 14:44:48 +0000 (14:44 +0000)]
Disable CVS build.

16 years agoAdd the correct license.
gnn [Wed, 19 Mar 2008 13:57:21 +0000 (13:57 +0000)]
Add the correct license.

16 years agoA multicast test. The mctest program acts as both a source and a sink
gnn [Wed, 19 Mar 2008 12:44:23 +0000 (12:44 +0000)]
A multicast test.  The mctest program acts as both a source and a sink
for multicast packets.  Parameters for the interface, packet size,
number of packets, and interpacket gap may be given on the command line.
The sink records how many packets were missed, and at what time each
packet arrived.

16 years agoFix a regression from the last revision - don't edit the ns_rec list while
dfr [Wed, 19 Mar 2008 12:33:25 +0000 (12:33 +0000)]
Fix a regression from the last revision - don't edit the ns_rec list while
not holding the lock.

16 years agoAdd support for MACHINE_ARCH == mips, plus a few generic CPU types that
imp [Wed, 19 Mar 2008 12:20:44 +0000 (12:20 +0000)]
Add support for MACHINE_ARCH == mips, plus a few generic CPU types that
will be supported in the forth coming FreeBSD/mips port.

16 years agoExplicitate the newpacket size.
piso [Wed, 19 Mar 2008 11:28:13 +0000 (11:28 +0000)]
Explicitate the newpacket size.

Bug pointed out by: many
Pointy hat to: me :(

16 years agoFix two bugs introduced in conversion to FreeBSD source tree:
phk [Wed, 19 Mar 2008 10:56:51 +0000 (10:56 +0000)]
Fix two bugs introduced in conversion to FreeBSD source tree:

Off by one error in length calcuation of string records.
Don't attempt to free stack variable.

16 years agoRevert previous change - it appears that the limit I was hitting was a
sobomax [Wed, 19 Mar 2008 09:58:25 +0000 (09:58 +0000)]
Revert previous change - it appears that the limit I was hitting was a
maxsockets limit, not maxfiles limit. The question remains why those
limits are handled differently (with error code for maxfiles but with
sleep for maxsokets), but those would be addressed in a separate commit
if necessary.

Requested by:   rwhatson, jeff

16 years agodon't reduce new thread's refcount if current thread can not set cpuset
davidxu [Wed, 19 Mar 2008 09:33:07 +0000 (09:33 +0000)]
don't reduce new thread's refcount if current thread can not set cpuset
for it, since the new thread will reduce it by itself.

16 years ago- Trim trailing spaces.
davidxu [Wed, 19 Mar 2008 08:13:04 +0000 (08:13 +0000)]
- Trim trailing spaces.
- Use a different sigmask variable name to avoid confusing.

16 years agoRemove extra uihold() call that accidentally sneak in during perforce
pjd [Wed, 19 Mar 2008 07:52:07 +0000 (07:52 +0000)]
Remove extra uihold() call that accidentally sneak in during perforce
change @125544.

16 years ago - Remove some dead code and comments related to KSE.
jeff [Wed, 19 Mar 2008 07:36:37 +0000 (07:36 +0000)]
 - Remove some dead code and comments related to KSE.
 - Don't set tdq_lowpri on every switch, it should be precisely maintained now.
 - Add some comments to sched_thread_priority().

16 years ago - At the top of sleepq_catch_signals() lock the thread and check TDF_NEEDSIGCHK
jeff [Wed, 19 Mar 2008 07:35:14 +0000 (07:35 +0000)]
 - At the top of sleepq_catch_signals() lock the thread and check TDF_NEEDSIGCHK
   before doing the very expensive cursig() and related locking.  NEEDSIGCHK
   is updated whenever our signal mask change or when a signal is delivered and
   should be sufficient to avoid the more expensive tests.  This eliminates
   another source of PROC_LOCK contention in multithreaded programs.

16 years ago - Remove stale comment.
jeff [Wed, 19 Mar 2008 07:33:16 +0000 (07:33 +0000)]
 - Remove stale comment.
 - In the last revision the code was changed to use maxfilesperproc rather than
   the per-process file limit to restrict the size of the poll array.  This
   eliminates a significant source of process lock contention in multithreaded
   programs and is cheaper.  This had been committed with the wrong batch of
   changes.

16 years agoOops. Use atomic_add_long() for atomic_fetchadd_long() (not atomic_add_int())
pjd [Wed, 19 Mar 2008 07:27:24 +0000 (07:27 +0000)]
Oops. Use atomic_add_long() for atomic_fetchadd_long() (not atomic_add_int())
for sparc64 and sun4v.

Noticed by: marius

16 years ago - Add a facility similar to LOCK_PROFILING under SLEEPQUEUE_PROFILING. Keep
jeff [Wed, 19 Mar 2008 07:22:07 +0000 (07:22 +0000)]
 - Add a facility similar to LOCK_PROFILING under SLEEPQUEUE_PROFILING.  Keep
   a simple (wmesg, count) tuple in a hash to keep track of how many times
   we sleep at each wait message.  We hash on message and not channel.  No
   line number information is given as typically wait messages are not used in
   more than one place.  Identical strings defined at different addresses will
   show up with seperate counters.
 - Use debug.sleepq.enable to enable, .reset to reset, and .stats dumps stats.
 - Do an unsynchronized check in sleepq_switch() prior to switching before
   calling sleepq_profile() which uses a global lock to synchronize the hash.
   Only sleeps which actually cause a context switch are counted.

16 years ago - Fix the last of the threading bugs that were introduced as far back as
jeff [Wed, 19 Mar 2008 07:13:24 +0000 (07:13 +0000)]
 - Fix the last of the threading bugs that were introduced as far back as
   1.38 in 2001.  Break out of the FOREACH_THREAD_IN_PROC loop when we've
   discovered a new proc in the chain.
 - Increment i and check for maxlockdepth once per matching process not
   once per thread.  This didn't properly terminate the loop before.
 - Fix a bug which has existed potentially since rev 1.1.  waitblock->lf_next
   can be NULL when a thread has been woken-up but not yet scheduled.  Check
   for this condition rather than blindly dereferencing.

Found by: libMicro

16 years agoif passed thread pointer is equal to current thread, pass -1 to kernel
davidxu [Wed, 19 Mar 2008 06:38:21 +0000 (06:38 +0000)]
if passed thread pointer is equal to current thread, pass -1 to kernel
to speed up searching.

16 years ago - Restore the NULL check for td_cpuset. This can happen if a partially
jeff [Wed, 19 Mar 2008 06:20:21 +0000 (06:20 +0000)]
 - Restore the NULL check for td_cpuset.  This can happen if a partially
   constructed thread was torn down as is the case when we fail to allocate
   a kernel stack.

16 years ago - Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from
jeff [Wed, 19 Mar 2008 06:19:01 +0000 (06:19 +0000)]
 - Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from
   requiring the per-process spinlock to only requiring the process lock.
 - Reflect these changes in the proc.h documentation and consumers throughout
   the kernel.  This is a substantial reduction in locking cost for these
   fields and was made possible by recent changes to threading support.

16 years agoEnsure that the section header table is written out in an order
jkoshy [Wed, 19 Mar 2008 06:06:34 +0000 (06:06 +0000)]
Ensure that the section header table is written out in an order
consistent with the section indices returned to the application by
elf_ndxscn().

Submitted by: kaiw

16 years agoClarify that the ELF library only sets the sh_entsize field of a
jkoshy [Wed, 19 Mar 2008 05:07:49 +0000 (05:07 +0000)]
Clarify that the ELF library only sets the sh_entsize field of a
section header entry if the application is not taking charge of ELF
object layout.

Update (c) years, and bump the manual page's date.

Submitted by: kaiw

16 years agoAdd mandatory "security description" SDP parameter to the PANU profile
emax [Wed, 19 Mar 2008 00:06:30 +0000 (00:06 +0000)]
Add mandatory "security description" SDP parameter to the PANU profile

Pointed-out by: Iain Hibbert < plunky at rya-online dot net >
MFC after: 3 days

16 years agoadd reject+blackhole keywords to install entries with RTF_BLACKHOLE
sam [Tue, 18 Mar 2008 21:45:27 +0000 (21:45 +0000)]
add reject+blackhole keywords to install entries with RTF_BLACKHOLE
and RTF_REJECT, respectively

PR: bin/79228
Submitted by: Dan Lukes <dan@obluda.cz>
MFC after: 2 weeks

16 years agoDon't call nfs_realign while holding locks.
dfr [Tue, 18 Mar 2008 18:42:59 +0000 (18:42 +0000)]
Don't call nfs_realign while holding locks.

Reviewed by: kib

16 years agoAdd PSM and Load Factor SDP parameters to the BNEP based profiles
emax [Tue, 18 Mar 2008 18:21:39 +0000 (18:21 +0000)]
Add PSM and Load Factor SDP parameters to the BNEP based profiles
(NAP, GN and PANU). No reason to not to support them.

Separate SDP parameters data structures for the BNEP based profiles.

Generalize Service Availability SDP parameter creation.

Requested by: Iain Hibbert < plunky at rya-online dot net >
MFC after: 3 days

16 years agoChange .8s port name restriction to .15s.
ume [Tue, 18 Mar 2008 15:04:05 +0000 (15:04 +0000)]
Change .8s port name restriction to .15s.
This change corresponds to inet.c 1.13.

MFC after: 1 week

16 years agoCatch up to intr_event_create() prototype change.
jhb [Tue, 18 Mar 2008 13:31:45 +0000 (13:31 +0000)]
Catch up to intr_event_create() prototype change.

Pointy hat: jhb

16 years ago- Fix a memory leak when re-discovering a gvinum configuration.
lulf [Tue, 18 Mar 2008 08:48:51 +0000 (08:48 +0000)]
- Fix a memory leak when re-discovering a gvinum configuration.

Approved by: pjd (mentor)
MFC after: 1 week

16 years agoSign-extend the 48-bit AMD PMC counter before treating it to a 64-bit
adrian [Tue, 18 Mar 2008 08:39:11 +0000 (08:39 +0000)]
Sign-extend the 48-bit AMD PMC counter before treating it to a 64-bit
2's compliment.

The 2's compliment transform is done so a "count down" sampling interval
can be converted into a "count up" PMC value. a 2's complimented 'count down'
value is written to the PMC counter; then the read-back counter is reverted
via another 2's compliment.

PR: kern/121660
Reviewed by: jkoshy
Approved by: jkoshy
MFC after: 1 week

16 years agoFix the debugging output - the '0x' was duplicated from the %p option.
adrian [Tue, 18 Mar 2008 08:36:19 +0000 (08:36 +0000)]
Fix the debugging output - the '0x' was duplicated from the %p option.

16 years agoAlmost seven years ago, vm/vm_page.c was split into three parts:
alc [Tue, 18 Mar 2008 06:52:15 +0000 (06:52 +0000)]
Almost seven years ago, vm/vm_page.c was split into three parts:
vm/vm_contig.c, vm/vm_page.c, and vm/vm_pageq.c.  Today, vm/vm_pageq.c
has withered to the point that it contains only four short functions,
two of which are only used by vm/vm_page.c.  Since I can't foresee any
reason for vm/vm_pageq.c to grow, it is time to fold the remaining
contents of vm/vm_pageq.c back into vm/vm_page.c.

Add some comments.  Rename one of the functions, vm_pageq_enqueue(),
that is now static within vm/vm_page.c to vm_page_enqueue().
Eliminate PQ_MAXCOUNT as it no longer serves any purpose.

16 years agoFix --fast-read by decrementing the remaining patterns to be matched,
kientzle [Tue, 18 Mar 2008 06:18:49 +0000 (06:18 +0000)]
Fix --fast-read by decrementing the remaining patterns to be matched,
instead of incrementing.

Pointy hat: me
Thanks to: Tomasz Przygoda
MFC after: 3 days

16 years ago- Integrate 1.133 vendor driver changes
kmacy [Tue, 18 Mar 2008 03:55:12 +0000 (03:55 +0000)]
- Integrate 1.133 vendor driver changes
- update some copyrights
- add improved support for delayed ack
- fix issue with fec

16 years ago- Copy signal mask out before THR_UNLOCK(), because THR_UNLOCK() may call
davidxu [Tue, 18 Mar 2008 02:06:51 +0000 (02:06 +0000)]
- Copy signal mask out before THR_UNLOCK(), because THR_UNLOCK() may call
  _thr_suspend_check() which messes sigmask saved in thread structure.
- Don't suspend a thread has force_exit set.
- In pthread_exit(), if there is a suspension flag set, wake up waiting-
  thread after setting PS_DEAD, this causes waiting-thread to break loop
  in suspend_common().

16 years agoDon't cache ptr to nat rule in case of tablearg argument.
piso [Mon, 17 Mar 2008 23:02:56 +0000 (23:02 +0000)]
Don't cache ptr to nat rule in case of tablearg argument.

Bug spotted by: Dyadchenko Mihail

16 years agoSimplify the interrupt code a bit:
jhb [Mon, 17 Mar 2008 22:42:01 +0000 (22:42 +0000)]
Simplify the interrupt code a bit:
- Always include the ie_disable and ie_eoi methods in 'struct intr_event'
  and collapse down to one intr_event_create() routine.  The disable and
  eoi hooks simply aren't used currently in the !INTR_FILTER case.
- Expand 'disab' to 'disable' in a few places.
- Use function casts for arm and i386:intr_eoi_src() instead of wrapper
  routines since to trim one extra indirection.

Compiled on: {arm,amd64,i386,ia64,ppc,sparc64} x {FILTER, !FILTER}
Tested on: {amd64,i386} x {FILTER, !FILTER}

16 years agoDon't abuse stack space while in kernel land, use heap instead.
piso [Mon, 17 Mar 2008 22:08:31 +0000 (22:08 +0000)]
Don't abuse stack space while in kernel land, use heap instead.

16 years agoInitialize variable "now" before using it (it is used by the LEFTEARTH
antoine [Mon, 17 Mar 2008 18:31:43 +0000 (18:31 +0000)]
Initialize variable "now" before using it (it is used by the LEFTEARTH
macro)

PR: 121418
Submitted by: Atsuo Ohki
Approved by: rwatson (mentor)
MFC after: 1 month

16 years agoSimplify fcntl(SVR4_F_DUP2FD) code now that FreeBSD has F_DUP2FD.
antoine [Mon, 17 Mar 2008 18:27:28 +0000 (18:27 +0000)]
Simplify fcntl(SVR4_F_DUP2FD) code now that FreeBSD has F_DUP2FD.

Approved by: rwatson (mentor)

16 years agoDon't allocate the constant array "props" on the stack in wctype.
antoine [Mon, 17 Mar 2008 18:22:23 +0000 (18:22 +0000)]
Don't allocate the constant array "props" on the stack in wctype.

PR: 74743
Submitted by: knut st. osmundsen
Approved by: rwatson (mentor)
MFC after: 1 month

16 years agoLocking in the ses_ioctl handler doesn't have to be so strict because
scottl [Mon, 17 Mar 2008 17:18:16 +0000 (17:18 +0000)]
Locking in the ses_ioctl handler doesn't have to be so strict because
the referenced data is only obtained/changed in the device open handler,
and the ioctl handler can only run after the open handler.  Also fix a
few nearby style issues.

Submitted by: Matt Jacob

16 years agoBah, missed one instance in the previous commit. Correct bpf
brueffer [Mon, 17 Mar 2008 16:37:35 +0000 (16:37 +0000)]
Bah, missed one instance in the previous commit.  Correct bpf
data-link type here as well.

PR: 121477

16 years agoCorrect bpf data-link type.
brueffer [Mon, 17 Mar 2008 16:33:34 +0000 (16:33 +0000)]
Correct bpf data-link type.

PR: 121477
Submitted by: Sam Banks
MFC after: 3 days

16 years agoFix two races in the handling of the d_gianttrick for the D_NEEDGIANT
kib [Mon, 17 Mar 2008 13:17:10 +0000 (13:17 +0000)]
Fix two races in the handling of the d_gianttrick for the D_NEEDGIANT
drivers.

In the giant_XXX wrappers for the device methods of the D_NEEDGIANT
drivers, do not dereference the cdev->si_devsw. It is racing with
the destroy_devl() clearing of the si_devsw. Instead, use the
dev_refthread() and return ENXIO for the destroyed device. [1]

The check for the D_INIT in the prep_cdevsw() was not synchronized with
the call of the fini_cdevsw() in destroy_devl(), that under rapid device
creation/destruction may result in the use of uninitialized cdevsw [2].
Change the protocol for the prep_cdevsw(), requiring it to be called
under dev_mtx, where the check for D_INIT is done.

Do not free the memory allocated for the gianttrick cdevsw while holding
the dev_mtx, put it into the free list to be freed later. Reuse the
d_gianttrick pointer to keep the size and layout of the struct cdevsw
(requested by phk). Free the memory in the dev_unlock_and_free(), and do
all the free after the dev_mtx is dropped (suggested by jhb).

Reported by: bsdimp + many [1], pho [2]
Reviewed by: phk, jhb
Tested by: pho
MFC after: 1 week

16 years agoFix indentation for a closing brace in in_pcballoc().
rwatson [Mon, 17 Mar 2008 13:04:56 +0000 (13:04 +0000)]
Fix indentation for a closing brace in in_pcballoc().

MFC after: 3 days

16 years ago- There is no more "uidinfo struct" mutex.
pjd [Mon, 17 Mar 2008 11:48:40 +0000 (11:48 +0000)]
- There is no more "uidinfo struct" mutex.
- The "uidinfo hash" lock is now a rwlock.

Reminded by: kib

16 years agoAdd a "spindown" facility to ata-disks: If no requests have been received
phk [Mon, 17 Mar 2008 10:33:23 +0000 (10:33 +0000)]
Add a "spindown" facility to ata-disks:  If no requests have been received
for a configurable number of seconds, spin the disk down.  Spin it back
up on the next request.

Notice that the timeout is only armed by a request, so to spin down a
disk you may have to do:

atacontrol spindown ad10 5
dd if=/dev/ad10 of=/dev/null count=1

To disable spindown, set timeout to zero:

atacontrol spindown ad10 0

In order to debug any trouble caused, this code is somewhat noisy on the
console.

Enabling spindown on a disk containing / or /var/log/messages is not
going to do anything sensible.

Spinning a disk up and down all the time will wear it out, use sensibly.

Approved by: sos

16 years agoA cautionary XXX comment about seemingly bogus errata checks.
phk [Mon, 17 Mar 2008 09:05:15 +0000 (09:05 +0000)]
A cautionary XXX comment about seemingly bogus errata checks.

16 years agoIncrease time we wait for things to settle to 1 millisecond,
phk [Mon, 17 Mar 2008 09:01:43 +0000 (09:01 +0000)]
Increase time we wait for things to settle to 1 millisecond,
10 microseconds is too short.

Always set the cpu to the highest frequency so that we get through
boot and don't handicap cpus where powerd(8) is not used.

16 years agoRevert last commit and stop committing before morning tea.
phk [Mon, 17 Mar 2008 09:00:59 +0000 (09:00 +0000)]
Revert last commit and stop committing before morning tea.

16 years agoIncrease time we wait for things to settle to 1 millisecond,
phk [Mon, 17 Mar 2008 08:38:38 +0000 (08:38 +0000)]
Increase time we wait for things to settle to 1 millisecond,
10 microseconds is too short.

Always set the cpu to the highest frequency so that we get through
boot and don't handicap cpus where powerd(8) is not used.

16 years agoUse a standard section 4 SYNOPSIS.
brueffer [Mon, 17 Mar 2008 08:17:04 +0000 (08:17 +0000)]
Use a standard section 4 SYNOPSIS.

MFC after: 3 days

16 years agoDevice counts are long gone.
brueffer [Mon, 17 Mar 2008 08:06:41 +0000 (08:06 +0000)]
Device counts are long gone.

MFC after: 3 days

16 years agoegad! The cvs 1.11.22 distribution had a Linux binary in it. Yuck.
obrien [Mon, 17 Mar 2008 07:57:38 +0000 (07:57 +0000)]
egad!  The cvs 1.11.22 distribution had a Linux binary in it.  Yuck.

16 years agodon't set sniffer mode to ON when the driver is running with the
weongyo [Mon, 17 Mar 2008 02:30:13 +0000 (02:30 +0000)]
don't set sniffer mode to ON when the driver is running with the
monitor mode.  This solves a problem that sometimes mangled frames
are passed.

Submitted by: Werner Backes <werner_at_bit-1.de>
Tested by: Werner Backes <werner_at_bit-1.de>
PR: kern/121608
Approved by: thompsa (mentor)

16 years agoRemove extra semicolons.
thompsa [Mon, 17 Mar 2008 01:26:44 +0000 (01:26 +0000)]
Remove extra semicolons.

Pointed out by: antoine

16 years agoMake remote GDB work for AIM processors. For BookE, the kernel
marcel [Mon, 17 Mar 2008 00:46:52 +0000 (00:46 +0000)]
Make remote GDB work for AIM processors. For BookE, the kernel
will have a special section, named .PPC.EMB.apuinfo, which will
tell GDB that a BookE processor is targeted and which will
result in GDB using a different register definition. In order
to support remote GDB for BookE, we need the GDB stub in the
kernel look for that section and use the BookE definitions.

16 years agoUse correct bitmask for identifying chip family.
phk [Mon, 17 Mar 2008 00:36:16 +0000 (00:36 +0000)]
Use correct bitmask for identifying chip family.

16 years agoRemove impossible (hk_peer == NULL) check from ng_address_hook().
mav [Sun, 16 Mar 2008 23:12:17 +0000 (23:12 +0000)]
Remove impossible (hk_peer == NULL) check from ng_address_hook().
Valid hook can't have NULL peer. Even invalid one can't, as it is resets to
deadhook, but not NULL.

16 years agoRemove trailing ';' on macros.
phk [Sun, 16 Mar 2008 23:00:43 +0000 (23:00 +0000)]
Remove trailing ';' on macros.

Spotted by: antoine