Move some virtual memory constants to the top of the file where they are on
other architectures [1].

While here:
 - Remove an unused and commented out include.
 - Add a comment describing the file that other copies have.
 - Fix the style of the defines and add a comment on what each one is.

Suggested by:	[1] alc


git-svn-id: svn://svn.freebsd.org/base/head@247610 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix nandfs support by providing the same crc32 function as is used
in newfs_nandfs. In libstand we get crc32 from libz. The polynomial
is not the same as used for nandfs, which is the crc32 used in the
kernel.


git-svn-id: svn://svn.freebsd.org/base/head@247611 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix warnings (control reaches end of non-void function).


git-svn-id: svn://svn.freebsd.org/base/head@247612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make this WARNS=9 clean on i386 w/ clang.


git-svn-id: svn://svn.freebsd.org/base/head@247613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
mdoc: remove superfluous paragraph macro.


git-svn-id: svn://svn.freebsd.org/base/head@247614 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Disable the ctl driver in GENERIC.

It unfortunately steals a fair chunk of RAM at startup even if it's not
actively used, which prevents FreeBSD VMs of 128MB from successfully
booting and running.


git-svn-id: svn://svn.freebsd.org/base/head@247615 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
If the target file already exists, check for the CAP_UNLINKAT capabiity right
on the target directory descriptor, but only if this is renameat(2) and real
target directory descriptor is given (not AT_FDCWD). Without this fix regular
rename(2) fails if the target file already exists.

Reported by:	Michael Butler <imb@protected-networks.net>
Reported by:	Larry Rosenman <ler@lerctr.org>
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn://svn.freebsd.org/base/head@247617 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
nullfs: Improve f_flags in statfs().

Include some flags of the nullfs mount itself:
MNT_RDONLY, MNT_NOEXEC, MNT_NOSUID, MNT_UNION, MNT_NOSYMFOLLOW.

This allows userland code calling statfs() or fstatfs() to see these flags.
In particular, this allows opendir() to detect that a -t nullfs -o union
mount needs deduplication (otherwise at least . and .. are returned twice)
and allows rtld to detect a -t nullfs -o noexec mount as noexec.

Turn off the MNT_ROOTFS flag from the underlying filesystem because the
nullfs mount is definitely not the root filesystem.

Reviewed by:	kib
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@247619 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revert the part of r247600 which turned the overtemperature and power fail
interrupt shutdown handlers into filters. Shutdown_nice(9) acquires a sleep
lock, which filters shouldn't do. It also seems that kern_reboot(9) still
may require Giant to be hold.

Submitted by:	bde


git-svn-id: svn://svn.freebsd.org/base/head@247620 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Revert the part of r247601 which turned the overtemperature and power fail
  interrupt shutdown handlers into filters. Shutdown_nice(9) acquires a sleep
  lock, which filters shouldn't do. It also seems that kern_reboot(9) still
  may require Giant to be hold.
- Correct an incorrect argument to shutdown_nice(9).

Submitted by:	bde


git-svn-id: svn://svn.freebsd.org/base/head@247621 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge from vmc-playground branch:
Rename the pv_entry_t iterator from pv_list to pv_next.
Besides being more correct technically (as the name seems to suggest
this is a list while it is an iterator), it will also be needed by
vm_radix work to avoid a nameclash on macro expansions.

Sponsored by:	EMC / Isilon storage division
Reviewed by:	alc, jeff
Tested by:	flo, pho, jhb, davide


git-svn-id: svn://svn.freebsd.org/base/head@247622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix callout expiring dynamic rules.

PR:		kern/175530
Submitted by:	Vladimir Spiridenkov <vs@gtn.ru>
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@247626 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Garbage collect HPFS bits which are now already completely disconnected
from the tree since few months (please note that the userland bits
were already disconnected since a long time, thus there is no need
to update the OLD* entries).

This is not targeted for MFC.


git-svn-id: svn://svn.freebsd.org/base/head@247628 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Garbage collect XFS bits which are now already completely disconnected
from the tree since few months.

This is not targeted for MFC.


git-svn-id: svn://svn.freebsd.org/base/head@247631 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Complete r231621 by also blacklisting the bridge used by VMware for PCIe
  devices. While at it, update the comment now that we know that MSI-X
  doesn't work with ESXi 5.1 for Intel 82576 either and the underlying issue
  is a bug in the MSI-X allocation code of the hypervisor.
  Reported by: Harald Schmalzbauer
- Make the nomatch table const.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@247632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Garbage collect CODAFS bits which are now completely disconnected from
the tree since few months.

This patch is not targeted for MFC.


git-svn-id: svn://svn.freebsd.org/base/head@247635 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Garbage collect PORTALFS bits which are now completely disconnected from
the tree since few months.

This patch is not targeted for MFC.


git-svn-id: svn://svn.freebsd.org/base/head@247640 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The value held by the vm object's field pg_color is only considered
valid if the flag OBJ_COLORED is set.  Since _vm_object_allocate()
doesn't set this flag, it needn't initialize pg_color.

Sponsored by:	EMC / Isilon Storage Division


git-svn-id: svn://svn.freebsd.org/base/head@247659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Comment cosmetics: capitalize SCSI
Fix some hard tabs in the wrong place.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@247660 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove ntfs headers dependency for g_label_ntfs.c by redefining the
used structs and values.

This patch is not targeted for MFC.


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