MFC: r255937

Implement GET_STACK_USAGE.
Discussed with:	mav


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260065 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r254293, r259868, r259881, 259955:

r254293:
  - Only set ARCH_FLAGS (TARGET/TARGET_ARCH) if specified,
    otherwise allow the toolchain to detect the correct values.

  - Remove {SRC,DOC,PORT}REVISION variables, and use
    'branch@rNNNNNN' as the {SRC,DOC,PORT}BRANCH variables.

  - Only set default KERNEL_FLAGS and WORLD_FLAGS make(1) jobs
    if the number of CPUs is greater than 1.

r259868 (jmmv):
  Delay copying of resolv.conf into the chroot until /etc
  exists.

r259881 (jmmv):
  Put the release objdir inside the chroot.

259955:
  Move build_doc_ports() to the if...fi block from which it is
  called.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260072 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC	r259005, r259092:

gcc: Add -flax-vector-conversions
gcc: new fvisibility-ms-compat option

These are useful for compatibility with newwer gcc and clang.

Obtained from:	gcc 4.3 (rev. 120572, 120688, 126088; GPLv2)


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260075 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r259951:
Do not coalesce stack entry. Pass MAP_STACK_GROWS_DOWN and
MAP_STACK_GROWS_UP flags to vm_map_insert() from vm_map_stack()


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r257532 (by adrian):

Fix this build for clang.

MFC r259730:

To avoid having to explicitly test COMPILER_TYPE for setting
clang-specific or gcc-specific flags, introduce the following new
variables for use in Makefiles:

CFLAGS.clang
CFLAGS.gcc
CXXFLAGS.clang
CXXFLAGS.gcc

In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for
the right compiler.

MFC r259913:

For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.

MFC r259927:

Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's
Makefile.

Pointy hat to:	dim


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

In sys/dev/drm/mach64_dma.c, remove static function mach64_set_dma_eol(),
which has never been used, even by upstream, since its initial upstream
commit (see http://cgit.freedesktop.org/mesa/drm/commit/?id=873e1c4d )


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260100 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revert r259862:
  Don't try to bootstrap a utility that does not exist in the branch.

Pointyhat:	 gjb
Submitted by:	 John W. O'Brien (via -stable@)
Sponsored by:	The FreeBSD Foundation


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

Update firmware for run(4) to version 0.33.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260119 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r260125:
  Bump copyright year.
  Happy New Year 2014!

Sponsored by:	The FreeBSD Foundation


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

Rename run(4) firmware file from runfw to run.fw. Previous name was the
same as top-level target name for "device runfw" kernel option and
caused cyclic dependancy that lead to kernel build breakage

Module change is not strictly required and done for name unification sake

PR:	conf/175751
Submitted by:	Issei <i10a at herbmint.jp>


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260134 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Bump __FreeBSD_version for MFC of r259951 - don't coalesce map entries
for vm_map_stack().


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260136 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC	r259525, r259526, r259529

gcc: small merges from upstream

fix ICE in rs6000 when using -fno-trapping-math.
Solves GCC-PR target/30485

Solve GCC issues:
PR middle-end/32602
PR middle-end/32603

Updates the to documentation and processing improvement.

Obtained from:	gcc 4.3 (rev. 120902, 120902, 119427, 126278, 126422;
		GPLv2)


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260140 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r259084
For software builds, the NFS client does many small
synchronous (with FILE_SYNC) writes because non-contiguous
byte ranges in the same buffer cache block are being
written. This patch adds a new mount option "noncontigwr"
which allows the non-contiguous byte ranges to be combined,
with the dirty byte range becoming the superset of the bytes
that are dirty, if the file has not been file locked.
This reduces the number of writes significantly for software
builds. The only case where this change might break existing
applications is where an application is writing
non-overlapping byte ranges within the same buffer cache block
of a file from multiple clients concurrently.
Since such an application would normally do file locking on
the file, avoiding the byte range merge for files that have
been file locked should be sufficient for most (maybe all?) cases.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r259089
Document the noncontigwr NFS mount option.
This is a content change.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r259801
The NFSv4 client was passing both the p and cred arguments to
nfsv4_fillattr() as NULLs for the Getattr callback. This caused
nfsv4_fillattr() to not fill in the Change attribute for the reply.
I believe this was a violation of the RFC, but had little effect on
server behaviour. This patch passes a non-NULL p argument to fix this.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r259845
An intermittent problem with NFSv4 exporting of ZFS snapshots was
reported to the freebsd-fs mailing list. I believe the problem was
caused by the Readdir operation using VFS_VGET() for a snapshot file entry
instead of VOP_LOOKUP(). This would not occur for NFSv3, since it
will do a VFS_VGET() of "." which fails with ENOTSUPP at the beginning
of the directory, whereas NFSv4 does not check "." or "..". This
patch adds a call to VFS_VGET() for the directory being read to check
for ENOTSUPP.
I also observed that the mount_on_fileid and fsid attributes were
not correct at the snapshot's auto mountpoints when looking at packet
traces for the Readdir. This patch fixes the attributes by doing a check
for different v_mount structure, even if the vnode v_mountedhere is not
set.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260173 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r259854
The NFSv4 server would call VOP_SETATTR() with a shared locked vnode
when a Getattr for a file is done by a client other than the one that
holds the file's delegation. This would only happen when delegations
are enabled and the problem is fixed by this patch.


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

 Do not truncate the ``command'' column in ``ps'' output.


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

 The compile time constant limit on number of swap devices was removed in 5.2.
 As such, remove the EINVAL error saying so.  Currently the vm.nswapdev sysctl
 just represents the number of added swap devices.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/9@260199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r259906: Draft-ietf-tcpm-initcwnd-05 became RFC6928.


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