Remove mention of the compatibility option 'q', which is
intentionally undocumented and its only purpose is that
we do not bail out when used as a drop-in replacement of
a different implementation.

PR:		docs/184550
MFC after:	2 weeks
Add some PLCP thresholds from Linux iwlwifi driver in preparation for
working on some RF tuning issues.

The linux iwlwifi driver has these thresholds which they use to see
if there are PLCP errors over a certain interval.  If they hit this,
they trigger a single-channel (different from active channels!)
scan to retune the RF front-end.
Document -q and --quiet as discouraged compatibility option.

Suggested by:	eadler
MFC after:	2 weeks
Begin fleshing out some code to handle tracking PLCP error rates
in preparation for the scan based retune logic.

The linux iwlwifi driver does a rescan (onto a non-active channel)
to force an RF retune when the PLCP error rates exceed a certain threshold.

* Add code to track HT PLCP rate errors;
* Separate out the PLCP error count fetch and update so the delta
  can be used when checking for PLCP error rates;
* Implement the PLCP error logic from iwlwifi;
* For now, just print out whenever the error rate exceeds the
  threshold.

The actual scan based retune will take a bit more effort; the scan
command code right now assumes that a scan state is passed in.
This does need to change to be more flexible (both for this and
in preparation for scanning multiple channels at once.)

Tested:

* 5100 (STA mode)
* 2200 (STA mode)
* 2230 (STA mode)
Refactor out the scan channel to be assigned early on in iwn_scan()
rather than it all being a mess of 'c' and 'ic->ic_curchan'.

Tested:

* Intel 5100 (STA)
Add a channel parameter to iwn_scan().

This is in preparation for being able to use iwn_scan() to do an off
channel scan to reset the RF tuning.

It should be a no-op.

Tested:

* Intel 5100 (STA)
Refactor out the scan id and scan vap as part of the scan work.

Make the scan state optional - we'll obviously need a vap, but we now
won't require the scan state.  the only thing the scan state is needed
for is to check for the list of SSIDs to scan - which we can now
just plain ignore by passing in NULL as the scan state pointer.

Tested:

* Intel 5100 (STA)
Include dev/fb/fb_if.m in build always, without it kms modules complain about
lack of fb_getinfo_desc symbol.

Submitted by:	dumbbell

Sponsored by:	The FreeBSD Foundation
Cast Elf_Addr to void * to match the free_aligned() argument type.

Found by:	gcc
Sponsored by:	The FreeBSD Foundation
MFC after:	6 days
Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
passed to 'make release'.

MFC after:	3 days
X-Before-RC2:	yes
Sponsored by:	The FreeBSD Foundation
Fix some integer signs.  These unsigned integers should all be signed.

Found by:	clang (powerpc64)
If a vcpu disables its local apic and then executes a 'HLT' then spin down the
vcpu and destroy its thread context. Also modify the 'HLT' processing to ignore
pending interrupts in the IRR if interrupts have been disabled by the guest.
The interrupt cannot be injected into the guest in any case so resuming it
is futile.

With this change "halt" from a Linux guest works correctly.

Reviewed by:	grehan@
Tested by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
Make more unsigned ints signed.

Found by:	clang (powerpc64)
MFC after:	1 week
For WARNS <= 3, change the clang warning flag -Wno-conversion to
-Wno-enum-conversion.  In earlier clang versions (before 3.2), the
latter did not exist, and suppressing enum conversion warnings was
really the goal of this warning suppression flag.

This should enable the same kind of warning again as was fixed by
r259072 ("incompatible integer to pointer conversion passing 'Elf_Addr'
(aka 'unsigned int') to parameter of type 'void *'"), and which was only
emitted by gcc.

Noticed by:	kib
MFC after:	3 days
For software builds, the NFS client does many small
synchronous (with FILE_SYNC) writes because non-contiguous
byte ranges in the same buffer cache block are being
written. This patch adds a new mount option "noncontigwr"
which allows the non-contiguous byte ranges to be combined,
with the dirty byte range becoming the superset of the bytes
that are dirty, if the file has not been file locked.
This reduces the number of writes significantly for software
builds. The only case where this change might break existing
applications is where an application is writing
non-overlapping byte ranges within the same buffer cache block
of a file from multiple clients concurrently.
Since such an application would normally do file locking on
the file, avoiding the byte range merge for files that have
been file locked should be sufficient for most (maybe all?) cases.

Submitted by:	jhb (earlier version)
Reviewed by:	kib
MFC after:	3 weeks
Use callout(9) to drive the vlapic timer instead of clocking it on each VM exit.

This decouples the guest's 'hz' from the host's 'hz' setting. For e.g. it is
now possible to have a guest run at 'hz=1000' while the host is at 'hz=100'.

Discussed with:	grehan@
Tested by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
Vendor import nvi-2.1.2-c80f493b038 a multikey mapping fix

PR:		bin/182463
Document the noncontigwr NFS mount option.
This is a content change.

MFC after:	3 weeks
gcc: new fvisibility-ms-compat option

Obtained from:	gcc 4.3 (rev. 126088; GPLv2)
MFC after:	3 weeks
[automated] Merge in upstream-github/master