]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

16 years agoFix AUTHORS formatting.
brueffer [Sun, 16 Mar 2008 22:51:30 +0000 (22:51 +0000)]
Fix AUTHORS formatting.

MFC after: 3 days

16 years agoDevice counts are long gone, also remove the outdated FILES section.
brueffer [Sun, 16 Mar 2008 22:26:17 +0000 (22:26 +0000)]
Device counts are long gone, also remove the outdated FILES section.

MFC after: 3 days

16 years agoIn the description of the password field, -w was meant, not the
brueffer [Sun, 16 Mar 2008 21:36:05 +0000 (21:36 +0000)]
In the description of the password field, -w was meant, not the
nonexistant -p flag.

PR: 120122
Submitted by: Andy Kosela <andy.kosela@gmail.com>
MFC after: 3 days

16 years agoAdd session ID hashing to speedup incoming packets dispatch in case
mav [Sun, 16 Mar 2008 21:33:12 +0000 (21:33 +0000)]
Add session ID hashing to speedup incoming packets dispatch in case
of many connections working via the same tunnel. For example, in case
of full "client <-> LAC <-> LNS" setup.

16 years agoWhitespace cleanups.
pjd [Sun, 16 Mar 2008 21:32:20 +0000 (21:32 +0000)]
Whitespace cleanups.

16 years ago- Use wait-free method to manage ui_sbsize and ui_proccnt fields in the
pjd [Sun, 16 Mar 2008 21:29:02 +0000 (21:29 +0000)]
- Use wait-free method to manage ui_sbsize and ui_proccnt fields in the
  uidinfo structure. This entirely removes contention observed on the
  ui_mtxp mutex (as it is now gone).
- Convert the uihashtbl_mtx mutex to a rwlock, as most of the time we just
  need to read-lock it.

Reviewed by: jhb, jeff, kris & others
Tested by: kris

16 years agoImplement atomic_fetchadd_long() for all architectures and document it.
pjd [Sun, 16 Mar 2008 21:20:50 +0000 (21:20 +0000)]
Implement atomic_fetchadd_long() for all architectures and document it.

Reviewed by: attilio, jhb, jeff, kris (as a part of the uidinfo_waitfree.patch)

16 years agoSwitch the LACP state machine over to its own mutex to protect the internals,
thompsa [Sun, 16 Mar 2008 19:25:30 +0000 (19:25 +0000)]
Switch the LACP state machine over to its own mutex to protect the internals,
this means that it no longer grabs the lagg rwlock. Use two port table arrays
which list the active ports for Tx and switch between them with an atomic op.
Now the lagg rwlock is only exclusively locked for management (ioctls) and
queuing of lacp control frames isnt needed.

16 years agoscandir(3) previously used st_size to obtain an initial estimate
das [Sun, 16 Mar 2008 19:08:53 +0000 (19:08 +0000)]
scandir(3) previously used st_size to obtain an initial estimate
of the array length needed to store all the directory entries.
Although BSD has historically guaranteed that st_size is the size
of the directory file, POSIX does not, and more to the point, some
recent filesystems such as ZFS use st_size to mean something else.

The fix is to not stat the directory at all, set the initial
array size to 32 entries, and realloc it in powers of 2 if that
proves insufficient.

PR: 113668

16 years agoConsistently use ANSI C declarationsfor all functions in kern_synch.c.
rwatson [Sun, 16 Mar 2008 18:59:21 +0000 (18:59 +0000)]
Consistently use ANSI C declarationsfor all functions in kern_synch.c.

16 years agoStyle fixes.
pjd [Sun, 16 Mar 2008 18:26:59 +0000 (18:26 +0000)]
Style fixes.

16 years agoFix information leak. We can find PIDs of running processes from within
pjd [Sun, 16 Mar 2008 17:55:06 +0000 (17:55 +0000)]
Fix information leak. We can find PIDs of running processes from within
a jail, etc. by simply calling setpriority(PRIO_PROCESS, <PID>, 0) and
checking the return value: 0 means that the process exists and -1 that
it doesn't exist.

Reviewed by: rwatson
MFC after: 1 week

16 years agoUn-cut&paste argument processing, fix things lint found.
phk [Sun, 16 Mar 2008 17:54:55 +0000 (17:54 +0000)]
Un-cut&paste argument processing, fix things lint found.

16 years agoSimplify the inner loop of vm_fault()'s delete-behind heuristic.
alc [Sun, 16 Mar 2008 17:37:19 +0000 (17:37 +0000)]
Simplify the inner loop of vm_fault()'s delete-behind heuristic.
Instead of checking each page for PG_UNMANAGED, perform a one-time
check whether the object is OBJT_PHYS.  (PG_UNMANAGED pages only
belong to OBJT_PHYS objects.)

16 years agoImplement soon-to-be-used rw_unlock() macro.
pjd [Sun, 16 Mar 2008 17:10:52 +0000 (17:10 +0000)]
Implement soon-to-be-used rw_unlock() macro.

16 years agoAdd missing .El.
pjd [Sun, 16 Mar 2008 17:06:05 +0000 (17:06 +0000)]
Add missing .El.

16 years agoRegen.
rdivacky [Sun, 16 Mar 2008 16:29:37 +0000 (16:29 +0000)]
Regen.

16 years agoImplement sched_setaffinity and get_setaffinity using
rdivacky [Sun, 16 Mar 2008 16:27:44 +0000 (16:27 +0000)]
Implement sched_setaffinity and get_setaffinity using
real cpu affinity setting primitives.

Reviewed by: jeff
Approved by: kib (mentor)

16 years agoAdd a -n option to split(1) to split files into N chunks rather than
das [Sun, 16 Mar 2008 15:15:32 +0000 (15:15 +0000)]
Add a -n option to split(1) to split files into N chunks rather than
having to specify the right number of bytes.

Obtained from: NetBSD
Submitted by: Jan Schaumann <jschauma@netmeister.org>
PR: 113175

16 years agoCommit SYSINIT() ;-adding patch missed in previous pass.
rwatson [Sun, 16 Mar 2008 13:02:04 +0000 (13:02 +0000)]
Commit SYSINIT() ;-adding patch missed in previous pass.

MFC after: 1 month
Caught by: tinderbox

16 years agoRemove trailing ';' from C_SYSINIT() macro definition, in keeping
rwatson [Sun, 16 Mar 2008 11:01:32 +0000 (11:01 +0000)]
Remove trailing ';' from C_SYSINIT() macro definition, in keeping
with style(9) recommendation that macros not contain the
terminating ';', leaving that to the invoker.  All SYSINIT()
consumers must now provide a trailing ';'.

Unlike the change to remove the ';'s from callers, this change
shouldn't be MFC'd unless we don't mind requiring source changes
to third party modules that might still depend on SYSINIT()
providing its own ';'.

16 years agoIn keeping with style(9)'s recommendations on macros, use a ';'
rwatson [Sun, 16 Mar 2008 10:58:09 +0000 (10:58 +0000)]
In keeping with style(9)'s recommendations on macros, use a ';'
after each SYSINIT() macro invocation.  This makes a number of
lightweight C parsers much happier with the FreeBSD kernel
source, including cflow's prcc and lxr.

MFC after: 1 month
Discussed with: imp, rink

16 years agomixer(8) is WARNS=6 clean since 1.25.
jkim [Sun, 16 Mar 2008 08:06:36 +0000 (08:06 +0000)]
mixer(8) is WARNS=6 clean since 1.25.

Tested with: 'make universe'

16 years agoProperly set size of the file_zone to match kern.maxfiles parameter.
sobomax [Sun, 16 Mar 2008 06:21:30 +0000 (06:21 +0000)]
Properly set size of the file_zone to match kern.maxfiles parameter.
Otherwise the parameter is no-op, since zone by default limits number
of descriptors to some 12K entries. Attempt to allocate more ends up
sleeping on zonelimit.

MFC after: 2 weeks

16 years agoActually delete SIGCANCEL mask for suspended thread, so the signal will not
davidxu [Sun, 16 Mar 2008 03:22:38 +0000 (03:22 +0000)]
Actually delete SIGCANCEL mask for suspended thread, so the signal will not
be masked when it is resumed.

16 years agoFix mmap(2) on ZFS after some changes in VM subsystem.
pjd [Sat, 15 Mar 2008 23:23:04 +0000 (23:23 +0000)]
Fix mmap(2) on ZFS after some changes in VM subsystem.

Submitted by: alc
Reported by: kris (originally) and many others
Tested with: fsx
MFC after: 1 week

16 years agoFix panic on e.g. "kldload /dev/null".
ru [Sat, 15 Mar 2008 17:40:18 +0000 (17:40 +0000)]
Fix panic on e.g. "kldload /dev/null".

PR: kern/121427
Reviewed by: sem
MFC after: 3 days

16 years agoUpdate a comment: the format bid only runs once per archive; it no
kientzle [Sat, 15 Mar 2008 11:09:16 +0000 (11:09 +0000)]
Update a comment: the format bid only runs once per archive; it no
longer runs once per entry.

16 years agoFree up the entry objects allocated during this test.
kientzle [Sat, 15 Mar 2008 11:06:15 +0000 (11:06 +0000)]
Free up the entry objects allocated during this test.

16 years agoRelease the buffers used for exercising the compress code.
kientzle [Sat, 15 Mar 2008 11:05:49 +0000 (11:05 +0000)]
Release the buffers used for exercising the compress code.