Return false status only when adding a route is failed.  It could
erroneously return false due to an afexists() check loop in routing_start().
vt(4): Change vb_history_size from "int" to "unsigned int"

CID:		1230002, 1230003
MFC after:	1 week
vt(4): Indicate that KDSETRAD case falls through the next case

CID:		1229953
MFC after:	1 week
Add function and wrapper to switch lockmgr and vnode lock back to
auto-promotion of shared to exclusive.

Tested by:	hrs, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Direct access to the quota files, in particular, lookup, causes lock
conflict with the quota metadata access.  Mark quota vnode lock as
recursive and always exclusive to avoid the problem.

Reported by:	hrs
Tested by:	hrs, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
IFUNC symbol type shall be processed for non-PLT relocations,
e.g. when a global variable is initialized with a pointer to ifunc.
Add symbol type check and call resolver for STT_GNU_IFUNC symbol types
when processing non-PLT relocations, but only after non-IFUNC
relocations are done.  The two-phase proceessing is required since
resolvers may reference other symbols, which must be ready to use when
resolver calls are done.

Restructure reloc_non_plt() on x86 to call find_symdef() and handle
IFUNC in single place.

For non-x86 reloc_non_plt(), check for call for IFUNC relocation and
do nothing, to avoid processing relocs twice.

PR:	193048
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
First try on fixing some more compile errors without actually testing:
- use proper __FreeBSD_version check and more importantly check for __am64__
  to be defined.  Whether the FreeBSD(_version) checks are needed is a
  different question.
- cast uint64_t to uintmax_t and use %jx for printing.

Note: there are more values that could be printed in that status function
	but leave that for the future;  printf doesn't seem to be the right
	way to do it anyway.
Note: there is more breakage related to i40e_allocate_dma*() having
	conflicting declarations, so more fixes to come.

PR:		193112
MFC after:	3 days
X-MFC with:	r270755
Optimize r270798, only do the second pass over non-plt relocations
when the first pass found IFUNCs.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Document the whole settings needed to build a debug version of rtld.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Properly handle prefetch only for amd64 and i386 as we do elsewhere.

In general theraven is right that we should factr this out and provide
a general and per-arch implementation that everything can use.

MFC after:	3 days
X-MFC with:	r270755
Properly place #ifdef INET and #ifdef INET6 around variable declarations
and code to make the code compile.

Give the function seems to be slightly mixed with csum and tso,
make it non-fatal if we try to setup thing on a kernel without IP
support.  In practise the printf on the console will probably still
make your machine unhappy.

MFC after:	3 days
X-MFC with:	r270755
These functions are #defined to "osdep" specific names without the "_mem"
extension.  Provide prototypes for the actual implementations.
Correct function arguments to match the implementations.

MFC after:	3 days
X-MFC with:	r270755
Try to also unbreak powerpc complaining about
"cast from pointer to integer of different size".

MFC after:	3 days
X-MFC with:	r270755
Forward declare struct kiocb, which is only used for an unsued function
argument but not actually defined anywhere.

This fixes the compile complaining about
"declaration of 'struct kiocb' will not be visible outside of this function".

MFC after:	2 weeks
X-MFC with:	whatever changed caused the breakage ;-)
* Add SIOCGI2C driver ioctl used to retrieve i2c info.
* Convert ixgbe to use this ioctl
* Convert ifconfig to use generic i2c handler for  "ix" interfaces.

Approved by:	Eric Joyner (ixgbe part)
MFC after:	2 weeks
Sponsored by:	Yandex LLC
Use a unit number allocator to provide suitable st_dev and st_ino values
for POSIX shared memory descriptors.  The implementation is similar to
that used for pipes.

MFC after:	1 week
Add the new shm_ino field to struct shmfd.  Missed in 270823.

Reported by:	peter
Pointy hat to:	jhb
MFamd64: Add a machdep.bootmethod sysctl to inform the installer which
firmware method was used for booting.  This is hardcoded to BIOS on i386.

PR:		192962
Reviewed by:	nwhitehorn
MFC after:	1 week
Fix a typo.
- Add a new structure type for the ACPI 3.0 SMAP entry that includes the
  optional attributes field.
- Add a 'machdep.smap' sysctl that exports the SMAP table of the running
  system as an array of the ACPI 3.0 structure.  (On older systems, the
  attributes are given a value of zero.)  Note that the sysctl only
  exports the SMAP table if it is available via the metadata passed from
  the loader to the kernel.  If an SMAP is not available, an empty array
  is returned.
- Add a format handler for the ACPI 3.0 SMAP structure to the sysctl(8)
  binary to format the SMAP structures in a readable format similar to
  the format found in boot messages.

MFC after:	2 weeks