Remove unused VM_MAX_AUTOTUNE_NMBCLUSTERS define.


git-svn-id: svn://svn.freebsd.org/base/head@246207 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
uma_zone_set_max() directly returns the rounded effective zone
limit.  Use the return value directly instead of doing a second
uma_zone_set_max() step.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Change old-style function definition


git-svn-id: svn://svn.freebsd.org/base/head@246209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add placeholder constants to reserve a portion of the socket option
name space for use by downstream vendors to add custom options.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@246210 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The change to reduce default smp_tsc_shift caused tsc shift to become
zero on slower machines, which make the fenced get_timecount methods
not used despite needed.  Remove the (shift > 0) condition when
selecting the get_timecount() implementation.

Rename smp_tsc_shift to tsc_shift, and apply it for the UP case too.
Allow shift to reach value of 31 instead of 30, as it was previously
(should be nop).

Reorganize the tc quality calculation to remove the conditionally
compiled block.  Rename test_smp_tsc() to test_tsc() and provide
separate versions for SMP and UP builds.  The check for virtialized
hardware is more natural to perform in the smp version of the
test_tsc(), since it is only done for smp case.

Noted and reviewed by:	bde (previous version)
MFC after:	12 days


git-svn-id: svn://svn.freebsd.org/base/head@246212 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Assert that the mbuf in the chain has sane length.  Proper place for
this check is somewhere in the network code, but this assertion
already proven to be useful in catching what seems to be driver bugs
causing NFS scrambling random memory.

Discussed with:	rmacklem
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246213 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for MSI-X interrupts in the virtio block device and make that
the default.

The current behavior of advertising a single MSI vector can be requested by
setting the environment variable "BHYVE_USE_MSI" to "yes". The use of MSI
is not compliant with the virtio specification and will be eventually phased
out.

Submitted by:	Gopakumar T
Obtained from:	NetApp


git-svn-id: svn://svn.freebsd.org/base/head@246214 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a backwards comment in markvoldirty().

Submitted by:	bde
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246215 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The mountmsdosfs() function had an insane sanity test, remove it.

Trying FAT32 on a small partition failed to mount because
pmp->pm_Sectors was nonzero.  Normally, FAT32 file systems are so
large that the 16-bit pm_Sectors can't hold the size.  This is
indicated by setting it to 0 and using only pm_HugeSectors.  But at
least old versions of newfs_msdos use the 16-bit field if possible,
and msdosfs supports this except for breaking its own support in the
sanity check.  This is quite different from the handling of pm_FATsecs
-- now the 16-bit value is always ignored for FAT32 except for
checking that it is 0, and newfs_msdos doesn't use the 16-bit value
for FAT32.

Submitted by:	bde
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The directory entry for dotdot was corrupted in the FAT32 case when moving
a directory to a subdir of the root directory from somewhere else.

For all directory moves that change the parent directory, the dotdot
entry must be fixed up.  For msdosfs, the root directory is magic for
non-FAT32.  It is less magic for FAT32, but needs the same magic for
the dotdot fixup.  It didn't have it.

Both chkdsk and fsck_msdosfs fix the corrupt directory entries with no
problems.

The fix is to use the same magic for dotdot in msdosfs_rename() as in
msdosfs_mkdir().

For msdosfs_mkdir(), document the magic. When writing the dotdot entry
in mkdir, use explicitly set pcl variable instead on relying on the
start cluster of the root directory typically has a value < 65536.

Submitted by:	bde
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246217 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Backup FATs were sometimes marked dirty by copying their first block
from the primary FAT, and then they were not marked clean on unmount.
Force marking them clean when appropriate.

Submitted by:	bde
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246218 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The MSDOSFSMNT_WAITONFAT flag is bogus and broken.  It does less than
track the MNT_SYNCHRONOUS flag.  It is set to the latter at mount time
but not updated by MNT_UPDATE.

Use MNT_SYNCHRONOUS to decide to write the FAT updates syncrhonously.

Submitted by:	bde
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246219 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Display MSI-X table and PBA offsets when displaying information about MSI-X
capability.

Reviewed by:	jhb, jimharris (initial version)


git-svn-id: svn://svn.freebsd.org/base/head@246221 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove support for plip from the GENERIC kernel as no systems in the
last 10 years require this support.

Discussed with:	db
Discussed with:	kib
Reviewed by:	imp
Reviewed by:	jhb
Reviewed by:	-hackers
Approved by:	cperciva (mentor)


git-svn-id: svn://svn.freebsd.org/base/head@246222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge bmake-20130123

Approved by:	marcel (mentor)


git-svn-id: svn://svn.freebsd.org/base/head@246223 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Wrap this in an #ifdef so IEEE80211_SUPPORT_SUPERG will work correctly
in a wlan.ko module.


git-svn-id: svn://svn.freebsd.org/base/head@246226 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Allow IEEE80211_SUPPORT_SUPERG to be defined _and_ have a working wlan
module.


git-svn-id: svn://svn.freebsd.org/base/head@246227 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Tweaks to standard BEAGLEBONE config, as recently discussed
on FreeBSD-ARM.


git-svn-id: svn://svn.freebsd.org/base/head@246228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix an obvious typo that broke time specifications of the form
"2 hours ago".


git-svn-id: svn://svn.freebsd.org/base/head@246229 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
zfs: add MODULE_VERSION for zfsctrl

This should allow the kernel linker to easily detect a situation
when the module is present both in a kernel and in a preloaded file
(zfs.ko).

Reviewed by:	jhb
MFC after:	5 days


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