]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoDon't force a reset at driver attach time. It doesn't work on some
scottl [Thu, 3 Apr 2008 14:39:48 +0000 (14:39 +0000)]
Don't force a reset at driver attach time.  It doesn't work on some
adapters, apparently.

16 years agolet umtxq_busy() only spin on mp machine. make function name
davidxu [Thu, 3 Apr 2008 11:49:20 +0000 (11:49 +0000)]
let umtxq_busy() only spin on mp machine. make function name
do_rwlock_unlock to be consistent with others.

16 years agoPut back the quote from Chinggis Khan removed in rev. 1.259.
yar [Thu, 3 Apr 2008 10:22:56 +0000 (10:22 +0000)]
Put back the quote from Chinggis Khan removed in rev. 1.259.
The quote predated rev. 1.232, which rev. 1.259 was to correct;
therefore it was protected by the "Don't remove fortunes" rule.

Noticed by: ceri
Pointy hat to: yar

16 years agoAnother build fix
jfv [Thu, 3 Apr 2008 06:45:38 +0000 (06:45 +0000)]
Another build fix

16 years agoFix a lint issue in the build.
jfv [Thu, 3 Apr 2008 06:17:16 +0000 (06:17 +0000)]
Fix a lint issue in the build.

16 years agoAdd some tests for fma(), fmaf(), and fmal().
das [Thu, 3 Apr 2008 06:15:58 +0000 (06:15 +0000)]
Add some tests for fma(), fmaf(), and fmal().

16 years agoFix some corner cases:
das [Thu, 3 Apr 2008 06:14:51 +0000 (06:14 +0000)]
Fix some corner cases:
- fma(x, y, z) returns z, not NaN, if z is infinite, x and y are finite,
  x*y overflows, and x*y and z have opposite signs.
- fma(x, y, z) doesn't generate an overflow, underflow, or inexact exception
  if z is NaN or infinite, as per IEEE 754R.
- If the rounding mode is set to FE_DOWNWARD, fma(1.0, 0.0, -0.0) is -0.0,
  not +0.0.

16 years agoKERNBASE + 0x00200000 is the same thing as KERNVIRTADDR on this
imp [Thu, 3 Apr 2008 06:14:23 +0000 (06:14 +0000)]
KERNBASE + 0x00200000 is the same thing as KERNVIRTADDR on this
platform, so use the latter in preference to the former.  This makes
the fake_preload setup be the same between kb920x_machdep.c and
avila_machdep.c....

16 years agoRemove unnecessary #define.
imp [Thu, 3 Apr 2008 06:07:45 +0000 (06:07 +0000)]
Remove unnecessary #define.

16 years agoAdd a manual page and a Makefile.
gnn [Thu, 3 Apr 2008 05:26:54 +0000 (05:26 +0000)]
Add a manual page and a Makefile.

Add code to reflect packets back from the sink so that we can measure
round trip at the source.

16 years agoput THR_CRITICAL_LEAVE into do .. while statement.
davidxu [Thu, 3 Apr 2008 02:47:35 +0000 (02:47 +0000)]
put THR_CRITICAL_LEAVE into do .. while statement.

16 years agostyle(9) cleanup
kevlo [Thu, 3 Apr 2008 02:41:54 +0000 (02:41 +0000)]
style(9) cleanup

16 years agoadd __hidden suffix to _umtx_op_err, this eliminates PLT.
davidxu [Thu, 3 Apr 2008 02:13:51 +0000 (02:13 +0000)]
add __hidden suffix to _umtx_op_err, this eliminates PLT.

16 years agoFix minor bug in last checkin, NO_STRICT_ALIGNMENT code.
jfv [Thu, 3 Apr 2008 00:25:09 +0000 (00:25 +0000)]
Fix minor bug in last checkin, NO_STRICT_ALIGNMENT code.

16 years agoThis update primarily addresses the ability to have both the em
jfv [Wed, 2 Apr 2008 22:00:36 +0000 (22:00 +0000)]
This update primarily addresses the ability to have both the em
and the igb driver static in the kernel. But it also reflects
some other bug fixes in my development stream at Intel.
PR 122373 is also fixed in this code.

16 years agoBack out revision 1.6, the addition of "BEFORE: mountcritremote".
dougb [Wed, 2 Apr 2008 19:29:16 +0000 (19:29 +0000)]
Back out revision 1.6, the addition of "BEFORE: mountcritremote".

mountcritremote REQUIREs FILESYSTEMS, and that script REQUIREs zfs,
so this change is a noop. By removing it we make life a little easier
both for rcorder(8) and for debugging down the road.

Approved by: 2 weeks of silence from pjd

16 years agoPR ports/121363 (& ports/73797) has been committed, so we can now go back
obrien [Wed, 2 Apr 2008 17:24:22 +0000 (17:24 +0000)]
PR ports/121363 (& ports/73797) has been committed, so we can now go back
to JB's revision 1.96 change to remove -fno-strict-aliasing from CFLAGS.

This makes the default CFLAGS to match the simple defaults that the
tinderboxes use.  By using -fno-strict-aliasing by default we are
choosing to ignore problems in code which had the potential to
shoot ourselves in the foot.

16 years agoAdd zyd, ural, and rum. They were missing.
imp [Wed, 2 Apr 2008 16:17:19 +0000 (16:17 +0000)]
Add zyd, ural, and rum.  They were missing.

16 years agoInitialize if_baudrate using IF_Gbps() macro.
gallatin [Wed, 2 Apr 2008 13:59:43 +0000 (13:59 +0000)]
Initialize if_baudrate using IF_Gbps() macro.

Note that if_baudrate is a long, and 32-bits isn't enough to properly
represent 10Gb/s.

Pointed out by: dwhite

16 years agoNon-portable functions are in pthread_np.h, fix compiling problem.
davidxu [Wed, 2 Apr 2008 11:41:12 +0000 (11:41 +0000)]
Non-portable functions are in pthread_np.h, fix compiling problem.

16 years ago - Convert two timeout users to the new callout_reset_curcpu() api.
jeff [Wed, 2 Apr 2008 11:21:42 +0000 (11:21 +0000)]
 - Convert two timeout users to the new callout_reset_curcpu() api.

Sponsored by: Nokia

16 years agoImplement per-cpu callout threads, wheels, and locks.
jeff [Wed, 2 Apr 2008 11:20:30 +0000 (11:20 +0000)]
Implement per-cpu callout threads, wheels, and locks.

 - Move callout thread creation from kern_intr.c to kern_timeout.c
 - Call callout_tick() on every processor via hardclock_cpu() rather than
   inspecting callout internal details in kern_clock.c.
 - Remove callout implementation details from callout.h
 - Package up all of the global variables into a per-cpu callout structure.
 - Start one thread per-cpu.  Threads are not strictly bound.  They prefer
   to execute on the native cpu but may migrate temporarily if interrupts
   are starving callout processing.
 - Run all callouts by default in the thread for cpu0 to maintain current
   ordering and concurrency guarantees.  Many consumers may not properly
   handle concurrent execution.
 - The new callout_reset_on() api allows specifying a particular cpu to
   execute the callout on.  This may migrate a callout to a new cpu.
   callout_reset() schedules on the last assigned cpu while
   callout_reset_curcpu() schedules on the current cpu.

Reviewed by: phk
Sponsored by: Nokia

16 years agoAdd two missed chunks from the rev. 1.210, for the giant_read() and
kib [Wed, 2 Apr 2008 11:11:58 +0000 (11:11 +0000)]
Add two missed chunks from the rev. 1.210, for the giant_read() and
giant_ioctl().

PR: kern/122287
MFC after: 3 days

16 years ago - Destroy the bo mtx when the vnode is destroyed.
jeff [Wed, 2 Apr 2008 10:40:03 +0000 (10:40 +0000)]
 - Destroy the bo mtx when the vnode is destroyed.

16 years agoSpell -t option's argument by name.
ru [Wed, 2 Apr 2008 09:41:29 +0000 (09:41 +0000)]
Spell -t option's argument by name.

16 years agoAdd pthread_setaffinity_np and pthread_getaffinity_np to libc namespace.
davidxu [Wed, 2 Apr 2008 08:53:18 +0000 (08:53 +0000)]
Add pthread_setaffinity_np and pthread_getaffinity_np to libc namespace.

16 years agoRemove unused functions.
davidxu [Wed, 2 Apr 2008 08:33:42 +0000 (08:33 +0000)]
Remove unused functions.

16 years agoReplace function _umtx_op with _umtx_op_err, the later function directly
davidxu [Wed, 2 Apr 2008 07:41:25 +0000 (07:41 +0000)]
Replace function _umtx_op with _umtx_op_err, the later function directly
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.

16 years agoFix compiling problem for amd64.
davidxu [Wed, 2 Apr 2008 05:54:41 +0000 (05:54 +0000)]
Fix compiling problem for amd64.

16 years agoOptimize pmap_pml4e() and pmap_pdpe() based upon two observations: The
alc [Wed, 2 Apr 2008 04:39:47 +0000 (04:39 +0000)]
Optimize pmap_pml4e() and pmap_pdpe() based upon two observations: The
given pmap is never NULL, and therefore pmap_pml4e() can never return
NULL.  The pervasive use of these inline functions throughout the pmap
makes these simple changes worthwhile.

16 years agoReplace userland rwlock with a pure kernel based rwlock, the new
davidxu [Wed, 2 Apr 2008 04:32:31 +0000 (04:32 +0000)]
Replace userland rwlock with a pure kernel based rwlock, the new
implementation does not switch pointers when it resumes waiters.

Asked by: jeff

16 years agoEr, don't restart a timeout version.
davidxu [Wed, 2 Apr 2008 04:26:59 +0000 (04:26 +0000)]
Er, don't restart a timeout version.

16 years agoIntroduce kernel based userland rwlock. Each umtx chain now has two lists,
davidxu [Wed, 2 Apr 2008 04:08:37 +0000 (04:08 +0000)]
Introduce kernel based userland rwlock. Each umtx chain now has two lists,
one for readers and one for writers, other types of synchronization
object just use first list.

Asked by: jeff

16 years agoAdd manpages for rw_try_rlock() and rw_try_wlock() functions.
attilio [Tue, 1 Apr 2008 20:56:45 +0000 (20:56 +0000)]
Add manpages for rw_try_rlock() and rw_try_wlock() functions.

16 years agoCalling RequestSupplementAdapterInfo before RequestAdapterInfo appears
emaste [Tue, 1 Apr 2008 20:53:32 +0000 (20:53 +0000)]
Calling RequestSupplementAdapterInfo before RequestAdapterInfo appears
to trip a bug causing the latter to return a zeroed struct
aac_adapter_info.  This causes two issues.  One is cosmetic only --
a verbose boot prints information about the controller, and shows all
zero:

aac0: Unknown processor 0MHz, 0MB memory (0MB cache, 0MB execution),
  unknown battery platform

The second problem is that the firmware version information is stored
away for aac_rev_check, for userland tools (like aaccli) to query via
the FSACTL_MINIPORT_REV_CHECK and FSACTL_LNX_MINIPORT_REV_CHECK ioctls.
When aaccli encounters this issue it prints

Command Error: <The current AFAAPI.DLL is too old to work with the
  current controller software.>

Move the RequestSupplementAdapterInfo call after RequestAdapterInfo,
which seems to fix both problems.

16 years agoBump __FreeBSD_version in order to reflect rw_try_rlock() and
attilio [Tue, 1 Apr 2008 20:33:06 +0000 (20:33 +0000)]
Bump __FreeBSD_version in order to reflect rw_try_rlock() and
rw_try_wlock() functions introduction.

16 years agoAdd rw_try_rlock() and rw_try_wlock() to rwlocks.
attilio [Tue, 1 Apr 2008 20:31:55 +0000 (20:31 +0000)]
Add rw_try_rlock() and rw_try_wlock() to rwlocks.
These functions try the specified operation (rlocking and wlocking) and
true is returned if the operation completes, false otherwise.

The KPI is enriched by this commit, so __FreeBSD_version bumping and
manpage updating will happen soon.

Requested by: jeff, kris

16 years agoDon't try to use an SX lock while holding the vnode interlock.
dfr [Tue, 1 Apr 2008 16:07:01 +0000 (16:07 +0000)]
Don't try to use an SX lock while holding the vnode interlock.

Sponsored by: Isilon Systems

16 years agoAdd an -O option to disable TCP options, for protocol testing purposes.
bms [Tue, 1 Apr 2008 13:54:24 +0000 (13:54 +0000)]
Add an -O option to disable TCP options, for protocol testing purposes.
Do this for active and passive (-l switch) TCP sessions.

MFC after: 1 week

16 years agoAdd pkg_check and pkg_sign to ObsoleteFiles.inc
flz [Tue, 1 Apr 2008 11:05:26 +0000 (11:05 +0000)]
Add pkg_check and pkg_sign to ObsoleteFiles.inc

Reminded by: Pawel Worach
MFC after: 1 week

16 years agoCorrect the prototype for the faccessat().
kib [Tue, 1 Apr 2008 10:49:06 +0000 (10:49 +0000)]
Correct the prototype for the faccessat().

Reported by: ru

16 years agoConnect malo.4 to the build.
weongyo [Tue, 1 Apr 2008 07:20:04 +0000 (07:20 +0000)]
Connect malo.4 to the build.

Approved by: thompsa (mentor)

16 years agoNormally, we are often reading local time rather than setting time zone,
davidxu [Tue, 1 Apr 2008 06:56:11 +0000 (06:56 +0000)]
Normally, we are often reading local time rather than setting time zone,
replace mutex with rwlock, this should eliminate lock contention in
most cases.

16 years agoRestore normal pthread_cond_signal path to avoid some obscure races.
davidxu [Tue, 1 Apr 2008 06:23:08 +0000 (06:23 +0000)]
Restore normal pthread_cond_signal path to avoid some obscure races.

16 years agoAdd malo driver to the build
weongyo [Tue, 1 Apr 2008 01:55:19 +0000 (01:55 +0000)]
Add malo driver to the build

Approved by: thompsa (mentor)

16 years agoremove warnings for 64bit aware platforms.
weongyo [Tue, 1 Apr 2008 01:48:08 +0000 (01:48 +0000)]
remove warnings for 64bit aware platforms.

Approved by: thompsa (mentor)

16 years agoreturn EAGAIN early rather than running bunch of code later, micro optimize
davidxu [Tue, 1 Apr 2008 00:21:49 +0000 (00:21 +0000)]
return EAGAIN early rather than running bunch of code later, micro optimize
static branch prediction.

16 years agoThe MPT driver treats the "core" module with the same importance and
scottl [Mon, 31 Mar 2008 21:54:05 +0000 (21:54 +0000)]
The MPT driver treats the "core" module with the same importance and
abstraction as the RAID and CAM modules, making it nearly impossible
for enough initialization to be done in time for the RAID module to
know whether to attach.  On top of this, no reset was being done on
the controller on attach, in violation of the spec.  Additionally,
the port enable step was being deferred to the end of the attach
process, long after it should have been done to ensure reliable
operation from the controller.  Fix all of these with a few hacks
to force the "attach" and "enable" steps of the core module early
on, and ensure that a reset and port enable also happens early on.
In the future, the driver needs to be refactored to eliminate the
core module abstraction, clean up withe reset/enable steps, and
defer event messages until all of the modules are available to
recieve them.

16 years agoreduce the size of the jumbo ring on i386 and disable pcpu cluster caching
kmacy [Mon, 31 Mar 2008 21:02:27 +0000 (21:02 +0000)]
reduce the size of the jumbo ring on i386 and disable pcpu cluster caching

16 years agoadd include path required to find ah_osdep.h
sam [Mon, 31 Mar 2008 18:49:09 +0000 (18:49 +0000)]
add include path required to find ah_osdep.h

PR: kern/122145
MFC after: 3 days

16 years agoFix handling of create operation together with setting other parameters:
sam [Mon, 31 Mar 2008 15:38:07 +0000 (15:38 +0000)]
Fix handling of create operation together with setting other parameters:
o mark cmds/parameters to indicate they are potential arguments to a clone
  operation (e.g. vlantag)
o when handling a create/clone operation do the callback on seeing the first
  non-clone cmd line argument so the new device is created and can be used;
  and re-setup operating state to reflect the newly created device

Reviewed by: Eugene Grosbein
MFC after: 2 weeks

16 years agoFix punctiation.
skv [Mon, 31 Mar 2008 14:11:37 +0000 (14:11 +0000)]
Fix punctiation.

Approved by: ru

16 years agoAccept empty -T arguments.
phk [Mon, 31 Mar 2008 13:56:15 +0000 (13:56 +0000)]
Accept empty -T arguments.

Proposed by: clemens fischer <ino-qc@spotteswoode.de.eu.org>

16 years agoDouble up the necessary size of /usr/obj to 800MB
pav [Mon, 31 Mar 2008 13:32:55 +0000 (13:32 +0000)]
Double up the necessary size of /usr/obj to 800MB

PR: misc/99735
Reported by: Philip M. Gollucci <pgollucci@p6m7g8.com>,
Maxim Konovalov <maxim@macomnet.ru>

16 years agoRemove a (bogus) remnant of debugging this on sparc64.
das [Mon, 31 Mar 2008 13:11:45 +0000 (13:11 +0000)]
Remove a (bogus) remnant of debugging this on sparc64.

16 years agoRetire pkg_sign. It was used to embed signatures in gzip'ed packages.
flz [Mon, 31 Mar 2008 12:45:17 +0000 (12:45 +0000)]
Retire pkg_sign. It was used to embed signatures in gzip'ed packages.
It's not relevant since we've changed to bzip2 compression.

MFC after: 1 week

16 years agoAdd the libc glue and headers definitions for the *at() syscalls.
kib [Mon, 31 Mar 2008 12:14:04 +0000 (12:14 +0000)]
Add the libc glue and headers definitions for the *at() syscalls.

Based on the submission by rdivacky,
sponsored by Google Summer of Code 2007
Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoRegen
kib [Mon, 31 Mar 2008 12:12:27 +0000 (12:12 +0000)]
Regen

16 years agoAdd the freebsd32 compatibility shims for the *at() syscalls.
kib [Mon, 31 Mar 2008 12:08:30 +0000 (12:08 +0000)]
Add the freebsd32 compatibility shims for the *at() syscalls.

Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoAdd the openat(), fexecve() and other *at() syscalls to the table.
kib [Mon, 31 Mar 2008 12:06:55 +0000 (12:06 +0000)]
Add the openat(), fexecve() and other *at() syscalls to the table.

Based on the submission by rdivacky,
sponsored by Google Summer of Code 2007
Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoImplement the fexecve(2) syscall.
kib [Mon, 31 Mar 2008 12:05:52 +0000 (12:05 +0000)]
Implement the fexecve(2) syscall.

Based on the submission by rdivacky,
sponsored by Google Summer of Code 2007
Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoImplement the
kib [Mon, 31 Mar 2008 12:04:20 +0000 (12:04 +0000)]
Implement the
openat(2), faccessat(2), fchmodat(2), fchownat(2), fstatat(2),
futimesat(2), linkat(2), mkdirat(2), mkfifoat(2), mknodat(2),
readlinkat(2), renameat(2), symlinkat(2)
syscalls.

Based on the submission by rdivacky,
sponsored by Google Summer of Code 2007
Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoAdd the support for the AT_FDCWD and fd-relative name lookups to the
kib [Mon, 31 Mar 2008 12:01:21 +0000 (12:01 +0000)]
Add the support for the AT_FDCWD and fd-relative name lookups to the
namei(9).

Based on the submission by rdivacky,
sponsored by Google Summer of Code 2007
Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoAdd the support for the O_EXEC open(2) mode, as specified by the
kib [Mon, 31 Mar 2008 11:57:18 +0000 (11:57 +0000)]
Add the support for the O_EXEC open(2) mode, as specified by the
POSIX Extended API Set Part 2 extension specification.

Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoAdd the constant definition needed by the implementation of the
kib [Mon, 31 Mar 2008 11:55:10 +0000 (11:55 +0000)]
Add the constant definition needed by the implementation of the
openat() and the related syscalls.

Based on the submission by rdivacky,
sponsored by Google Summer of Code 2007
Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoAdd the utility function vn_commname() to retrieve the command name
kib [Mon, 31 Mar 2008 11:53:03 +0000 (11:53 +0000)]
Add the utility function vn_commname() to retrieve the command name
from the vfs namecache, when available.

Reviewed by: rwatson, rdivacky
Tested by: pho

16 years agoImprove some quotes of Chinggis Khan.
ganbold [Mon, 31 Mar 2008 10:28:09 +0000 (10:28 +0000)]
Improve some quotes of Chinggis Khan.
Remove militant and moralized quotes of Chinggis Khan.
Add one more quote of Chinggis Khan.

Reviewed by: yar
Approved by: keramida(mentor)

16 years ago - Since rev 1.142 of ffs_snapshot.c the interlock has not been required
jeff [Mon, 31 Mar 2008 07:55:45 +0000 (07:55 +0000)]
 - Since rev 1.142 of ffs_snapshot.c the interlock has not been required
   to protect the v_lock pointer.  Removing the interlock acquisition
   here allows vn_lock() to proceed without requiring the interlock
   at all.
 - If the lock mutated while we were sleeping on it the interlock has
   been dropped.  It is conceivable that the upper layer code was
   relying on the interlock and LK_NOWAIT to protect the identity or
   state of the vnode while acquiring the lock.  In this case return
   EBUSY rather than trying the new lock to prevent potential races.

Reviewed by: tegge

16 years ago - Don't free snapdata structures when they are no longer in use.
jeff [Mon, 31 Mar 2008 07:47:08 +0000 (07:47 +0000)]
 - Don't free snapdata structures when they are no longer in use.
   Keeping the lockmgr lock valid allows us to switch the v_lock pointer
   in snapshot vnodes between the embedded lockmgr lock and snapdata
   lock without needing the vnode interlock to protect against races
 - Keep unused snapdata structures in a list.
 - Add a function to lock the devvp and allocate a snapdata to it or
   acquire a new one without races.  The old function was safe from
   creation races because we set the mount flag when creating snapshots
   and thus serializing them.  However, it might have been subject to
   destroying races.

Reviewed by: tegge

16 years agoInclude an extra byte for the trailing NUL. <sigh>
kientzle [Mon, 31 Mar 2008 06:24:39 +0000 (06:24 +0000)]
Include an extra byte for the trailing NUL. <sigh>

Pointy hat: Me

16 years agoMFCs noted: BTX real mode, TCP options processing fix, hptrr 1.2.
bmah [Mon, 31 Mar 2008 05:06:00 +0000 (05:06 +0000)]
MFCs noted:  BTX real mode, TCP options processing fix, hptrr 1.2.

16 years agoNew release notes: kern.features, superpages, em(4)/igb split, malo(4),
bmah [Mon, 31 Mar 2008 04:38:58 +0000 (04:38 +0000)]
New release notes:  kern.features, superpages, em(4)/igb split, malo(4),
mxge firmware 1.4.29 update, bpf(4) zerocopy, kgdb(1) add-kld, procstat(1),
realpath(1) -q (+MFC), top(1) -P, hostapd 0.5.10, WPA supplicant 0.5.10,
GNOME 2.22 (+MFC).

Modified release notes:  Add cpuset(2) manpage reference, make wpi(4)
note reflect reality, tzdata2008b.

MFCs noted:  ddb(4) output capture, ddb(4) scripting.

16 years agoPadding more bytes than necessary one broke another variants of
yongari [Mon, 31 Mar 2008 04:03:14 +0000 (04:03 +0000)]
Padding more bytes than necessary one broke another variants of
PCIe RealTek chips. Only pad IP packets if the payload is less than
28 bytes.

Obtained from: NetBSD
PR: kern/122221

16 years agoRewrite rwlock to user atomic operations to change rwlock state, this
davidxu [Mon, 31 Mar 2008 02:55:49 +0000 (02:55 +0000)]
Rewrite rwlock to user atomic operations to change rwlock state, this
eliminates internal mutex lock contention when most rwlock operations
are read.

Orignal patch provided by: jeff

16 years agoBetter implement I-cache invalidation. The previous implementation
marcel [Sun, 30 Mar 2008 23:09:14 +0000 (23:09 +0000)]
Better implement I-cache invalidation. The previous implementation
was a kluge. This implementation matches the behaviour on powerpc
and sparc64.
While on the subject, make sure to invalidate the I-cache after
loading a kernel module.

MFC after: 2 weeks

16 years agoAdd assembly versions of remquol() and remainderl().
das [Sun, 30 Mar 2008 21:21:53 +0000 (21:21 +0000)]
Add assembly versions of remquol() and remainderl().

16 years agoTest remainderl() and remquol() as well.
das [Sun, 30 Mar 2008 20:48:33 +0000 (20:48 +0000)]
Test remainderl() and remquol() as well.

16 years agoHook remquol() and remainderl() up to the build.
das [Sun, 30 Mar 2008 20:48:02 +0000 (20:48 +0000)]
Hook remquol() and remainderl() up to the build.

16 years agoImplement remainderl() as a wrapper around remquol(). The extra work
das [Sun, 30 Mar 2008 20:47:42 +0000 (20:47 +0000)]
Implement remainderl() as a wrapper around remquol(). The extra work
remquol() performs to compute the quotient is negligible.

16 years agoImplement remquol() based on remquo().
das [Sun, 30 Mar 2008 20:47:26 +0000 (20:47 +0000)]
Implement remquol() based on remquo().

16 years agoAdd some minimal tests for csqrtl().
das [Sun, 30 Mar 2008 20:09:51 +0000 (20:09 +0000)]
Add some minimal tests for csqrtl().

16 years agoEliminate an unnecessary printf() from kmem_suballoc(). The subsequent
alc [Sun, 30 Mar 2008 20:08:59 +0000 (20:08 +0000)]
Eliminate an unnecessary printf() from kmem_suballoc().  The subsequent
panic() can be extended to convey the same information.

16 years agoImplement csqrtl().
das [Sun, 30 Mar 2008 20:07:15 +0000 (20:07 +0000)]
Implement csqrtl().

16 years agoHook hypotl() and cabsl() up to the build.
das [Sun, 30 Mar 2008 20:03:46 +0000 (20:03 +0000)]
Hook hypotl() and cabsl() up to the build.

16 years agoDocument hypotl().
das [Sun, 30 Mar 2008 20:03:29 +0000 (20:03 +0000)]
Document hypotl().

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>

16 years agoAlias hypotl() and cabsl() for platforms where long double is the same
das [Sun, 30 Mar 2008 20:03:06 +0000 (20:03 +0000)]
Alias hypotl() and cabsl() for platforms where long double is the same
as double.

16 years agoImplement cabsl() in terms of hypotl().
das [Sun, 30 Mar 2008 20:02:03 +0000 (20:02 +0000)]
Implement cabsl() in terms of hypotl().

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>

16 years agoImplement hypotl(). This is bde's conversion of fdlibm hypot(), with minor
das [Sun, 30 Mar 2008 20:01:50 +0000 (20:01 +0000)]
Implement hypotl(). This is bde's conversion of fdlibm hypot(), with minor
fixes for ld128 by me.

16 years agolockmgrs need to be released before to be destroyed and draining doesn't
attilio [Sun, 30 Mar 2008 18:16:33 +0000 (18:16 +0000)]
lockmgrs need to be released before to be destroyed and draining doesn't
make an exception.
Add correct stub for it.

Reviewed by: rwatson

16 years agoUse fabs[f]() instead of bit fiddling for setting absolute values.
bde [Sun, 30 Mar 2008 18:07:12 +0000 (18:07 +0000)]
Use fabs[f]() instead of bit fiddling for setting absolute values.
This makes little difference in float precision, but in double
precision gives a speedup of about 30% on amd64 (A64 CPU) and i386
(A64).  This depends on fabs[f]() being inline and efficient.  The
bit fiddling (or any use of SET_HIGH_WORD(), which libm does too
much because it was best on old 32-bit machines) always causes
packing overheads and sometimes causes stalls in the packing, since
it operates on only part of a variable in the double precision case.
It apparently did cause stalls in a critical path here.

16 years agoUse the expression fabs(x+0.0)-fabs(y+0.0) instead of
bde [Sun, 30 Mar 2008 17:28:27 +0000 (17:28 +0000)]
Use the expression fabs(x+0.0)-fabs(y+0.0) instead of
                   fabs(x+0.0)+fabs(y+0.0) when mixing NaNs.  This improves
consistency of the result by making it harder for the compiler to reorder
the operands.  (FP addition is not necessarily commutative because the
order of operands makes a difference on some machines iff the operands are
both NaNs.)

16 years agoFix a missing mask in a hi+lo decomposition. Thus bug made the extra
bde [Sun, 30 Mar 2008 17:17:42 +0000 (17:17 +0000)]
Fix a missing mask in a hi+lo decomposition.  Thus bug made the extra
precision in software useless, so hypotf() had some errors in the 1-2
ulp range unless there is extra precision in hardware (as happens on
i386).

16 years agoImprove style a little and remove one always-true condition.
rdivacky [Sun, 30 Mar 2008 16:49:19 +0000 (16:49 +0000)]
Improve style a little and remove one always-true condition.

Approved by: portmgr (pav)
Approved by: kib (mentor)

16 years ago - Consistently return EDEADLK when presented with a new set that is
jeff [Sun, 30 Mar 2008 11:31:14 +0000 (11:31 +0000)]
 - Consistently return EDEADLK when presented with a new set that is
   incompatible with existing bindings.
 - Try to copyout the setid in cpuset() before migrating the proc to the
   setid in case the user has supplied a bad buffer.
 - Rename cpuset_root() and cpuset_base() to cpuset_ref{root,base} to
   be more descriptive and free cpuset_root to be used as a different
   type of symbol.
 - Make cpuset_root the cpuset_t set of all cpus in the system.  This
   should contain the same bitmask as all_cpus presently.
 - Add a CPU_CMP() macro to compare two sets.

16 years agoDon't call xdrrec_skiprecord in the non-blocking case. If
dfr [Sun, 30 Mar 2008 09:36:17 +0000 (09:36 +0000)]
Don't call xdrrec_skiprecord in the non-blocking case. If
__xdrrec_getrec has returned TRUE, then we have a complete request in
the buffer - calling xdrrec_skiprecord is not necessary. In particular,
if there is another record already buffered on the stream,
xdrrec_skiprecord will discard both this request and the next
one, causing the call to xdr_callmsg to fail and the stream to be
closed.

Sponsored by: Isilon Systems

16 years agoDon't assume that there is readable data on the stream after the
dfr [Sun, 30 Mar 2008 09:35:04 +0000 (09:35 +0000)]
Don't assume that there is readable data on the stream after the
fragment header.

16 years ago- Account all node stats at the shape mode.
mav [Sun, 30 Mar 2008 07:53:51 +0000 (07:53 +0000)]
- Account all node stats at the shape mode.
- Do not check destination hook presence, it will be done by netgraph.
- Use u_int instead of int in some places to simplify type conversions.
- Use NG_SEND_DATA_ONLY() macro instead of selfmade equivalent.

16 years agoAdd a new function is_default_interface() which determines if this
brooks [Sun, 30 Mar 2008 02:42:39 +0000 (02:42 +0000)]
Add a new function is_default_interface() which determines if this
interface is one with the default route (or there isn't one).  Use it to
decide if we should adjust the default route and /etc/resolv.conf.

Fix the delete of the default route.  The if statement was totally bogus
and the delete only worked due to a typo. [1]

Reported by: Jordan Coleman <jordan at JordanColeman dot com> [1]
MFC after: 1 week

16 years agoUse new atomic_fetchadd() primitive instead of looping atomic_cmpset().
mav [Sun, 30 Mar 2008 00:27:48 +0000 (00:27 +0000)]
Use new atomic_fetchadd() primitive instead of looping atomic_cmpset().

16 years ago - Don't allow calls to vn_lock() with no lock type requested. Callers
jeff [Sat, 29 Mar 2008 23:36:26 +0000 (23:36 +0000)]
 - Don't allow calls to vn_lock() with no lock type requested.  Callers
   which simply want a reference should use vref().  Callers which want
   to check validity need to hold a lock while performing any action
   based on that validity.  vn_lock() would always release the interlock
   before returning making any action synchronous with the validity check
   impossible.