]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoFix truncl() when the result should be -0.0L. When the result is +-0.0L,
bde [Fri, 8 Feb 2008 01:45:52 +0000 (01:45 +0000)]
Fix truncl() when the result should be -0.0L.  When the result is +-0.0L,
it must have the same sign as the arg in all rounding modes, but it was
always +0.0L.

16 years agoOops, fix the fix in rev.1.10. logb() and logbf() were broken on
bde [Fri, 8 Feb 2008 01:22:13 +0000 (01:22 +0000)]
Oops, fix the fix in rev.1.10.  logb() and logbf() were broken on
denormals, and logb() remained broken after 1.10 because the fix for
logbf() was incompletely translated.

Convert to __FBSDID().

16 years agoClean up manipulation of chunk page map elements to remove some tenuous
jasone [Fri, 8 Feb 2008 00:35:56 +0000 (00:35 +0000)]
Clean up manipulation of chunk page map elements to remove some tenuous
assumptions about whether bits are set at various times.  This makes
adding other flags safe.

Reorganize functions in order to inline i{m,c,p,s,re}alloc().  This
allows the entire fast-path call chains for malloc() and free() to be
inlined. [1]

Suggested by: [1] Stuart Parmenter <stuart@mozilla.com>

16 years agoFix netname() [1] and routename() on big-endian LP64 archs.
marius [Thu, 7 Feb 2008 23:00:40 +0000 (23:00 +0000)]
Fix netname() [1] and routename() on big-endian LP64 archs.

Submitted by: Yuri Pankov [1]
MFC after: 3 days

16 years agoThe previous commit message was wrong. It should have read:
rink [Thu, 7 Feb 2008 19:00:00 +0000 (19:00 +0000)]
The previous commit message was wrong. It should have read:

"Fix bootparamd on 64 bit platforms - at least amd64 was broken due to the
 code believing long == 32 bits and using it to store/compare IPv4 addresses."

Note the "== 32 bits" - the previous commit message stated 64 bits, which is
plain wrong.

PR: bin/112163
Pointed out by: obrien
Approved by: imp (mentor, implicit)

16 years agostyle(9) (verifed no-change in .o's)
obrien [Thu, 7 Feb 2008 18:10:24 +0000 (18:10 +0000)]
style(9) (verifed no-change in .o's)

16 years agoDon't reset DST computed by strptime() (when e.g. setting the
ru [Thu, 7 Feb 2008 16:04:24 +0000 (16:04 +0000)]
Don't reset DST computed by strptime() (when e.g. setting the
date via -f %s).

Reported by: Eugene Grosbein
Diagnosed by: Miguel Lopes Santos Ramos

16 years agoIf the vhid already present, return EEXIST instead of
glebius [Thu, 7 Feb 2008 13:18:59 +0000 (13:18 +0000)]
If the vhid already present, return EEXIST instead of
non-informative EINVAL.

16 years agoRemove unused structure member from struct in_ifadown_arg.
glebius [Thu, 7 Feb 2008 11:26:52 +0000 (11:26 +0000)]
Remove unused structure member from struct in_ifadown_arg.

16 years agoUse rtalloc1() instead of rtalloc_ign(). It returns a locked
glebius [Thu, 7 Feb 2008 11:10:17 +0000 (11:10 +0000)]
Use rtalloc1() instead of rtalloc_ign(). It returns a locked
rtentry. We quickly copy the fields of interest, and then
RTFREE_LOCKED(). This should be faster then lock & unlock the
rtentry twice.

16 years agoAdd a note that ipfw states do not implicitly match ICMP error messages.
yar [Thu, 7 Feb 2008 11:00:42 +0000 (11:00 +0000)]
Add a note that ipfw states do not implicitly match ICMP error messages.

16 years agoUse a better method of scaling by 2**k. Instead of adding to the
bde [Thu, 7 Feb 2008 09:42:19 +0000 (09:42 +0000)]
Use a better method of scaling by 2**k.  Instead of adding to the
exponent bits of the reduced result, construct 2**k (hopefully in
parallel with the construction of the reduced result) and multiply by
it.  This tends to be much faster if the construction of 2**k is
actually in parallel, and might be faster even with no parallelism
since adjustment of the exponent requires a read-modify-wrtite at an
unfortunate time for pipelines.

In some cases involving exp2* on amd64 (A64), this change saves about
40 cycles or 30%.  I think it is inherently only about 12 cycles faster
in these cases and the rest of the speedup is from partly-accidentally
avoiding compiler pessimizations (the construction of 2**k is now
manually scheduled for good results, and -O2 doesn't always mess this
up).  In most cases on amd64 (A64) and i386 (A64) the speedup is about
20 cycles.  The worst case that I found is expf on ia64 where this
change is a pessimization of about 10 cycles or 5%.  The manual
scheduling for plain exp[f] is harder and not as tuned.

Details specific to expm1*:
- the saving is closer to 12 cycles than to 40 for expm1* on i386 (A64).
  For some reason it is much larger for negative args.
- also convert to __FBSDID().

16 years ago - Add THREAD_LOCKPTR_ASSERT() to assert that the thread's lock points at
jeff [Thu, 7 Feb 2008 06:55:38 +0000 (06:55 +0000)]
 - Add THREAD_LOCKPTR_ASSERT() to assert that the thread's lock points at
   the provided lock or &blocked_lock.  The thread may be temporarily
   assigned to the blocked_lock by the scheduler so a direct comparison
   can not always be made.
 - Use THREAD_LOCKPTR_ASSERT() in the primary consumers of the scheduling
   interfaces.  The schedulers themselves still use more explicit asserts.

Sponsored by: Nokia

16 years agoFrom the 4 February 2008 update:
dougb [Thu, 7 Feb 2008 06:28:02 +0000 (06:28 +0000)]
From the 4 February 2008 update:
IPv6 addresses for 6 of the root name servers!

16 years ago - In rw_wunlock_hard prefer to wakeup writers if there are both readers
jeff [Thu, 7 Feb 2008 06:16:54 +0000 (06:16 +0000)]
 - In rw_wunlock_hard prefer to wakeup writers if there are both readers
   and writers available.  Doing otherwise can cause deadlocks as no
   read locks can proceed while there are write waiters.

Sponsored by: Nokia

16 years agoChange shm_dotruncate() so that it correctly handles cached pages that span
alc [Thu, 7 Feb 2008 05:55:16 +0000 (05:55 +0000)]
Change shm_dotruncate() so that it correctly handles cached pages that span
the end of the object.  (This change is analogous to revision 1.237 of
vm/vnode_pager.c.)

Discussed with: jhb

16 years agoUse a better method of scaling by 2**k. Instead of adding to the
bde [Thu, 7 Feb 2008 03:17:05 +0000 (03:17 +0000)]
Use a better method of scaling by 2**k.  Instead of adding to the
exponent bits of the reduced result, construct 2**k (hopefully in
parallel with the construction of the reduced result) and multiply by
it.  This tends to be much faster if the construction of 2**k is
actually in parallel, and might be faster even with no parallelism
since adjustment of the exponent requires a read-modify-wrtite at an
unfortunate time for pipelines.

In some cases involving exp2* on amd64 (A64), this change saves about
40 cycles or 30%.  I think it is inherently only about 12 cycles faster
in these cases and the rest of the speedup is from partly-accidentally
avoiding compiler pessimizations (the construction of 2**k is now
manually scheduled for good results, and -O2 doesn't always mess this
up).  In most cases on amd64 (A64) and i386 (A64) the speedup is about
20 cycles.  The worst case that I found is expf on ia64 where this
change is a pessimization of about 10 cycles or 5%.  The manual
scheduling for plain exp[f] is harder and not as tuned.

This change ld128/s_exp2l.c has not been tested.

16 years agoAdd missing #include
des [Wed, 6 Feb 2008 23:25:29 +0000 (23:25 +0000)]
Add missing #include

Spotted by: tinderbox
Submitted by: Pietro Cerutti <gahr@gahr.ch>
Pointy hat to: des

16 years agoFix the Xlist so it actually works with 'tar -X', and update the upgrade
des [Wed, 6 Feb 2008 23:14:24 +0000 (23:14 +0000)]
Fix the Xlist so it actually works with 'tar -X', and update the upgrade
instructions accordingly.

16 years agoAs per discussion, commit experimental metadata for my contrib packages.
des [Wed, 6 Feb 2008 23:06:24 +0000 (23:06 +0000)]
As per discussion, commit experimental metadata for my contrib packages.
The idea is to have a FREEBSD-vendor file for every third-party package
in the tree.

16 years agoMake the openfirmware getchar entry point non-blocking. This catches up
grehan [Wed, 6 Feb 2008 22:04:28 +0000 (22:04 +0000)]
Make the openfirmware getchar entry point non-blocking. This catches up
with jhb's 2005/05/27 loader multiple-console change.

Tested by: marius/sparc64, grehan/ofwppc

16 years agoYet another pointy hat: when I zapped FBSDprivate_1.1, I forgot to move
des [Wed, 6 Feb 2008 20:45:46 +0000 (20:45 +0000)]
Yet another pointy hat: when I zapped FBSDprivate_1.1, I forgot to move
its contents to FBSDprivate_1.0.

16 years agoAdd pthread_mutex_isowned_np() here as well; libthr and libkse are supposed
des [Wed, 6 Feb 2008 20:44:29 +0000 (20:44 +0000)]
Add pthread_mutex_isowned_np() here as well; libthr and libkse are supposed
to have identical functionality.

MFC after: 2 weeks

16 years agoRemove unnecessary prototype.
des [Wed, 6 Feb 2008 20:43:19 +0000 (20:43 +0000)]
Remove unnecessary prototype.

16 years agoAdd pthread_mutex_isowned_np() so there is no need for an additional
des [Wed, 6 Feb 2008 20:42:35 +0000 (20:42 +0000)]
Add pthread_mutex_isowned_np() so there is no need for an additional
prototype next to the implementation.

MFC after: 2 weeks

16 years agoDo not use bcmp() to compare two bytes with constants.
mav [Wed, 6 Feb 2008 20:37:34 +0000 (20:37 +0000)]
Do not use bcmp() to compare two bytes with constants.

16 years agoPrevious commit had a typo that resulted in symbol versioning being
des [Wed, 6 Feb 2008 20:33:59 +0000 (20:33 +0000)]
Previous commit had a typo that resulted in symbol versioning being
(silently) disabled for libkse...

Pointy hat to: des

16 years agoGive libkse the same treatment as libthr re. symbol versioning.
des [Wed, 6 Feb 2008 20:30:48 +0000 (20:30 +0000)]
Give libkse the same treatment as libthr re. symbol versioning.

MFC after: 2 weeks

16 years agoConvert pthread.map to the format expected by version_gen.awk, and modify
des [Wed, 6 Feb 2008 20:25:00 +0000 (20:25 +0000)]
Convert pthread.map to the format expected by version_gen.awk, and modify
the Makefile accordingly; libthr now explicitly uses libc's Versions.def.

MFC after: 2 weeks

16 years agoRemove incorrectly added FBSDprivate_1.1 namespace, and move symbols which
des [Wed, 6 Feb 2008 20:20:29 +0000 (20:20 +0000)]
Remove incorrectly added FBSDprivate_1.1 namespace, and move symbols which
are new in FreeBSD 8 to the appropriate namespace.

16 years agoRevert rev. 1.128, we have a hard link generated from new
delphij [Wed, 6 Feb 2008 19:45:45 +0000 (19:45 +0000)]
Revert rev. 1.128, we have a hard link generated from new
hptrr(4) to rr232x.

Pointed out by: bruffer
Pointy hat to: delphij

16 years agomutex_islocked_np -> mutex_isowned_np
des [Wed, 6 Feb 2008 19:41:05 +0000 (19:41 +0000)]
mutex_islocked_np -> mutex_isowned_np

16 years agoPer discussion on -threads, rename _islocked_np() to _isowned_np().
des [Wed, 6 Feb 2008 19:34:31 +0000 (19:34 +0000)]
Per discussion on -threads, rename _islocked_np() to _isowned_np().

16 years agoThe man page of ofwdump(8) is installed as usr/share/man/man8/ofwdump.8.gz
marcel [Wed, 6 Feb 2008 19:03:14 +0000 (19:03 +0000)]
The man page of ofwdump(8) is installed as usr/share/man/man8/ofwdump.8.gz
again on powerpc and sparc64. Un-obsolete it for these two so that we
don't remove it right after installing it.

16 years agoCleanup and tune ng_snd_item() function as it is one of the
mav [Wed, 6 Feb 2008 18:50:40 +0000 (18:50 +0000)]
Cleanup and tune ng_snd_item() function as it is one of the
most busy netgraph functions.
Tune stack protection constants to avoid division operation.

16 years agoReflect rr232x(4) manpage removal
delphij [Wed, 6 Feb 2008 18:43:47 +0000 (18:43 +0000)]
Reflect rr232x(4) manpage removal

16 years agoThis is a regression test to verify the proper behavior of IP ID generation
silby [Wed, 6 Feb 2008 15:48:43 +0000 (15:48 +0000)]
This is a regression test to verify the proper behavior of IP ID generation
code.  It will push 200000 packets, then report back what the min and max
periods it saw for different IDs were.

16 years agoReplace the random IP ID generation code we
silby [Wed, 6 Feb 2008 15:40:30 +0000 (15:40 +0000)]
Replace the random IP ID generation code we
obtained from OpenBSD with an algorithm suggested
by Amit Klein.  The OpenBSD algorithm has a few
flaws; see Amit's paper for more information.

For a description of how this algorithm works,
please see the comments within the code.

Note that this commit does not yet enable random IP ID
generation by default.  There are still some concerns
that doing so will adversely affect performance.

Reviewed by:  rwatson
MFC After: 2 weeks

16 years agoRemove an errant definition for AMR_CONFIG_ENQ3_SOLICITED NOTIFY that was
scottl [Wed, 6 Feb 2008 14:26:31 +0000 (14:26 +0000)]
Remove an errant definition for AMR_CONFIG_ENQ3_SOLICITED NOTIFY that was
accidently reverted in the previous commit.

16 years agotd cannot be NULL in that place, so just axe out the check.
attilio [Wed, 6 Feb 2008 13:26:01 +0000 (13:26 +0000)]
td cannot be NULL in that place, so just axe out the check.

16 years agoAdd necessary cast for tolower() argument.
des [Wed, 6 Feb 2008 11:39:55 +0000 (11:39 +0000)]
Add necessary cast for tolower() argument.

Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de>
MFC after: 1 week

16 years agoFix typo.
pb [Wed, 6 Feb 2008 08:03:27 +0000 (08:03 +0000)]
Fix typo.

Submitted by: danny at cs.huji.ac.il (author)

16 years agoUpdate fix from rev 1.2.
pb [Wed, 6 Feb 2008 08:02:55 +0000 (08:02 +0000)]
Update fix from rev 1.2.

Submitted by: danny at cs.huji.ac.il (author)
MFC after: 1 week

16 years agoAs for the float trig functions and logf, use a minimax polynomial
bde [Wed, 6 Feb 2008 06:35:21 +0000 (06:35 +0000)]
As for the float trig functions and logf, use a minimax polynomial
that is specialized for float precision.  The new polynomial has degree
5 instead of 11, and a maximum error of 2**-27.74 ulps instead
of 2**-30.64.  This doesn't affect the final error significantly; the
maximum error was and is about 0.9101 ulps on amd64 -01 and the number
of cases with an error of > 0.5 ulps is actually reduced by epsilon
despite the larger error in the polynomial.

This is about 15% faster on amd64 (A64), i386 (A64) and ia64.  The asm
version is still used instead of this on i386 since it is faster and
more accurate.

16 years agoFix a symbol conflict between hptrr and hptmv
scottl [Wed, 6 Feb 2008 05:33:17 +0000 (05:33 +0000)]
Fix a symbol conflict between hptrr and hptmv

16 years agoAdd a note that the hptrr driver supersedes the rr232x driver.
scottl [Wed, 6 Feb 2008 03:30:13 +0000 (03:30 +0000)]
Add a note that the hptrr driver supersedes the rr232x driver.

16 years agoTrack dirty unused pages so that they can be purged if they exceed a
jasone [Wed, 6 Feb 2008 02:59:54 +0000 (02:59 +0000)]
Track dirty unused pages so that they can be purged if they exceed a
threshold, according to the 'F' MALLOC_OPTIONS flag.  This obsoletes the
'H' flag.

Try to realloc() large objects in place.  This substantially speeds up
incremental large reallocations in the common case.

Fix a bug in arena_ralloc() that caused relocation of sub-page objects
even if the old and new sizes were in the same size class.

Maintain trees of runs and simplify the per-chunk page map.  This allows
logarithmic-time searching for sufficiently large runs in
arena_run_alloc(), whereas the previous algorithm required linear time
in the worst case.

Break various large functions into smaller sub-functions, and inline
only the functions that are in the fast path for small object
allocation/deallocation.

Remove an unnecessary check in base_pages_alloc_mmap().

Avoid integer division in choose_arena() for the NO_TLS case on
single-CPU systems.

16 years agoUpdate the hptrr driver to version 1.2. This adds port multiplier support
scottl [Wed, 6 Feb 2008 01:02:20 +0000 (01:02 +0000)]
Update the hptrr driver to version 1.2.  This adds port multiplier support
for several cards.  See the Highpoint website for more information.  Again,
many thanks to Highpoint for their continued support of FreeBSD.

16 years agoAdaptive spinning in write path with readers and writer starvation avoidance.
jeff [Wed, 6 Feb 2008 01:02:13 +0000 (01:02 +0000)]
Adaptive spinning in write path with readers and writer starvation avoidance.
 - Move recursion checking into rwlock inlines to free a bit for use with
   adaptive spinners.
 - Clear the RW_LOCK_WRITE_SPINNERS flag whenever the lock state changes
   causing write spinners to restart their loop.
 - Write spinners are limited by a count while readers hold the lock as
   there is no way to know for certain whether readers are running still.
 - In the read path block if there are write waiters or spinners to avoid
   starving writers.  Use a new per-thread count, td_rw_rlocks, to skip
   starvation avoidance if it might cause a deadlock.
 - Remove or change invalid assertions in turnstiles.

Reviewed by:    attilio (developed parts of the patch as well)
Sponsored by:   Nokia

16 years agoUpdate manpage in order to reflect LK_NODUP and LK_NOWITNESS options
attilio [Wed, 6 Feb 2008 00:50:51 +0000 (00:50 +0000)]
Update manpage in order to reflect LK_NODUP and LK_NOWITNESS options
introduction.

16 years agoBump __FreeBSD_version in order to reflect introduction of LK_NODUP and
attilio [Wed, 6 Feb 2008 00:42:26 +0000 (00:42 +0000)]
Bump __FreeBSD_version in order to reflect introduction of LK_NODUP and
LK_NOWITNESS options in the lockmgr namespace.

16 years agoAdd WITNESS support to lockmgr locking primitive.
attilio [Wed, 6 Feb 2008 00:37:14 +0000 (00:37 +0000)]
Add WITNESS support to lockmgr locking primitive.
This support tries to be as parallel as possible with other locking
primitives, but there are differences; more specifically:
- The base witness support is alredy equipped for allowing lock
  duplication acquisition as lockmgr rely on this.
- In the case of lockmgr_disown() the lock result unlocked by witness
  even if it is still held by the "kernel context"
- In the case of upgrading we can have 3 different situations:
  * Total unlocking of the shared lock and nothing else
  * Real witness upgrade if the owner is the first upgrader
  * Shared unlocking and exclusive locking if the owner is not the first
    upgrade but it is still allowed to upgrade
- LK_DRAIN is basically handled like an exclusive acquisition

Additively new options LK_NODUP and LK_NOWITNESS can now be used with
lockinit(): LK_NOWITNESS disables WITNESS for the specified lock while
LK_NODUP enable duplicated locks tracking. This will require manpages
update and a __FreeBSD_version bumping (addressed by further commits).

This patch also fixes a problem occurring if a lockmgr is held in
exclusive mode and the same owner try to acquire it in shared mode:
currently there is a spourious shared locking acquisition while what
we really want is a lock downgrade. Probabilly, this situation can be
better served with a EDEADLK failing errno return.

Side note: first testing on this patch alredy reveleated several LORs
reported, so please expect LORs cascades until resolved. NTFS also is
reported broken by WITNESS introduction. BTW, NTFS is exposing a lock
leak which needs to be fixed, and this patch can help it out if
rightly tweaked.

Tested by: kris, yar, Scot Hetzel <swhetzel at gmail dot com>

16 years agoReally, no explicit checks against against lock_class_* object should be
attilio [Wed, 6 Feb 2008 00:04:09 +0000 (00:04 +0000)]
Really, no explicit checks against against lock_class_* object should be
done in consumers code: using locks properties is much more appropriate.
Fix current code doing these bogus checks.

Note: Really, callout are not usable by all !(LC_SPINLOCK | LC_SLEEPABLE)
primitives like rmlocks doesn't implement the generic lock layer
functions, but they can be equipped for this, so the check is still
valid.

Tested by: matteo, kris (earlier version)
Reviewed by: jhb

16 years agoFix a bug in hexadecimal formatting of the CHAP digest: bytes >= 0x80
pb [Tue, 5 Feb 2008 23:42:38 +0000 (23:42 +0000)]
Fix a bug in hexadecimal formatting of the CHAP digest: bytes >= 0x80
were formatted as 0xff, causing the authentication to fail.

Reviewed by: scottl
MFC after: 1 week

16 years agoBump .Dd for r1.19; use consistent whitespace.
ceri [Tue, 5 Feb 2008 23:42:37 +0000 (23:42 +0000)]
Bump .Dd for r1.19; use consistent whitespace.

16 years agoAdd ZFS support.
jhb [Tue, 5 Feb 2008 23:37:42 +0000 (23:37 +0000)]
Add ZFS support.

MFC after: 1 week
PR: bin/119976
Submitted by: Simun Mikecin  numisemis of yahoo.com

16 years agoset WARNS to 1: with WARNS=2 an aliasing error in a file generated by
matteo [Tue, 5 Feb 2008 20:03:45 +0000 (20:03 +0000)]
set WARNS to 1: with WARNS=2 an aliasing error in a file generated by
rpcgen from include/rpcsvc/rex.x is exposed and I really don't know
how to fix it.

MFC after: 1 week

16 years agoAdd my birthday.
antoine [Tue, 5 Feb 2008 19:34:54 +0000 (19:34 +0000)]
Add my birthday.

Approved by: rwatson (mentor)

16 years agoAdd myself.
antoine [Tue, 5 Feb 2008 19:23:22 +0000 (19:23 +0000)]
Add myself.

Approved by: rwatson (mentor)

16 years agoMinor style(9) nit.
obrien [Tue, 5 Feb 2008 17:34:44 +0000 (17:34 +0000)]
Minor style(9) nit.

16 years ago- Forced commit to note that revision 1.20 log was misspelled and that comma
lulf [Tue, 5 Feb 2008 15:53:24 +0000 (15:53 +0000)]
- Forced commit to note that revision 1.20 log was misspelled and that comma
  should be spelled as colon.
Approved by: kib (mentor)

16 years agoSatisfy a particularly obstinate nit-picker :)
des [Tue, 5 Feb 2008 15:41:58 +0000 (15:41 +0000)]
Satisfy a particularly obstinate nit-picker :)

16 years ago- Add extra paths for GEOM_LIBRARY_PATH to the fixit environment to enable all
lulf [Tue, 5 Feb 2008 14:06:15 +0000 (14:06 +0000)]
- Add extra paths for GEOM_LIBRARY_PATH to the fixit environment to enable all
  geom commands in a chrooted environment on the livefs cd.

PR: misc/120169
Approved by: pjd (mentor)
MFC after: 2 days

16 years ago- Update geom(8) to explain that GEOM_LIBRARY_PATH can take a comma-separated
lulf [Tue, 5 Feb 2008 14:02:55 +0000 (14:02 +0000)]
- Update geom(8) to explain that GEOM_LIBRARY_PATH can take a comma-separated
  list of paths.

Approved by: pjd (mentor)
MFC after: 2 days

16 years agoIntroduce a standalone shell script for embedding MFS image.
raj [Tue, 5 Feb 2008 10:46:30 +0000 (10:46 +0000)]
Introduce a standalone shell script for embedding MFS image.

This allows to fix a problem with ARM kernel.bin not having the MFS image
embedded: it is objcopied from the kernel.noheader temporary ELF file, which
was not subject to embedding the MFS image previously.

Reviewed by: imp
Approved by: cognet (mentor)

16 years agoARM locore cosmetics.
raj [Tue, 5 Feb 2008 10:23:42 +0000 (10:23 +0000)]
ARM locore cosmetics.

Approved by: cognet (mentor)

16 years agoImprove ARM_TP_ADDRESS and RAS area.
raj [Tue, 5 Feb 2008 10:22:33 +0000 (10:22 +0000)]
Improve ARM_TP_ADDRESS and RAS area.

De-hardcode usage of ARM_TP_ADDRESS and RAS local storage, and move this
special purpose page to a more convenient place i.e. after the vectors high
page, more towards the end of address space. Previous location (0xe000_0000)
caused grief if KVA was to go beyond the default limit.

Note that ARM world rebuilding is required after this change since the
location of ARM_TP_ADDRESS is shared between kernel and userland.

Submitted by: Grzegorz Bernacki (gjb AT semihalf dot com)
Reviewed by: imp
Approved by: cognet (mentor)

16 years agoGive usr.bin/kdump/kdump_subr.c the same treatment as usr.bin/kdump/ioctl.c
des [Tue, 5 Feb 2008 08:56:18 +0000 (08:56 +0000)]
Give usr.bin/kdump/kdump_subr.c the same treatment as usr.bin/kdump/ioctl.c
and usr.bin/truss/ioctl.c.  This is the correct way to address the problem
that arises when doing an incremental build after a header used by kdump
has been removed (cf. i4b disconnect a while ago)

Explained by: ru
MFC after: 2 weeks

16 years agoRevert CLEANDEPFILES commit per ru@'s request; it does not really solve
des [Tue, 5 Feb 2008 08:52:36 +0000 (08:52 +0000)]
Revert CLEANDEPFILES commit per ru@'s request; it does not really solve
the problem.  The correct fix will follow.

16 years agoAdd missing includes and correct argument to sysctlbyname
matteo [Tue, 5 Feb 2008 08:07:19 +0000 (08:07 +0000)]
Add missing includes and correct argument to sysctlbyname

PR: misc/120274
MFC after: 1 week

16 years agoPrepare hooks direct pointers on setup to avoid heavy ng_findhook() calls
mav [Mon, 4 Feb 2008 19:26:53 +0000 (19:26 +0000)]
Prepare hooks direct pointers on setup to avoid heavy ng_findhook() calls
during operarion.

16 years agoDocument the return type for gelf_fsize(3).
jkoshy [Mon, 4 Feb 2008 18:50:28 +0000 (18:50 +0000)]
Document the return type for gelf_fsize(3).

Submitted by: kaiw

16 years agoForced commit. Previous revision was instead
ru [Mon, 4 Feb 2008 15:28:30 +0000 (15:28 +0000)]
Forced commit.  Previous revision was instead

Submitted by: Vadim Goncharov

16 years agoImprove rev. 1.63. Document -instance and -globalport options.
ru [Mon, 4 Feb 2008 15:27:09 +0000 (15:27 +0000)]
Improve rev. 1.63.  Document -instance and -globalport options.
Add a MULTIPLE INSTANCES section which provides an example of
setting up natd in multi-instance mode (based on the notes.natd
file from phk@).

Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru>
Reviewed by: ru

16 years agoAfter careful consideration (and a brief discussion with attilio@), change
des [Mon, 4 Feb 2008 12:35:23 +0000 (12:35 +0000)]
After careful consideration (and a brief discussion with attilio@), change
the semantics of pthread_mutex_islocked_np() to return true if and only if
the mutex is held by the current thread.

Obviously, change the regression test to match.

MFC after: 2 weeks

16 years agoFurther clean up sorflush:
rwatson [Mon, 4 Feb 2008 12:25:13 +0000 (12:25 +0000)]
Further clean up sorflush:

- Expose sbrelease_internal(), a variant of sbrelease() with no
  expectations about the validity of locks in the socket buffer.
- Use sbrelease_internel() in sorflush(), and as a result avoid intializing
  and destroying a socket buffer lock for the temporary stack copy of the
  actual buffer, asb.
- Add a comment indicating why we do what we do, and remove an XXX since
  things have gotten less ugly in sorflush() lately.

This makes socket close cleaner, and possibly also marginally faster.

MFC after: 3 weeks

16 years ago- Make geom commands handle multiple library paths in the GEOM_LIBRARY_PATH
lulf [Mon, 4 Feb 2008 12:17:02 +0000 (12:17 +0000)]
- Make geom commands handle multiple library paths in the GEOM_LIBRARY_PATH
  environment variable using ':' as a separator.

Approved by: pjd (mentor)
MFC after: 3 days

16 years agoFix collation order for accented characters.
dds [Mon, 4 Feb 2008 10:25:28 +0000 (10:25 +0000)]
Fix collation order for accented characters.

MFC after: 2 weeks

16 years agoFix incorrect handling of malloc failures
matteo [Mon, 4 Feb 2008 07:56:36 +0000 (07:56 +0000)]
Fix incorrect handling of malloc failures

PR: bin/83369
MFC after: 1 week

16 years agoFix mount -p and mount -u -ocurrent on gjournaled FS
matteo [Mon, 4 Feb 2008 07:37:56 +0000 (07:37 +0000)]
Fix mount -p and mount -u -ocurrent on gjournaled FS

PR: bin/120162
Submitted by: Niki Denev
MFC after: 1 week

16 years agoAllocate a stack for thread0 and switch to it before calling
marcel [Mon, 4 Feb 2008 02:21:33 +0000 (02:21 +0000)]
Allocate a stack for thread0 and switch to it before calling
mi_startup(). This frees up kstack for static PAL/SAL calls
and double-fault handling.

16 years agoAdd pthread_mutex_islocked_np(), a cheap way to verify that a mutex is
des [Sun, 3 Feb 2008 22:38:10 +0000 (22:38 +0000)]
Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is
locked.  This is intended primarily to support the userland equivalent
of the various *_ASSERT_LOCKED() macros we have in the kernel.

MFC after: 2 weeks

16 years agoAdd a regression test for pthread_mutex_islocked_np().
des [Sun, 3 Feb 2008 22:35:45 +0000 (22:35 +0000)]
Add a regression test for pthread_mutex_islocked_np().

MFC after: 2 weeks

16 years agoRemove incomplete support of AI_ALL and AI_V4MAPPED.
ume [Sun, 3 Feb 2008 19:07:55 +0000 (19:07 +0000)]
Remove incomplete support of AI_ALL and AI_V4MAPPED.

Reported by: "Heiko Wundram (Beenic)" <wundram__at__beenic.net>

16 years agoMove all possible node logic out of the rcvdata() function
mav [Sun, 3 Feb 2008 18:55:45 +0000 (18:55 +0000)]
Move all possible node logic out of the rcvdata() function
to the newhook()/disconnect().
Unify function names with other nodes.

16 years agocorrect tx rate displayed by list sta: the reported legacy tx rate
sam [Sun, 3 Feb 2008 18:29:58 +0000 (18:29 +0000)]
correct tx rate displayed by list sta: the reported legacy tx rate
is still an index into the rate set and not (yet) the rate code

Noticed by: JoaoBR

16 years agofix list mac; broken in delta 1.48
sam [Sun, 3 Feb 2008 18:21:13 +0000 (18:21 +0000)]
fix list mac; broken in delta 1.48

Noticed by: JoaoBR

16 years agoAdd -P <port> option to allow binding to a specific port.
matteo [Sun, 3 Feb 2008 17:39:37 +0000 (17:39 +0000)]
Add -P <port> option to allow binding to a specific port.

PR: bin/109494
Submitted by: mtm
MFC after: 1 week

16 years agoFix printing of unionfs mounts when using the -p option
matteo [Sun, 3 Feb 2008 17:23:58 +0000 (17:23 +0000)]
Fix printing of unionfs mounts when using the -p option

PR:  bin/75585
MFC after: 1 week

16 years agoRemove an empty line that crept into the previous commit.
brueffer [Sun, 3 Feb 2008 16:42:22 +0000 (16:42 +0000)]
Remove an empty line that crept into the previous commit.

16 years agoMLINK hptrr(4) to rr232x(4).
brueffer [Sun, 3 Feb 2008 16:38:44 +0000 (16:38 +0000)]
MLINK hptrr(4) to rr232x(4).

Requested by: scottl

16 years agoUpdate the hptiop man page for the new driver.
scottl [Sun, 3 Feb 2008 16:16:38 +0000 (16:16 +0000)]
Update the hptiop man page for the new driver.

16 years agoUpdate the hptiop driver to version 1.3. This adds support for the 4xxx
scottl [Sun, 3 Feb 2008 16:07:12 +0000 (16:07 +0000)]
Update the hptiop driver to version 1.3.  This adds support for the 4xxx
series of adapters.  Thanks again to Highpoint for their continued support
of FreeBSD.

Submitted by: Highpoint Technologies

16 years agoGive sendfile(2) a SF_SYNC flag which makes it wait until all mbufs
phk [Sun, 3 Feb 2008 15:54:41 +0000 (15:54 +0000)]
Give sendfile(2) a SF_SYNC flag which makes it wait until all mbufs
referencing the files VM pages are returned from the network stack,
making changes to the file safe.

This flag does not guarantee that the data has been transmitted to the
other end.

16 years ago- Correctly handle ALTQ in ieee80211_deliver_data()
sephe [Sun, 3 Feb 2008 12:00:03 +0000 (12:00 +0000)]
- Correctly handle ALTQ in ieee80211_deliver_data()
- Add comment from sam that ALTQ probably does not work well with WME

PR: kern/119548
Approved by: sam (mentor)

16 years agoVarious bug fixes for 2560 parts of ral(4):
sephe [Sun, 3 Feb 2008 11:47:38 +0000 (11:47 +0000)]
Various bug fixes for 2560 parts of ral(4):
- Rename rt2560_read_eeprom to rt2560_read_config, we already have
  rt2560_eeprom_read
- If hardware gives us wrong encryption done index, shout out loudly and
  terminate the processing loop
- Process encryption done if RX done bit is set in interrupt status register
  (according to Ralink Linux driver)
- Turn VALID/BUSY bits in TX descriptor only after TX descriptor is fully setup
- Fix BBP read: RT2560_BBPCSR can't be written until its RT2560_BBP_BUSY bit is
  off (according to Ralink Linux driver)
- Skip invalid (0 of 0xffff) BBP register/value entries stored in EEPROM
- Fix channel TX power location in EEPROM, if channel TX power is above 31 set
  it to 24 (TX power only has 5bits in RF register, "24" is according to Ralink
  Linux driver)
- Configure BBP according to the BBP register/value stored in EEPROM, restore
  BBP17 (RX sensitivity tuning) to default value after this.
- Set TX/RX antenna after BBP is initialized; these two operation will try to
  set BBP registers
- Reconfigure ACK TX time registers according to 802.11g standard (TX @36Mb,
  other side's ACK should be sent @24Mb).
- 2560 parts have two TX ring: one for management/control packets, one for data
  packets.  Add private OACTIVE flag for each of them.  Turn on IFF_DRV_OACTIVE
  if one of private OACTIVE is on; turn off IFF_DRV_OACTIVE iff all of them are
  off.
- Rework watchdog to mimic old if_watchdog action.  Process TX done/encryption
  done in watchdog function (according to Ralink Linux driver)

Obtained from: DragonFly
Approved by: sam (mentor)
Tested by: sam
Related to PR: kern/117655

# Forcing long slot time setting is not included in this commit, comment and
# related code is in place, so if problem pops up, quick tests could be done.

16 years agoNormally, when a header file is removed from the build (as i4b headers
des [Sun, 3 Feb 2008 11:34:56 +0000 (11:34 +0000)]
Normally, when a header file is removed from the build (as i4b headers
were recently), a simple 'make cleandepend; make depend' is sufficient
to keep the tree buildable after a cvs update when doing incremental
builds.

However, kdump and truss use a script which searches for header files
that define ioctls, and generates C code that includes them.  This
script will usually not need updating when a header file is removed,
so the normal dependency mechanism will not realize that it needs to
be re-run.  One is therefore left with code that references dead files
but will only be removed by a full 'make clean', which defeats the
purpose of incremental builds.

To work around this, modify the cleandepend target in bsd.dep.mk to
also remove any files listed in a new variable named CLEANDEPFILES,
and modify kdump's and truss's Makefiles accordingly.

MFC after: 2 weeks

16 years agoThese are files are shell scripts; give smart editors a chance to figure
des [Sun, 3 Feb 2008 11:33:27 +0000 (11:33 +0000)]
These are files are shell scripts; give smart editors a chance to figure
it out by adding the usual shebang.

MFC after: 2 weeks

16 years agoRevert previous commit.
mav [Sun, 3 Feb 2008 10:30:45 +0000 (10:30 +0000)]
Revert previous commit.
glebius@ noticed that it was not a bug, but undocumented feature.

16 years agoDon't build the rr232x module, it has been removed.
brueffer [Sun, 3 Feb 2008 10:05:00 +0000 (10:05 +0000)]
Don't build the rr232x module, it has been removed.

Approved by: rwatson (mentor)