WARNS=3 and style fixes.  No functionality change.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The U-Boot README says fdt_addr_r is the right env var for fdt data
loaded into ram, but vendors also use fdtaddr and fdt_addr.  Check the
recommended variable first and fall back to the others.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273298 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a typo.

Spotted by:	O. Hartmann


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use copyout() directly instead of updating various fields
before/after each sooptcopyout() call.

Found by:	luigi
Sponsored by:	Yandex LLC


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273327 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add another PCI ID for JMB368 PATA controller.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273328 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add another wakeup() after actually set the bus as free.

This fix a race where the threads waiting for the bus would wake up early
and still see bus as busy.

While here, give a better description to wmesg for the two use cases we
have (bus and io waiting).

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273329 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
vt(4): Refuse to load a font if hw.vga.textmode is selected

Before, the font was loaded and the window size recalculated, giving an
unusable terminal, even if the actual font didn't change.

Reported by:	beeessdee@ruggedinbox.com
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273330 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add vxlan interface

vxlan creates a virtual LAN by encapsulating the inner Ethernet frame in
a UDP packet. This implementation is based on RFC7348.

Currently, the IPv6 support is not fully compliant with the specification:
we should be able to receive UPDv6 packets with a zero checksum, but we
need to support RFC6935 first. Patches for this should come soon.

Encapsulation protocols such as vxlan emphasize the need for the FreeBSD
network stack to support batching, GRO, and GSO. Each frame has to make
two trips through the network stack, and each frame will be at most MTU
sized. Performance suffers accordingly.

Some latest generation NICs have begun to support vxlan HW offloads that
we should also take advantage of. VIMAGE support should also be added soon.

Differential Revision:	https://reviews.freebsd.org/D384
Reviewed by:	gnn
Relnotes:	yes


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273331 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add vtfontcvt(8) cross-reference to vt(4) man page

Reported by:	beeessdee@ruggedinbox.com
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273332 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Mac OS X 10.10 added.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273333 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fully support constructors for the purpose of code coverage analysis.
This involves:
1.  Have the loader pass the start and size of the .ctors section to the
    kernel in 2 new metadata elements.
2.  Have the linker backends look for and record the start and size of
    the .ctors section in dynamically loaded modules.
3.  Have the linker backends call the constructors as part of the final
    work of initializing preloaded or dynamically loaded modules.

Note that LLVM appends the priority of the constructors to the name of
the .ctors section. Not so when compiling with GCC. The code currently
works for GCC and not for LLVM.

Submitted by:	Dmitry Mikulin <dmitrym@juniper.net>
Obtained from:	Juniper Networks, Inc.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
unionfs: hold mount interlock while manipulating mnt_flag

This is for consistency with other filesystems.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Provide vfs suspension support only for filesystems which need it, take
two.

nullfs and unionfs need to request suspension if underlying filesystem(s)
use it. Utilize mnt_kern_flag for this purpose.

This is a fixup for 273271.

No strong objections from: kib
Pointy hat to: mjg
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273336 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the mtx_sleep() error checking, catch all errors and not only
EWOULDBLOCK.

Do not print any message at errors.  The errors are properly sent to upper
layers which should be able to deal with it, including printing the errors
when they need to.

The error message was quite annoying while scanning the i2c bus.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge from projects/bhyve_svm all the changes outside vmm.ko or bhyve utilities:

Add support for AMD's nested page tables in pmap.c:
- Provide the correct bit mask for various bit fields in a PTE (e.g. valid bit)
  for a pmap of type PT_RVI.
- Add a function 'pmap_type_guest(pmap)' that returns TRUE if the pmap is of
  type PT_EPT or PT_RVI.

Add CPU_SET_ATOMIC_ACQ(num, cpuset):
This is used when activating a vcpu in the nested pmap. Using the 'acquire'
variant guarantees that the load of the 'pm_eptgen' will happen only after
the vcpu is activated in 'pm_active'.

Add defines for various AMD-specific MSRs.

Submitted by:	Anish Gupta (akgupt3@gmail.com)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a typo from r189544, which replaced unp_global_rwlock with unp_list_lock
and unp_link_rwlock.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
filedesc: plug 2 write-only variables

Reported by: Coverity
CID: 1245745, 1245746


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Plug unnecessary binvp NULL initialization and test.

Reported by: Coverity
CID: 1018889


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273351 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The imx6 hardware is fast enough to make good use of however much
timecounter resolution is available, so ask for a 1 GHz frequency.  It
won't actually get one that fast, but that'll get the fastest available
clock and use a divisor of 1 (probably 132 or 66mhz on current hardware).


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Attach the imx6 CCM driver during BUS_PASS_CPU.  It controls the clocks
for most on-chip devices and needs to be available before other drivers
start attaching and asking to have their clocks enabled.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273353 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f