Implement a very basic multi-PHY aware switch device.

This is intended to be used as a stop-gap for switch devices
which expose multiple ethernet PHYs but we don't have a driver
for - here, etherswitchcfg and the general switch configuration
API can be used to interface to said PHYs.

Submitted by:	Luiz Otavio O Souza <loos.br@gmail.com>


git-svn-id: svn://svn.freebsd.org/base/head@249651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix -Wmissing-variable-declarations compiler warnings.

References:
https://www.illumos.org/issues/3700


git-svn-id: svn://svn.freebsd.org/base/head@249656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add the Clang specific -Wmissing-variable-declarations to WARNS=6.

This compiler flag enforces that that people either mark variables
static or use an external declarations for the variable, similar to how
-Wmissing-prototypes works for functions.

Due to the fact that Yacc/Lex generate code that cannot trivially be
changed to not warn because of this (lots of yy* variables), add a
NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this
specific compiler warning.

Announced on:	toolchain@


git-svn-id: svn://svn.freebsd.org/base/head@249657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update chio(1) and ch(4) to support reporting element designators.

This allows mapping a tape drive in a changer (as reported by
'chio status') to a sa(4) driver instance by comparing the
serial numbers.

The designators can be ASCII (which is printed out directly), binary
(which is printed in hex format) or UTF-8, which is printed in either
native UTF-8 format if the terminal can support it, or in %XX notation
for non-ASCII characters.  Thanks to Hiroki Sato <hrs@> for the
explaining UTF-8 printing and example UTF-8 printing code.

chio.h:		Modify the changer_element_status structure to add new
		fields and definitions from the SMC3r16 spec.

		Rename the original CHIOGSTATUS ioctl to OCHIOGTATUS and
		define a new CHIOGSTATUS ioctl.

		Clean up some tab/space issues.

chio.c: 	For the 'status' subcommand, print the designator field
		if it is supplied by a device.

scsi_ch.h:	Add new flags for DVCID and CURDATA to the READ
		ELEMENT STATUS command structure.

		Add a read_element_status_device_id structure
		for the data fields in the new standard. Add new
		unions, dt_or_obsolete and voltage_devid, to hold
		and address data from either SCSI-2 or newer devices.

scsi_ch.c:	Implement support for fetching device IDs with READ
		ELEMENT STATUS data.

		Add new arguments to scsi_read_element_status() to
		allow the user to request the DVCID and CURDATA bits.
		This isn't compiled into libcam (it's only an internal
		kernel interface), so we don't need any special
		handling for the API change.

		If the user issues the new CHIOGSTATUS ioctl, copy all of
		the available element status data out.  If he issues the
		OCHIOGSTATUS ioctl, we don't copy the new fields in the
		structure.

		Fix a bug in chopen() that would result in the peripheral
		never getting unheld if chgetparams() failed.

Sponsored by:	Spectra Logic
Submitted by:	Po-Li Soong
MFC After:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
mostly whitespace changes:
- remove vestiges of the old memory allocator
- clean up some comments


git-svn-id: svn://svn.freebsd.org/base/head@249659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Initialise the chainmask fields regardless of whether 11n support
is compiled in or not.

This fixes issues with people running -HEAD but who build modules
without doing a "make buildkernel KERNCONF=XXX", thus picking up
opt_*.h.  The resulting module wouldn't have 11n enabled and the
chainmask configuration would just be plain wrong.


git-svn-id: svn://svn.freebsd.org/base/head@249662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge ACPICA 20130418.


git-svn-id: svn://svn.freebsd.org/base/head@249663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Expose CAM_BOOT_DELAY as a kernel conf item now.

This allows users who boot without loader to adjust their environments
around slightly buggy or slow hardware.

PR:	kern/161809
Submitted by:	rozhuk.im@gmail.com
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249664 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add note about fagility of the clang upgrade process.


git-svn-id: svn://svn.freebsd.org/base/head@249665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make libprocstat(3) extract procstat notes from a process core file.

PR:		kern/173723
Suggested by:	jhb
Glanced by:	kib
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add procstat_getvmmap function to get VM layout of a process.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249667 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use procstat_getprocs(3) for retrieving thread information instead of
direct sysctl calls.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249668 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use more generic procstat_getvmmap(3) for retrieving VM layout of a process.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add procstat_getgroups function to retrieve process groups.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249670 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use procstat_getgroups(3) for retrieving groups information instead of
direct sysctl.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249671 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add procstat_getumask function to retrieve a process umask.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249672 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use procstat_getumask(3) for retrieving umaks information instead of
direct sysctl.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249673 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add procstat_getrlimit function to retrieve a process resource limits info.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249674 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use procstat_getrlimit(3) for retrieving rlimit information instead of
direct sysctl calls.

MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249675 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add procstat_getpathname function to retrieve a process executable.

MFC after:	1 month


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