Some compilers issue a warning when wider integer is casted to narrow
pointer.  Supposedly shut down the warning by casting through
uintptr_t.

Reported by:	ian


git-svn-id: svn://svn.freebsd.org/base/head@249538 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Replace hardcoded numbers.


git-svn-id: svn://svn.freebsd.org/base/head@249543 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use IP6S_M2MMAX macro.


git-svn-id: svn://svn.freebsd.org/base/head@249544 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Replace hardcoded numbers. Also use interface-local scope name instead
of node-local.


git-svn-id: svn://svn.freebsd.org/base/head@249545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix accounting after the r249528, also add several another counters to
the statistics.


git-svn-id: svn://svn.freebsd.org/base/head@249546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Correct error message.

Reported by:	Dirk Engling <erdgeist@erdgeist.org>


git-svn-id: svn://svn.freebsd.org/base/head@249547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Allow the vnode to be unlocked for the weird case of
LK_EXCLOTHER. LK_EXCLOTHER is only used to acquire a
usecount on a vnode during NFSv4 recovery from an
expired lease.

Reported and tested by:	pho
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249548 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Point to regdef.h. May need to dig up references to the N32 standard
that support this usage (which may be a bit rough, since different
parts of the standard say mutually contradictory things).


git-svn-id: svn://svn.freebsd.org/base/head@249551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix build after r249543.


git-svn-id: svn://svn.freebsd.org/base/head@249552 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Adapt libstand's setjmp/longjmp MIPS support to be portable across 32-bit
and 64-bit MIPS.  Don't use the floating-point coprocessor in the libstand
context for MIPS.

Reviewed by:	imp
MFC after:	3 days
Sponsored by:	DARPA, AFRL


git-svn-id: svn://svn.freebsd.org/base/head@249553 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use a suitable code generation when building libstand for MIPS.

Reviewed by:	imp
Sponsored by:	DARPA, AFRL
MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@249554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Also call configtest before reload to ensure working config.

Approved by:	jhb
MFC after:	1 week
X-MFC-With:	r249489


git-svn-id: svn://svn.freebsd.org/base/head@249555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Partial MFP4 of 222836:

Only look for FDT partitions if our potential parent is a DISK device.

Excluding direct recursion on the flashmap geoms was insufficient
because it did not prevent the underlying device from being retrieved if
flashmap geoms were further partitioned.

Reviewed by:	imp
Sponsored by:	DARPA, AFRL


git-svn-id: svn://svn.freebsd.org/base/head@249556 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a new set of notes to a process core dump to store procstat data.

The notes format is a header of sizeof(int), which stores the size of
the corresponding data structure to provide some versioning, and data
in the format as it is returned by a related sysctl call.

The userland tools (procstat(1)) will be taught to extract this data,
providing additional info for postmortem analysis.

PR:		kern/173723
Suggested by:	jhb
Discussed with:	jhb, kib
Reviewed by:	jhb (initial version), kib
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249558 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't leak lock when returning.

PR:		kern/177888
Submitted by:	Sven-Thorsten Dietrich <sven vyatta com>
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249559 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix incomplete printf.

PR:		kern/177889
Submitted by:	Sven-Thorsten Dietrich <sven vyatta com>
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
DTrace: print() should try to resolve function pointers

Merge changes from illumos:

3675 DTrace print() should try to resolve function pointers
3676 dt_print_enum hardcodes a value of zero

Illumos Revision:	b1fa6326238973aeaf12c34fcda75985b6c06be1

Reference:
https://www.illumos.org/issues/3675
https://www.illumos.org/issues/3676

Obtained from:	Illumos
MFC after:	1 month


git-svn-id: svn://svn.freebsd.org/base/head@249563 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the buffer-overflow-fixing fixes.

Pointy-hat to: me, for not realizing snprintf() is available in kernel.
Thanks to: jh, for bringing me the good news of snprintf(), Pawel Worach, for
           noting that the panic can be provoked in i386 and not in amd64


git-svn-id: svn://svn.freebsd.org/base/head@249564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use a per-RX-queue deferred list, rather than a single deferred list for
both queues.

Since ath_rx_pkt() does multi-mbuf frame recombining based on the RX queue,
this needs to occur.

Tested:

* AR9380 (XB112), hostap mode


git-svn-id: svn://svn.freebsd.org/base/head@249565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Document that sem_wait() can fail with EINTR if it is interrupted by a
  signal.
- Fix the old ksem implementation for POSIX semaphores to not restart
  sem_wait() or sem_timedwait() if interrupted by a signal.

MFC after:	1 week


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