Vendor import of tcsh 6.15.00
Import tcsh-6.17.00
kernel - Terminate ddb backtraces at Xfast_syscall

* Terminate ddb backtraces at Xfast_syscall to try to avoid double-faults
  from recursing into garbage.
<pthread.h>: Adjust the visibility of pthread_{get,set}stackaddr() protos.

The functions were removed from issue 7 of the specification.

http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap01.html
netisr: Inline netisr_cpuport() and netisr_curport()

These two functions do nothing more than just return pointer to the
element in the array.

Per our header file naming convention, put these two functions in
net/netisr2.h
netisr: Add netisr_hashport, which finds netisr msgport based on pkt hash
netisr: Add netisr_hashcpu, which maps pkt hash to cpuid
netisr: Renaming, cpufn -> hashfn; no functional changes
netisr: Fix comment
ip_demux: Remove unused udp_mpsafe_thread global variable
ip_demux: Save raw hash, instead of hash masked w/ ncpus2_mask, i.e. cpuid
toeplitz: Return raw hash

Currently only 16 bits are valid, since the key is seeded with 2 bytes.
rtadvd(8): Fix a typo in a message.
hammer2 - Major restructuring, part 3/several

* Use hammer2_chain_duplicate() to move hardlinks to common parents.

* Adjust flush algorithms, particularly when it comes to figuring out
  when we can clear the MOVED bit on a chain.

* chain RBTREE sorts on delete_tid in addition to sorting on the key.
  Add ranged searches.

  The frontend no longer modifies indirect blocks.  Instead, chains in
  the RBTREE are used to placehold both insertions and deletions.

* Stabilization pass.  (still work to do on chain refs / unmount and
  optimizing the flush).
hammer2 - Major restructuring, part 4/several

* Add inumber -> inode structure tracking and lookup.  This is needed to
  ensure that only a single inode structure be used to track multiple
  hardlinks to the same place.

* Continue stabilization.  Remove modify_tid/delete_tid checks in the
  flush code and (for now) only flush along the live path.

  Refactor held chains when creating new chains.  The creation of a new
  chain can move around existing chains, causing the held chain to be
  marked deleted.

  When a hardlink is consolidated in a parent directory the source chain
  used in the duplication is not deleted.  Numerous chain->duplink
  handling code was assuming that the source was always deleted.  Fix
  that.

* The shared inode lock now refactors ip->chain (the exclusive inode lock
  already did so).

* Fix most ref-counting of the chain structure, fixing most of the memory
  leakage issues on unmount.

* There are still some issues with small files not inheriting their data
  on duplication.  cpdup /usr/share works but a significant number of
  small files lose their data references on re-mount.
hammer2 - Improve 'hammer2 show'

* The show directive now chooses the best volume header by default
  (but will dump all four if you specify -vvv).
bnx: Implement multiple RX/TX rings and MSI-X support for 5718/57785

BCM5718 and BCM57785 families support 4 RX rings and 5 MSI-X vectors.
Additionally BCM5719/BCM5720 support 4 TX rings, while other chips in
these two families only support 1 TX ring.  Each MSI-X vector has its
own interrupt moderation parameters.

Hardware supplied RSS hash and packet type are not utilized yet; they
will be supported in the upcoming commits.

This commit also fixes some RX standard ring refilling races introduced
in:
841cdf08263117c54b0a800440c7630b6913c21e

RX standard ring refilling scheduling may enjoy futher optimization.
bnx: Fix up some comment abount ring control blocks (RCBs)
Unbreak buildworld.
kernel/netgraph: Fix a 64 bit pointer issue.

Previously, ng_parse_uint32_type was taken on x86_64 too.

Taken-from: FreeBSD