Use the size of the MACHINE_ARCH string instead of sizeof(uint32_t). It can
happen sizeof(MACHINE_ARCH) is more than 4 bytes, and bad things would
happen. This should make the ctors being called again on armeb.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
With r247602, the "c" flag is no longer printed as a file descriptor flag.

Reviewed by:	pjd
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257234 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove an incorrect debug printf.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Quiesce warning -Wmissing-variable-declarations from buildworld, which is
slightly unnerving.

In file included from ioctl.c:48:
/var/tmp/home/sbruno/bsd/head/tmp/usr/include/dev/lmc/if_lmc.h:939:13:
warning: no previous extern declaration for non-static variable 'ssi_cables'
[-Wmissing-variable-declarations]
const char *ssi_cables[] =


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Correct ld(1) manual page for --no-add-needed set as default after r253839

Approved by:	dim
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Run mvs SATA driver on Armada XP instead of old mv_sata

The mvs driver seems to be more functional than mv_sata and is not
causing random interrupt storms during boot.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257240 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Include necessary headers that now are available due to pollution
via if_var.h.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Instead of putting ifnet declaration into eventhandler.h, move
bpf(4) and vlan(4) related event declarations to bpf.h and
if_vlan_var.h. To avoid dependency on eventhandler.h, protect
these declarations with ifdef SYS_EVENTHANDLER_H.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Make the prophecy from 1997 happen and remove if_var.h inclusion
  from if.h.
- Remove unnecessary includes and declarations from if.h
- Remove unnecessary includes and declarations from if_var.h [1]
- Mark some declarations that are about to be removed in near
  future with comments, explaning why this declaration is still
  necessary.
- Protect eventhandler declarations with #ifdef SYS_EVENTHANDLER_H.

Obtained from:	bdeBSD [1]
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257244 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Fix VIMAGE build.
- Fix build with gcc.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257246 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the build with gcc.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257248 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Axe ng_fec(4). It has never been a real netgraph(4) module, since
it had no hooks. It has abused ifnet's if_afdata slot and actually
abused every subsystem it touched.

lagg(4) is a proper trunking solution at ifnet(9) layer.

ng_one2many(4) is a proper trunking solution in netgraph(4).


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257249 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
ng_fec(4) removed.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Import the driver for VT-d DMAR hardware, as specified in the revision
1.3 of Intelб╝ Virtualization Technology for Directed I/O Architecture
Specification.  The Extended Context and PASIDs from the rev. 2.2 are
not supported, but I am not aware of any released hardware which
implements them.  Code does not use queued invalidation, see comments
for the reason, and does not provide interrupt remapping services.

Code implements the management of the guest address space per domain
and allows to establish and tear down arbitrary mappings, but not
partial unmapping.  The superpages are created as needed, but not
promoted.  Faults are recorded, fault records could be obtained
programmatically, and printed on the console.

Implement the busdma(9) using DMARs.  This busdma backend avoids
bouncing and provides security against misbehaving hardware and driver
bad programming, preventing leaks and corruption of the memory by wild
DMA accesses.

By default, the implementation is compiled into amd64 GENERIC kernel
but disabled; to enable, set hw.dmar.enable=1 loader tunable.  Code is
written to work on i386, but testing there was low priority, and
driver is not enabled in GENERIC.  Even with the DMAR turned on,
individual devices could be directed to use the bounce busdma with the
hw.busdma.pci<domain>:<bus>:<device>:<function>.bounce=1 tunable.  If
DMARs are capable of the pass-through translations, it is used,
otherwise, an identity-mapping page table is constructed.

The driver was tested on Xeon 5400/5500 chipset legacy machine,
Haswell desktop and E5 SandyBridge dual-socket boxes, with ahci(4),
ata(4), bce(4), ehci(4), mfi(4), uhci(4), xhci(4) devices.  It also
works with em(4) and igb(4), but there some fixes are needed for
drivers, which are not committed yet.  Intel GPUs do not work with
DMAR (yet).

Many thanks to John Baldwin, who explained me the newbus integration;
Peter Holm, who did all testing and helped me to discover and
understand several incredible bugs; and to Jim Harris for the access
to the EDS and BWG and for listening when I have to explain my
findings to somebody.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257251 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove ng_fec(4).


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove ng_fec(4).


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix build. We need to include systm.h before if_var.h.

Pointy hat to:	glebius


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove ng_fec(4).


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Sweep up a bit of arm-land fallout after r257244; include necessary
headers directly that are no longer available via accidental include.


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

Submitted by:	Dmitry Luhtionov <dmitryluhtionov gmail.com>


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