Replace a magic number with the proper definition.  This change actually
fixes broken state field after r273266, i.e., "CPU-1" was displayed in place
of "RUN".
Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext().  While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().

Reviewed by:	kib
MFC after:	3 days
.a's are installed in /usr/lib, don't delete them.
filedesc: get rid of atomic_load_acq_int from fget_unlocked

A read barrier was necessary because fd table pointer and table size were
updated separately, opening a window where fget_unlocked could read new size
and old pointer.

This patch puts both these fields into one dedicated structure, pointer to which
is later atomically updated. As such, fget_unlocked only needs data a dependency
barrier which is a noop on all supported architectures.

Reviewed by:	kib (previous version)
MFC after:	2 weeks
filedesc: microoptimize fget_unlocked by retrying obtaining reference count
without restarting whole lookup

Restart is only needed when fp was closed by current process, which is a much
rarer event than ref/deref by some other thread.
fix spelling of offset since that is what is used in the body...
filedesc: make sure to force table reload in fget_unlocked when count == 0

This is a fixup to r273843.
Get rid of obsolete code in mount_nfs(8).

Reviewed by:	rmacklem@
Sponsored by:	The FreeBSD Foundation
Add support for "timeo", "actimeo", "noac", and "proto" options
to mount_nfs(8).  They are implemented on Linux, OS X, and Solaris,
and thus can be expected to appear in automounter maps.

Reviewed by:	rmacklem@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Fix a race condition in TCP timewait between tcp_tw_2msl_reuse() and
tcp_tw_2msl_scan().  This race condition drives unplanned timewait
timeout cancellation.  Also simplify implementation by holding inpcb
reference and removing tcptw reference counting.

Differential Revision:	https://reviews.freebsd.org/D826
Submitted by:		Marc De la Gueronniere <mdelagueronniere@verisign.com>
Submitted by:		jch
Reviewed By:		jhb (mentor), adrian, rwatson
Sponsored by:		Verisign, Inc.
MFC after:		2 weeks
X-MFC-With:		r264321
Note that the "timeout" nfs option is in tenths of a second.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Fix handling of "conn" mount_nfs(8) option.

Reviewed by:	rmacklem@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Make it clear that ACL flags are NFSv4-only.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Update acl(3) to expand on NFSv4 ACL support.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Fix mbuf leak in IPv6 multicast code.
When multicast capable interface goes away, it leaves multicast groups,
this leads to generate MLD reports, but MLD code does deffered send and
MLD reports are queued in the in6_multi's in6m_scq ifq. The problem is
that in6_multi structures are freed when interface leaves multicast groups
and thread that does deffered send will not take these queued packets.

PR:		194577
MFC after:	1 week
Sponsored by:	Yandex LLC
Add two new functions to the AGP driver KPI to bind/unbind arbitrary sets
of pages into the GTT.

Reviewed by:	kib
MFC after:	1 month
Move ifq drain into in6m_purge().

Suggested by:	bms
MFC after:	1 week
Sponsored by:	Yandex LLC
Remove redundant code.
if_detach already did these steps. Also, now we didn't keep routes to link-local
addresses.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
Remove two functions unused after r273848.  Would be nice if clang
or at least scan-build yelled about it.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Port the TTM AGP backend to the FreeBSD agp driver and enable AGP support
in the radeonkms driver.

Note: In PCI mode virtual addresses on the graphics card that map to system
RAM are translated to physical addresses by the graphics card itself.   In
AGP mode address translation is done by the AGP chipset so fictitious
addresses appear on the system bus.  For the CPU cache management to work
correctly when the CPU accesses this memory it needs to use the same
fictitious addresses (and let the chipset translate them) instead of using
the physical addresses directly.

Reviewed by:	kib
MFC after:	1 month