MFC mpr(4) changes: r265484, r265485, r265709 and r265712

  ------------------------------------------------------------------------
  r265484 | ken | 2014-05-06 23:11:16 -0600 (Tue, 06 May 2014) | 5 lines

  Remove some debugging code.

  Submitted by:	Steve McConnell <stephen.mcconnell@avagotech.com>

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265485 | ken | 2014-05-06 23:14:48 -0600 (Tue, 06 May 2014) | 9 lines

  Hold the SIM lock when calling xpt_create_path() and xpt_action() in
  mprsas_SSU_to_SATA_devices().

  This fixes an assertion on shutdown with INVARIANTS enabled with SATA
  drives present on an IR firmware controller.

  Reviewed by:	Steve McConnell <stephen.mcconnell@avagotech.com>.

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265709 | ken | 2014-05-08 14:28:22 -0600 (Thu, 08 May 2014) | 15 lines

  Fix TLR (Transport Layer Retry) support in the mps(4) and mpr(4) drivers.

  TLR is necessary for reliable communication with SAS tape drives.

  This was broken by change 246713 in the mps(4) driver.  It changed the
  cm_data field for SCSI I/O requests to point to the CCB instead of the data
  buffer.  So, instead, look at the CCB's data pointer to determine whether
  or not we're talking to a tape drive.

  Also, take the residual into account to make sure that we don't go off the
  end of the request.

  Sponsored by:	Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265712 | ken | 2014-05-08 14:46:46 -0600 (Thu, 08 May 2014) | 10 lines

  Add #ifdefs in the mpr(4) driver so that versions of stable/9 that
  have implemented the PIM_NOSCAN rescan functionality will have it
  enabled.

  This is a no-op for head.

  Reviewed by:	slm
  Sponsored by:	Spectra Logic Corporation

  ------------------------------------------------------------------------

Sponsored by:	Spectra Logic, Avago
Merge r266111 from head:

  Fix typo.  Note that although this file is under contrib, it has diverged
  sufficiently from upstream (including a full whitespace commit and large
  portions rewritten) that this change does not move us further from the
  upstream.

PR:		docs/186608
Submitted by:	Jamie Landeg-Jones <jamie@dyslexicfish.net>
Merge r266261 from head:

  USB endpoints are almost always single-digits, fix the path in the man
  page to be clearer.

PR:		docs/175560
Submitted by:	Andreas Gustafsson <gson gson.org>
MFC r266297: Update example portion of comment to coincide with r264840
MFC r265358, r265427, r265777, r265783,
 r265806, r265872, r266012 and r266394:

- Multiple DWC OTG host mode related fixes, improvements and optimisations.
- Add full support for ISOCHRONOUS transfers to the DWC OTG driver.
- Use the interrupt filter to handle basic USB FIFO interrupts.
- Fixed unbalanced unlock in case of "dwc_otg_init_fifo()" failure.
- Add common spinlock to the USB bus structure.
MFC r265359 and r265780:
Remove ISA load dependency for the kernel sound
driver module for ARM and MIPS.
MFC r266466, r266471, r266484, r266505, r266535 and r266542:
Fix multiple issues in the RSU driver.
MFC r257543, r264912, r264972, r264982 and r266472:
- Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.
- Add device ID for 'Sanoxy 802.11N' USB
- Initialize rssi variable.
- Fix gcc build, initialize off variable.
- The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.
MFC r266464:
In execve(2), postpone the free of old vmspace until the threads are resumed
and exited.
MFC r265886, r265948
  With the new-and-improved vm_fault_copy_entry() (r265843), we can always
  avoid soft page faults when adding write access to user wired entries in
  vm_map_protect().  Previously, we only avoided the soft page fault when
  the underlying pages were copy-on-write.  In other words, we avoided the
  pages faults that might sleep on page allocation, but not the trivial
  page faults to update the physical map.

  On a fork allow read-only wired pages to be copy-on-write shared between
  the parent and child processes.  Previously, we copied these pages even
  though they are read only.  However, the reason for copying them is
  historical and no longer exists.  In recent times, vm_map_protect() has
  developed the ability to copy pages when write access is added to wired
  copy-on-write pages.  So, in this case, copy-on-write sharing of wired
  pages is not to be feared.  It is not going to lead to copy-on-write
  faults on wired memory.
MFC r266208: Speed up pmcstat by improving string hash

  In one case generating callgraph output from a 24MB system-wide sampling
  data file took 17.4 seconds on average.  Profiling showed pmcstat
  spending a lot of time in strcmp, due to hash collisions.

  Replacing the XOR-only hash with FNV-1a reduces the run time for my
  test by 40%.
MFC r259107
  Eliminate a redundant parameter to vm_radix_replace().

  Improve the wording of the comment describing vm_radix_replace().
MFC 260469:
Fix issue with the virtio descriptor region being truncated
if it was above 4GB.
MFC 260802,260836,260863,261001,261074,261617:
Various fixes for NMI and interrupt injection.
- If a VM-exit happens during an NMI injection then clear the "NMI Blocking"
  bit in the Guest Interruptibility-state VMCS field.
- If the guest exits due to a fault while it is executing IRET then restore
  the state of "Virtual NMI blocking" in the guest's interruptibility-state
  field before resuming the guest.
- Inject a pending NMI only if NMI_BLOCKING, MOVSS_BLOCKING, STI_BLOCKING
  are all clear. If any of these bits are set then enable "NMI window
  exiting" and inject the NMI in the VM-exit handler.
- Handle a VM-exit due to a NMI properly by vectoring to the host's NMI
  handler via a software interrupt.
- Set "Interrupt Window Exiting" in the case where there is a vector to be
  injected into the vcpu but the VM-entry interruption information field
  already has the valid bit set.
- For VM-exits due to an NMI, handle the NMI with interrupts disabled in
  addition to "blocking by NMI" already established by the VM-exit.
drm/radeon: Add 32bit ioctls support

This allows to run 32bit applications on a 64bit host. This was tested
successfully with Wine (emulators/i386-wine-devel) and StarCraft II.

Submitted by:	Jan Kokemüller <jan.kokemueller@gmail.com>
MFC r266491:
Remove redundand loop.
MFC r266319:
Make GEOM DISK to account also BIO_FLUSH operations.
MFC r266320:
Add -o option to gstat to display "other" operatins (e.g. BIO_FLUSH).
MFC r265821:
Comment out some pointless device open/close around reading device IDs.

FreeBSD ZFS port unlike OpenSolaris does not use device IDs, and does not
implement respective devid_*() fuctions.  It is pointless to open devices
just to close them back immediately.
MFC r265689:
Import adapted OpenSolaris' thread pool API implementation.

The thread pool is used by libzfs to implement parallel disk scanning.
Without this change our dummy wrapper made `zpool import ZZZ` command to
scan all disks sequentially from the single thread when searching for pools.
This change makes it use two threads per CPU, same as in OpenSolaris.

On system with 200 HDDs this change reduces ZFS pool import time from 35
to 22 seconds.