Import Apache apr-1.4.8 to vendor staging area.
Add IOMMU PCI subclass, found on Tyan S8236 motherboard.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
Optimise reading of pending interrupt registers. If there are no
pending interrupt bits, skip the bit iteration loop.

Reviewed by:	ian @
- The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.

MFC after:	3 days
- The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.

MFC after:	3 days
Use an intermediate target to associate with _SUBDIR which is marked .MAKE
this allows make -n to do tree walks as expected without
doing anything else (as intended).
Use prefix _sub. to help avoid conflict with any real target.

Reviewed by:	imp
Add ismt(4) driver.

ismt(4) supports the SMBus Message Transport controller found on Intel
C2000 series (Avoton) and S1200 series (Briarwood) Atom SoCs.

Sponsored by:	Intel
Fix warning messages after r252015

$alias used to hold alias number, but now it carries full variable name,
so messages were tuned to account for that.

Other fixes:
 - eliminate unneeded double spaces;
 - tell user where inet/inet6 keywords are expected to be.
Reviewed by:	hrs
MFC after:	1 week
Add PG_RW check when translating a guest linear to guest physical address.

Set the accessed and dirty bits in the page table entry. If it fails then
restart the page table walk from the beginning. This might happen if another
vcpu modifies the page tables simultaneously.

Reviewed by:	alc, kib
Move Nx definition to a separate block.

Noticed by:	ru (a while ago)
- Add myself to committers-src.dot

Approved by:	ken/scottl (mentors)
Old PCIe implementations cannot allow a DMA transfer to cross a 4GB
boundary.  This was addressed several years ago by creating a parent
tag hierarchy for the root buses that set the boundary restriction
for appropriate buses and allowed child deviced to inherit it.
Somewhere along the way, this restriction was turned into a case for
marking the tag as a candidate for needing bounce buffers, instead
of just splitting the segment along the boundary line.  This flag
also causes all maps associated with this tag to be non-NULL, which
in turn causes bus_dmamap_sync() to take the slow path of function
pointer indirection to discover that there's no bouncing work to
do.  The end result is a lot of pages set aside in bounce pools
that will never be used, and a slow path for data buffers in nearly
every DMA-capable PCIe device.  For example, our workload at Netflix
was spending nearly 1% of all CPU time going through this slow path.

Fix this problem by being more selective about when to set the
COULD_BOUNCE flag.  Only set it when the boundary restriction
exists and the consumer cannot do more than a single DMA segment
at once.  This fixes the case of dynamic buffers (mbufs, bio's)
but doesn't address static buffers allocated from bus_dmamem_alloc().
That case will be addressed in the future.

For those interested, this was discovered thanks to Dtrace Flame
Graphs.

Discussed with: jhb, kib
Obtained from:	Netflix, Inc.
MFC after:	3 days
Check for mismatched vref()/vdrop()

Assert that the hold count has not fallen below the use count, a situation
that would only happen when a vref() (or similar) is erroneously paired
with a vdrop().  This situation has not been observed in the wild, but
could be helpful for someone implementing a new filesystem.

Reviewed by:	kib
Approved by:	hrs (mentor)
Document VMware-related filesystems additions.

Reviewed by:    jmg
MFC after:      1 week
Avoid starting a USB transfer inside the callback function, right
after its been submitted.

MFC after:	3 days
- Configure Rx bulk
- Announce flow control capability to PHY drivers
Remove redundand loop.  The inner goto restarts the whole page
handling in the situation identical to the loop condition.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
- Replace some constants with macros.
- Need to set the pre-fetch memory address when reading the host memory.
- We currently assume that no endianness conversion is needed.

Sponsored by:	DARPA, AFRL
- Fix a bug which can make sysctl() fail when -F is specified.
- Increase WID_IF_DEFAULT() from 6 to 8 (the default for AF_INET6) because
  we have interfaces with longer names than 6 chars like epairN{a,b}.
- Style fixes.
Fix tty locking.
o Correct expected values for VT_LOCKSWITCH ioctl.
o Check current window for locked state.

Sponsored by:	The FreeBSD Foundation