Allow the PIC's IMR register to be read before ICW initialisation.

As of git submit e179f6914152eca9, the Linux kernel does a simple
probe of the PIC by writing a pattern to the IMR and then reading it
back, prior to the init sequence of ICW words.

The bhyve PIC emulation wasn't allowing the IMR to be read until
the ICW sequence was complete. This limitation isn't required so
relax the test.

With this change, Linux kernels 3.15-rc2 and later won't hang
on boot when calibrating the local APIC.

Reviewed by:	tychon
MFC after:	3 days
Remove a bogus AIC.

Reviewed by:	imp
After r271635 mmap(2) requires either MAP_PRIVATE or MAP_SHARED
for non-anonymous mappings.

This gets 'bhyvectl --get-all' working again.

Reported by:	Anish Gupta (akgupt3@gmail.com)
Add 3 long options for getting information about mkimg itself:
--version	print the version of mkimg and also whether it's
		64- or 32-bit.
--formats	list the supported output formats separated by space.
--schemes	list the supported partitioning schemes separated by
		space.

Inspired by a patch from: gjb@

MFC after:	1 week
Relnotes:	yes
Remove an un-needed bit of pre-processor work - it all lives inside
#ifdef RSS.
cxgbe(4): implement if_get_counter.
* Split tcp_signature_compute() into 2 pieces:
 - tcp_get_sav() - SADB key lookup
 - tcp_signature_do_compute() - actual computation
* Fix TCP signature case for listening socket:
  do not assume EVERY connection coming to socket
  with TCP_SIGNATURE set to be md5 signed regardless
  of SADB key existance for particular address. This
  fixes the case for routing software having _some_
  BGP sessions secured by md5.
* Simplify TCP_SIGNATURE handling in tcp_input()

MFC after:	2 weeks
Add kernel support for the TP-LINK MR3020 Atheros MIPS 24k router.

AR9331 based system.

Phabric:	https://reviews.freebsd.org/D780
Reviewed by:	adrian
Switch primes(6) from using unsigned long to using uint64_t.  This fixes
'limited range of type' warnings about comparisons on 32-bit systems, and
allows 32-bit systems to compute the full range of primes.
Revert r272189, the committed version was an old version and breaks build.

Pointy hat to:	delphij
Add machine/sysreg.h to simplify accessing the system control coprocessor
registers and use it in the ARMv7 CPU functions.

The sysreg.h file has been checked by hand, however it may contain errors
with the comments on when a register was first introduced. The ARMv7 cpu
functions have been checked by compiling both the previous and this version
and comparing the md5 of the object files.

Submitted by:	Svatopluk Kraus <onwahe at gmail.com>
Submitted by:	Michal Meloun <meloun at miracle.cz>
Reviewed by:	ian, rpaulo
Differential Revision: https://reviews.freebsd.org/D795
Update factor for changes to types in primes, which is a dependency.

Fixes build-fail on mips32 introduced at 272207.
Use underlying ports counters to get lagg statistics instead of
per-packet accounting.
This introduce user-visible changes like aggregating error counters.

Reviewed by:	asomers (prev.version), glebius
CR:		D781
MFC after:	2 weeks
Sponsored by:	Yandex LLC
Fix the definitioin of AT91SAM9G45_IRQ_PIOE and rename it to
AT91SAM9G45_IRQ_PIODE.  According to the data sheet, both PIOD and PIOE
use the same IRQ.

While here remove duplicate definitions.
Remove obsolete compatibility glue and improve firewire code readability.

Commit my version of style(9) pass over the firewire code. Now that
other people have started changing the code carrying this is as a
local patch is not longer a viable option.

MFC after:	1 month
Do not pass whole descriptor block size as align to fwdma_malloc_multiseg

Do not pass wrong alignment value to fwdma_malloc_multiseg and ultimately
to contigalloc. In addition to being wrong, this causes insta-panic in
certain cases due to safety assertion - the alignment is required to be
the power of two and the value we calculate here seldom is.

MFC after:  1 month
Disable the makeoption with MFS_IMAGE= set as we don't ship that file
and it thus breaks the default build.   You can still use various other
ways (tools) to embedd the image after the kernel build.
Update the usage message and the man page to account for the new long
options. Bump the version number to 20140927.
While here, use explicit fputc() calls to skip a line in the output.
This to avoid having to hunt for extra '\n' characters in the printf
format strings.

MFC after:	1 week
Relnotes:	yes
cxgb(4): implement if_get_counter.
Use a local STAILQ for unlocked done CCB processing in ahci direct mode

Previously it was possible for issues e.g. use after free, to result
from processing the done queue while not holding the channel lock.

While this should never happen in practice, unexpected code flows
which result in two threads processing from the same queue may
be possible.

We now use a local STAILQ to prevent this ever being an issue.

Sponsored by:	Multiplay