Merge upstream r743: caught_signal should be static.
Damn autoprops!
Import lldb as of SVN r196322 (git 49c127ae)

(A number of files not required for the FreeBSD build have been removed.)

Sponsored by: DARPA, AFRL
Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/llvm/branches/release_34@197841
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Don't insert a flowtable entry if the lle isn't yet valid.

Some of the collisions that are occuring are due to flowtable lookups
that succeed but have an invalid lle - typically because the L2 adjacency
lookup hasn't completed.  This would lead to a follow-up insert which
would then fail (ie, collision) and the code would fall through to doing
a slow-path L2/L3 lookup in the netinet/netinet6 code.

This patch simply aborts storing a new flowtable entry if the lle isn't
yet valid.

Whilst I'm here, add a new pcpu counter for the item so the number of
failures can be tracked separately from generic "collisions."

Reviewed by:	glebius
MFC after:	10 days
Sponsored by:	Netflix, Inc.
check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
qla_hw_send is moot.
Add urtwn_start_locked() to avoid unlocking during TX.
Fix-up r254141: in the process of making a failing vm_page_rename()
a call of pager_swap_freespace() was moved around, now leading to freeing
the incorrect page because of the pindex changes after vm_page_rename().

Get back to use the correct pindex when destroying the swap space.

Sponsored by:	EMC / Isilon storage division
Reported by:	avg
Tested by:	pho
MFC after:	7 days
Add the ath0 EEPROM hints required to detect the on-chip wifi.

This allows the on-chip wifi to work; however it's not yet fully
tested.

ath0: Vendor=0x168c, Device=0x0031
ath0: Vendor=0x168c, Device=0x0031
ath0: <Atheros AR934x> at mem 0x18100000-0x1811ffff irq 0 on nexus0
...
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 stream STBC transmit enabled
ath0: [HT] 2 RX streams; 2 TX streams

Tested:

* DB120 development board
Disable this check for now; it fails on the AR9344 PCI fixup code.

I'll make it conditional later.

Tested:

* DB120
Enable use of the PCIe connected wifi on the DB120 (AR9344) board.

The on-board NIC is an 3x3 AR9380 with 5GHz only.

* enable pci code in AR9344_BASE
* enable ath_pci and the firmware loading bits in DB120
* add in the relevant hints in DB120.hints to inform the probe/attach
  code where the PCIe fixup data is for the onboard chip.

This is only relevant for a default development board.  I also have a
DB120 with the on-board PCIe wifi NIC disabled and it's exposed as
a real PCIe slot (to put normal PCIe NICs in); the fixup code will need
to be disabled to make this work correctly.

Tested:

* DB120
Fix minor logical error in the XHCI driver. Set correct SETUP packet
direction value.

MFC after:	2 days
Reported by:	Horse Ma <HMa@wyse.com>
Reword.

Suggestion:	glebius
Bump __FreeBSD_version after the libc++ 3.4 ABI compatibility fix in
r261801.

Requested by:	portmgr
Once pf became not covered by a single mutex, many counters in it became
race prone. Some just gather statistics, but some are later used in
different calculations.

A real problem was the race provoked underflow of the states_cur counter
on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this
value is used in pf_state_expires() and any state created by this rule
is immediately expired.

Thus, make fields states_cur, states_tot and src_nodes of struct
pf_rule be counter(9)s.

Thanks to Dennis for providing me shell access to problematic box and
his help with reproducing, debugging and investigating the problem.

Thanks to:		Dennis Yusupoff <dyr smartspb.net>
Also reported by:	dumbbell, pgj, Rambler
Sponsored by:		Nginx, Inc.
Whenever flowtable lookup fails, we do route lookup and then try to
insert flow entry. During the route lookup the critical section is
exited. It may happen, that after route lookup we will be executed
on an other CPU that already has such flowentry. Before this change
we simply freed the flowentry and returned to ip_output() with
failure.

Actually there is nothing wrong with using previously allocated
flow entry, updating it properly. Thus, make flowentry_insert()
return the new either old fle, and make use of it.

Count reuses as "collisions" and real inserts as "inserts".

Reviewed by:	adrian
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
Correct the order of arguments to mtx_init().

PR:		186701
Submitted by:	Takanori Sawada <tak.swd at gmail.com>
MFC after:	2 weeks
In sgetpwnam(), save and free pw_class like all other char members
of struct passwd.  This fixes spurious "login_getclass: unknown class"
errors.

PR:		186439
Submitted by:	UEMURA Tetsuya <t_uemura at macome.co.jp>
MFC after:	1 week
Import atf-0.19:

Experimental version released on February 7th, 2014.

This is the last release to bundle the code for the deprecated tools.
The next release will drop their code and will stop worrying about
backwards compatibility between the ATF libraries and what the old tools
may or may not support.

If you still require the old tools for some reason, grab a copy of the
'tools' directory now.  The code in this directory is standalone and
does not depend on any internal details of atf-c++ any longer.

* Various fixes and improvements to support running as part of the FreeBSD
  test suite.

* Project hosting moved from Google Code (as a subproject of Kyua) to
  GitHub (as a first-class project).  The main reason for the change is
  the suppression of binary downloads in Google Code on Jan 15th, 2014.
  See https://github.com/jmmv/atf/

* Removed builtin help from atf-sh(1) and atf-check(1) for simplicity
  reasons.  In other words, their -h option is gone.

* Moved the code of the deprecated tools into a 'tools' directory and
  completely decoupled their code from the internals of atf-c++.  The
  reason for this is to painlessly allow a third-party to maintain a
  copy of these tools after we delete them because upcoming changes to
  atf-c++ would break the stale tools.