Revert revision 249323, the PR/177624 is confusing, that bug is caused
by using buggy getcontext/setcontext on same stack, while swapcontext
normally works on different stack, there is no such a problem.


git-svn-id: svn://svn.freebsd.org/base/head@249604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When calculating the number of reserved nodes, discount the pages that will
be used to store the nodes.

Sponsored by:	EMC / Isilon Storage Division


git-svn-id: svn://svn.freebsd.org/base/head@249605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Avoid copying memory if SIGCANCEL is not masked.


git-svn-id: svn://svn.freebsd.org/base/head@249606 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove debug code.


git-svn-id: svn://svn.freebsd.org/base/head@249607 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Move the previously added CPUID7 macros to CPUID_STDEXT.


git-svn-id: svn://svn.freebsd.org/base/head@249608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove EOL whitespace.


git-svn-id: svn://svn.freebsd.org/base/head@249616 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make siis(4) and mvs(4) send bus_get_dma_tag() requests to parent buses
passing real bus' child pointers instead of grandchilds.

Requested by:	kib


git-svn-id: svn://svn.freebsd.org/base/head@249622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Both NFS clients can deadlock when using the "rdirplus" mount
option. This can occur when an nfsiod thread that already holds
a buffer lock attempts to acquire a vnode lock on an entry in
the directory (a LOR) when another thread holding the vnode lock
is waiting on an nfsiod thread. This patch avoids the deadlock by disabling
readahead for this case, so the nfsiod threads never do readdirplus.
Since readaheads for directories need the directory offset cookie
from the previous read, they cannot normally happen in parallel.
As such, testing by jhb@ and myself didn't find any performance
degredation when this patch is applied. If there is a case where
this results in a significant performance degradation, mounting
without the "rdirplus" option can be done to re-enable readahead
for directories.

Reported and tested by:	jhb
Reviewed by:	jhb
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Introduce kern.timecounter.smp_tsc_adjust tunable (disabled by default) and
respective functionality, allowing to synchronize TSC on APs to match BSP's
during boot.  It may be unsafe in general case due to theoretical chance of
later drift if CPUs are using different clock rate or source, but it allows
to use TSC in some cases when difference caused by some initialization bug,
while TSCs are known to increment synchronously.

Reviewed by:	jimharris, kib
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249625 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cxgbe/tom: Update the CLIP table on the chip when there are changes
to the list of IPv6 addresses on the system.  The table is used for
TOE+IPv6 only.


git-svn-id: svn://svn.freebsd.org/base/head@249627 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Recover missing arp_ifinit() call.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cxgbe(4): Refuse to install T5 firmwares on a T4 card (and vice versa).

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249629 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When an NFS unmount occurs, once vflush() writes the last dirty
buffer for the last vnode on the mount back to the server, it
returns. At that point, the code continues with the unmount,
including freeing up the nfs specific part of the mount structure.
It is possible that an nfsiod thread will try to check for an
empty I/O queue in the nfs specific part of the mount structure
after it has been free'd by the unmount. This patch avoids this problem by
setting the iodmount entries for the mount back to NULL while holding the
mutex in the unmount and checking the appropriate entry is non-NULL after
acquiring the mutex in the nfsiod thread.

Reported and tested by:	pho
Reviewed by:	kib
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Attempt to mitigate poor initialization of arc4 by one-shot
reinitialization from yarrow right after good entropy is harvested.

Approved by:    secteam (delphij)
MFC after:      1 week


git-svn-id: svn://svn.freebsd.org/base/head@249631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'