MFC r233136, r233432:
	Restore the ability to use a non-standard LOCALBASE to sshd
	Add the ability to use a non-standard LOCALBASE to ssh

Approved by:	cperciva (implicit)
MFC r227489:
	- fix duplicate "a a" in some comments

Approved by:	cperciva (implicit)
MFC r233291
  Handle spurious page faults that may occur in no-fault sections of the
  kernel.
Adjust for the set of packages that will ship with 8.3-RELEASE.  At this
point only the English documentation package fits on disc1.  All of the
documentation packages will be provided on the memstick images but no
other packages.  The DVD image will have enough packages to set up a
basic graphical workstation.

Reviewed by:	portmgr, re
MFC r231300, r231328:
	Permit the use of relative paths for the prefix argument.
	Remove an unnecessary cwd from created plists when -p is specified

Approved by:	cperciva (implicit)
MFC 232669:
Use bus_get_dma_tag() to inherit the 4G boundary restriction from the
parent PCI bus and remove the home-grown version in this driver.
MFC: r226179

Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
option is defined.  This sysctl can be queried by feature_present(3).

Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
If these utilities detect that ATA_CAM is enabled, then these utilities
will error out.  These utilities are compatible with the old ATA
driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
we give end-users an idea as to what remedies to use, and reduce the need for them
to file PR's.  For atacontrol, camcontrol must be used instead,
and for burncd, alternative utilties from the ports collection must be used
such as sysutils/cdrtools.

In future, maybe someone can re-write burncd to work with ATA_CAM,
but at least for now, we give a somewhat useful error message to end users.

PR:		160979
Reviewed by:	jh, Arnaud Lacombe <lacombar at gmail dot com>
Reported by:	Joe Barbish <fbsd8 at a1poweruser dot com>
MFC: r233274

Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it
along with functions, SYSCTLs and tunables that are not used with
ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM
code for the other way around. This makes it easier to understand
which parts of ata(4) actually are used in the new world order and
to later on remove the !ATA_CAM bits. It also makes it obvious that
there is something fishy with the C-bus front-end as well as in the
ATP850 support, as these used ATA_LOCKING which is defunct in the
ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to
be brought back in some form or other.

Reviewed by:	mav
MFC: r233282

- First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
MFC: r233287

Use the common/shared CRC-32 implementation instead of duplicating it.
MFC: r233403, r233404

- Use the PCI ID macros from mpi_cnfg.h rather than duplicating them here.
  Note that this driver additionally probes some device IDs for the most
  part not know to other MPT drivers, if at all. So rename the macros not
  present in mpi_cnfg.h to match the naming scheme in the latter and but
  suffix them with a _FB in order to not cause conflicts.
- Like mpt_set_config_regs(), comment out mpt_read_config_regs() as the
  content of the registers read isn't actually used and both functions
  aren't exactly up to date regarding the possible layouts of the BARs
  (these function might be helpful for debugging though, so don't remove
  them completely).
- Use DEVMETHOD_END.
- Use NULL rather than 0 for pointers.
- Remove an unusual check for the softc being NULL.
- Remove redundant zeroing of the softc.
- Remove an overly banal and actually partly incorrect as well as partly
  outdated comment regarding the allocation of the memory resource.
MFC: r233421

Given that this is a host-PCI-Express bridge driver, create the parent
DMA tag with a 4 GB boundary as required by PCI-Express. With r232403
(MFC'ed to stable/8 in r233394) in place this actually is redundant.
However, the host-PCI-Express bridge driver is the more appropriate
place for implementing this restriction.
MFC: r233423

Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in
order to avoid otherwise harmless witness warnings when these are acquired
at the same time and due to both using MTX_NETWORK_LOCK as their type.
The right fix actually would be to use different, descriptive types for
these. However, the latter would require undesirable changes to the shared
code base. Another approach would be to just supply NULL as the type, which
was deemed as less desirable though as it would cause the unique but cryptic
name also to be used for the type and to diverge from the type used by other
network device drivers.
MFC r233328,r233382:
Fix incorrect parameter usage.

Submitted by:	Monthadar Al Jaberi
MFC: r233426

Add QGE-X to the list of known-working cards.
MFC: r233425

Consistently update to the MPI header set version 01.05.20 after r224761
(MFC'ed to stable/8 in r224820).
Requested by:	mjacob
MFC: r233427

Add cas(4), gem(4) and hme(4) to x86 GENERICs as suggested by netchild@ in
<20120222095239.Horde.0hpYHJjmRSRPRKzXsoFRbYk@webmail.leidinger.net>.
According to some private emails received, it apparently is not unpopular
to use at least Quad GigaSwift cards driven by cas(4) in x86 machines.
MFC r233256
  Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
  longer serve any purpose.
MFC r208190, r229667, r230541, r230869, r231909, r231910, r231911, r231912:

r208190 (ivoras):

Slightly improve wording.

r229667, r230541, r230869 (ghelmer):

Change the notes about the pidfile to include Doug's preference
for pre-creating the pidfile with appropriate owner and permissions.

Requested by dougb

r231909:

The pidfile_open(3) is going to be fixed to set close-on-exec in order
not to leak the descriptor after exec(3). This raises the issue for
daemon(3) of the pidfile lock to be lost when the child process
executes.

To solve this and also to have the pidfile cleaned up when the program
exits, if a pidfile is specified, spawn a child to exec the command
and wait in the parent keeping the pidfile locked until the child
process exits and remove the file.

Reported by:	Andrey Zonov <andrey zonov org>
Suggested by:	pjd
Reviewed by:	pjd

r231910:

If the supervising process receives SIGTERM, forward it to the spawned
process.  Normally it will cause the child to exit followed by the
termination of the supervisor after removing the pidfile.

This looks like desirable behavior, because termination of a
supervisor usually supposes termination of its charge. Also it will
fix the issue with stale pid files after reboot due to init kills a
supervisor before its child exits.

r231911:

Add -r option to restart the program if it has been terminated.

Suggested by:	Andrey Zonov <andrey zonov org>

r231912:

If permitted protect the supervisor against pageout kill.

Suggested by:	Andrey Zonov <andrey zonov org>
MFC r233607:
Update comment.