MFC r274040 and r274084.  The result is removal of agp_intel.c from
the static amd64 kernel when agp is configured.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274023:
When other end of the pipe closed during the write, but some bytes
were written, return short write instead of EPIPE.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274609 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274343:
When sleeping waiting for the profiling stop, always set P_STOPPROF
before dropping process lock.  Clear P_STOPPROF when doing wakeup.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274351:

cxgbe(4): adjust PMRX and PMTX parameters.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273360:

One of MAP_ANON, MAP_PRIVATE, MAP_SHARED, or MAP_STACK must be specified.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272701: make userland __assfail from opensolaris compat honor 'aok' variable


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274623 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272708: l2arc_write_buffers: reduce headroom value


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274625 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274410: Fix for behaviour of SEEK_DATA on ZFS.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274634 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 273866

Plug memory ordering holes in buf_ring_enqueue. For at least some
users this patch eliminates the races previously discussed on the
mailing list.

Submitted by:   oleg
Reviewed by:    kmacy
MFC after:      2 weeks
Tested by:      kmacy,rpaulo


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274646 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge the fueword(9) and casueword(9).  In particular,

MFC r273783:
Add fueword(9) and casueword(9) functions.
MFC note: ia64 is handled like arm, with NO_FUEWORD define.

MFC r273784:
Replace some calls to fuword() by fueword() with proper error checking.

MFC r273785:
Convert kern_umtx.c to use fueword() and casueword().
MFC note: the sys__umtx_lock and sys__umtx_unlock syscalls are not
converted, they are removed from HEAD, and not used.  The do_sem2*()
family is not yet merged to stable/10, corresponding chunk will be
merged after do_sem2* are committed.

MFC r273788 (by jkim):
Actually install casuword(9) to fix build.

MFC r273911:
Add type qualifier volatile to the base (userspace) address argument
of fuword(9) and suword(9).


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274377:
On 965 and higher, map GTT as write-combining.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274649 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274378:
Attach agp_i810 to non-VGA display class.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274650 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274379:
Initial attachment of the agp(4) to Haswell IGP.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
﻿MFC r274442:

Pull in r221709 from upstream llvm trunk (by Frédéric Riss):

  Totally forget deallocated SDNodes in SDDbgInfo.

  What would happen before that commit is that the SDDbgValues associated with
  a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep
  a map entry keyed by the SDNode pointer pointing to this list of invalidated
  SDDbgNodes. As the memory gets reused, the list might get wrongly associated
  with another new SDNode. As the SDDbgValues are cloned when they are transfered,
  this can lead to an exponential number of SDDbgValues being produced during
  DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893

  Note that the previous behavior wasn't really buggy as the invalidation made
  sure that the SDDbgValues won't be used. This commit can be considered a
  memory optimization and as such is really hard to validate in a unit-test.

This should fix abnormally large memory usage and resulting OOM crashes
when compiling certain ports with debug information.

Reported by:	Dmitry Marakasov <amdmi3@amdmi3.ru>
Upstream PRs:	http://llvm.org/PR19031 http://llvm.org/PR20893

MFC r274483:

The fix imported into llvm in r274442 contains some C++11 constructs,
which gcc in base cannot handle.  Replace these with C++98 equivalents.

While here, add the patch for the adapted fix.

Reported by:	bz, kib
Pointy hat to:	dim


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274227:
Add new USB IDs.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274699 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274435:
Decode more fields when dumping USB descriptors.
- Some minor style changes while at it.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274702 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274376:
Fix some minor TSO issues:
- Improve description of TSO limits.
- Remove a not needed KASSERT()
- Remove some not needed variable casts.

Sponsored by:	Mellanox Technologies


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274438:
For posix_fallocate(2) and posix_fadvise(2), return ESPIPE
when underlying file does not have DFLAG_SEEKABLE set. For
posix_fallocate(2), simplify error handling logic.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274706 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274477: Fix check for vendor-specific peripheral qualifier.

Submitted by:	anton.rang@isilon.com


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274154, r274163:
Add to CTL support for logical block provisioning threshold notifications.

For ZVOL-backed LUNs this allows to inform initiators if storage's used or
available spaces get above/below the configured thresholds.

Sponsored by:	iXsystems, Inc.


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