Fix typo when initializing the vlapic version register ('<<' instead of '<').
USB method structures for USB controllers and USB pipes should be
constant and does not need to be modified. This also saves a small
amount of RAM.
calendar(1): use strlcpy instead of strncpy

use strlcpy instead of strncpy which avoids non-null-termination if the string is MAXPATHLEN bytes or longer.
Loose -> Lose so this sentence makes sense.

MFC after:	3 days
Fix a panic when booting with kernels that have FREEBBSD_COMPAT
4, 5, 6 or 43 by only thunking the data parameter for old ioctls
compatability ioctls instead of doing it for all of them.

Submitted by:	jhb@
Destroy mtx lock when failed to allocate memory during attach.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
Use fixed-width types for all fields in MP Table structures and pack
all the structures.  While here, move a helper struct only used in
the kernel parser out of this header since it is not part of the MP
specification itself.
- Use <x86/mptable.h> instead of duplicating its definitions.
- Switch to mmaping the table from RAM instead of reading it out of
  /dev/mem via read(2).
Create own free list for each of the first 32 possible allocation sizes.
In case of 4K allocation quantum that means for allocations up to 128K.

With growth of memory fragmentation these lists may grow to quite a large
sizes (tenths and hundreds of thousands items).  Having in one list items
of different sizes in worst case may require full linear list traversal,
that may be very expensive.  Having lists for items of single size means
that unless user specify some alignment or border requirements (that are
very rare cases) first item found on the list should satisfy the request.

While running SPEC NFS benchmark on top of ZFS on 24-core machine with
84GB RAM this change reduces CPU time spent in vmem_xalloc() from 8%
and lock congestion spinning around it from 20% to invisible levels.
And that all is by the cost of just 26 more pointers per vmem instance.

If at some point our kernel will start to actively use KVA allocations
with odd sizes above 128K, something may need to be done to bigger lists
also.
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
	When a da or ada device dissappears, outstanding IOs fail with
	ENXIO, not EIO.  The check for EIO was probably copied from Illumos,
	where that is indeed the correct errno.

	Without this change, pulling a busy drive from a zpool would usually
	turn it into UNAVAIL, even though pulling an idle drive would turn
	it into REMOVED.  With this change, it is REMOVED every time.

	Also, vdev_geom_io_intr shouldn't do zfs_post_remove, because that
	results in devd getting two resource.fs.zfs.removed events.  The
	comment said that the event had to be sent directly instead of
	through the async removal thread because "the DE engine is using
	this information to discard prevoius I/O errors".  However, the fact
	that vdev_geom_io_intr was never actually sending the events until
	now, and that vdev_geom_orphan never sent them at all, and that
	vdev_geom_orphan usually gets called about 2 seconds after the
	actual removal, means that FreeBSD's userland can cope with a late
	event just fine.

Approved by:	ken (mentor)
Sponsored by:	Spectra Logic Corporation
MFC after:	4 weeks
Allow pmap_remove_pages() to be called for physical maps not
associated with the current thread.

Obtained from: alc@
FBT now does work fully on PowerPC.

MFC after:	2 weeks
[automated] Merge in upstream-github/master