MFC 273644,273738:
Clarify that pthread_cleanup_push()/pop() are implemented as macros that
create a new code block and thus must be balanced at the same lexical
scope.  (This is also a requirement in POSIX.)

PR:		194280
Submitted by:	dr2867.business@pacbell.net


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273996 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 273834:
Rework the EXAMPLES section to be a bit clearer.
- Add an example of using etcupdate diff.
- Create a subsection on bootstrapping that is below the simple
  examples.  This should make it clearer that 'etcupdate extract' is
  a one-time operation and not part of the common workflow.  It also
  adds more suggestions on when bootstrapping is needed and additional
  steps to make future merges simpler.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC 273598 273602 273607 273613 273647:

    Userland HPET support.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274001 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273711:
Allocate buffer for READ BUFFER/WRITE BUFFER commands on demand.

These commands are rare, but consume additional 256KB RAM per LUN.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274002 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273730, r273731:
Reduce code duplication around Write Exclusive persistent reservation.

While there, allow some more commands to pass persistent reservation.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273809:
Implement better handling for ENOSPC error for both CTL and CAM.

This makes VMWare VAAI Thin Provisioning Stun primitive activate, pausing
the virtual machine, when backing storage (ZFS pool) is getting overflowed.


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

  Add missing library dependencies.


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

  Remove duplicate prog.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274013 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273737, 273739

Clarify the documentation of pmcstat:
the -d argument should be passed before -p, -s, -P or -S to be taken in account

Differential Revision:	https://reviews.freebsd.org/D1011
Reviewed by:	adrian, gnn


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

  - Cleanups pc98 code.
  - Remove unworked formats.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274024 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273727:
Original commit message was
Allow the vfs.nfsd knobs to be set from loader.conf (or using
kenv(8)).  This is useful when nfsd is loaded as module.

As I understand, automatic fetch from kenv does not work in stable/10.
Merge the change still, to reduce code difference.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273728:
Add a method to iicbus to request IIC_M_NOSTOP behaviour for multibyte
transfers to be default.


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

  Drop the 3rd clause from all 3 clause BSD licenses.


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

  Supress clang warning for FreeBSD printf %b and %D formats.


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

  Switch from lib/libstand to sys/boot/libstand32.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r272258
  - Cosmetic changes.
  - Reduce diffs against i386.

MFC: 272259
  MFi386: Enable QUOTA, PRINTF_BUFR_SIZE and puc.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274037 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r268475 (by imp)

  Make SERIAL support optional again. Enable it for i386 because a huge
  percentage of machines has a 16550. Disable it for pc98 since only a
  tiny fraction of them have one.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274041 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r268474 and r268476 (by imp)
  - Merge the clang support from i386.
  - Compile boot2 with clang on pc98.

MFC: r272250 (by nyan)
  - Reduce diffs against i386.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274042 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r271946 and r272595:
Improve transmit sending offload, TSO, algorithm in general. This
change allows all HCAs from Mellanox Technologies to function properly
when TSO is enabled. See r271946 and r272595 for more details about
this commit.

Sponsored by:	Mellanox Technologies


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@274043 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: 272445,272578,273772,273779,273782,273786,273787,273791

Add a test for bug 191427 where pw(8) will go into an infinite loop
Add some tests for modifying groups
When a group is renamed then the group has been invalidated for sure.
In that case get the group information using the new name.

Fix a regression in pw usermod -G list

The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.

Do not delete the group wheel when bad argument is passed to pw groupdel -g

Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel

Ensure pw userdel -u <invalid> do not try to remove root

Check the uid passed is actually a number as early as possible

Fix renaming a group via the gr_copy function

Add a regression test to pw(8) because the bug was discovered via using:
pw groupmod

PR:		193704 [1], 185666 [2], 90114 [3], 187189 [4]
Submitted by:	Marc de la Gueronniere [4]
Reported by:	az [1], sub.mesa@gmail.com [2], bkoenig@cs.tu-berlin.de [3],
		mcdouga9@egr.msu.edu [4]


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