- Probe with BUS_PROBE_DEFAULT instead of 0.
- Nuke code setting PCI_POWERSTATE_D0; pci(4) already does that for type 0
  devices.
- There's no need to keep track of resource IDs.
- Quiesce the interrupt before actually detaching.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260064 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
* ld80/k_expl.h:
* ld128/k_expl.h:
  . Split out a computational kernel,__k_expl(x, &hi, &lo, &k) from expl(x).
    x must be finite and not tiny or huge.  The kernel returns hi and lo
    values for extra precision and an exponent k for a 2**k scale factor.
  . Define additional kernels k_hexpl() and hexpl() that include a 1/2
    scaling and are used by the hyperbolic functions.

* ld80/s_expl.c:
* ld128/s_expl.c:
  . Use the __k_expl() kernel.

Obtained from:	bde


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260066 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
* Makefile:
  . Hook coshl, sinhl, and tanhl into libm.
  . Create symbolic links for corresponding manpages.
  . While here remove a nearby extraneous space.

* Symbol.map:
* src/math.h:
  . Move coshl, sinhl, and tanhl to their proper locations.

* man/cosh.3:
* man/sinh.3:
* man/tanh.3:
  . Update the manpages.

* src/e_cosh.c:
* src/e_sinh.c:
* src/s_tanh.c:
  . Add weak reference for LBDL_MANT_DIG==53 targets.

* src/imprecise.c:
  . Remove the coshl, sinhl, and tanhl kludge.

* src/e_coshl.c:
  . ld80 and ld128 implementation of coshl().

* src/e_sinhl.c:
  . ld80 and ld128 implementation of sinhl().

* src/s_tanhl.c:
  . ld80 and ld128 implementation of tanhl().

Obtained from:	bde (mostly), das and kargl


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add the -R option to allow fsck_ffs to restart itself when too many critical
errors have been detected in a particular run.

Clean up the global state variables so that a restart can happen correctly.

Separate the global variables in fsck_ffs and fsdb to their own file.  This
fixes header sharing with fscd.

Correctly initialize, static-ize, and remove global variables as needed in
dir.c.  This fixes a problem with lost+found directories that was causing
a segfault.

Correctly initialize, static-ize, and remove global variables as needed in
suj.c.

Initialize the suj globals before allocating the disk object, not after.
Also ensure that 'preen' mode doesn't conflict with 'restart' mode

Submitted by:	scottl, max
Reviewed by:	max, mckusick (earlier version)
Obtained from:	Netflix
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add globs.c to the build now that it's a separate file.

Reviewed by:	max
Obtained from:	Netflix
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260069 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Multi-queue NIC drivers and multi-port lagg tend to use the same lower
bits of the flowid as each other, resulting in a poor distribution of
packets among queues in certain cases.  Work around this by adding a
set of sysctls for controlling a bit-shift on the flowid when doing
multi-port aggrigation in lagg and lacp.  By default, lagg/lacp will
now use bits 16 and higher instead of 0 and higher.

Reviewed by:	max
Obtained from:	Netflix
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260070 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
gcc: small diff reduction wrt gcc43 and Apple GCC.

Obtained from:	gcc 4.3 (rev. 121464, 122528, 124106; GPLv2)
MFC after:	3 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260073 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add globs.c, missed in r260068,260069

Submitted by:	peter
Obtained from:	Netflix
MFC after:	3 Days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Properly handle unsigned comparison.

MFC after: 2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260079 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add netpfil to CSCOPEDIRS.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix extremely slow operation with data digests enabled.  This was caused
by receive code waiting for data digest even when the data segment was
empty.  It didn't actually read it, but it waited until those four bytes
become available in the socket buffer, i.e. until any other PDU (such as NOP)
came in.

PR:		kern/185240
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Probe with BUS_PROBE_DEFAULT instead of 0.
- Remove clearing PCIM_CMD_INTxDIS; pci(4) will do that as appropriate since
  r189367.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260086 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
getopt returns an int, not a char, so use the correct data type for
the return value. Fixes powerpc tinderbox.

MFC after:	2 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260087 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fine tune filesystem block allocations under low free-space
conditions (-r254995) based on further operational experience.

Submitted by:  Dmitry Sivachenko
Fix Tested by: Dmitry Sivachenko
MFC after: 2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a mismerge of my local doc changes to msun/man/sinh.3.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Now that vmem(9) is available, use vmem arenas to allocate probe and
aggregation IDs, as is done in the upstream illumos code. This still
requires some FreeBSD-specific code, as our vmem API is not identical to the
one in illumos.

Submitted by:	Mike Ma <mikemandarine@gmail.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260091 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Allow AT91_MCI_ALLOW_OVERCLOCK to be an option in kernel config files.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260092 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Set the SoC name for the atmelbus name.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260093 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).

This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@260095 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Move most of NFS file handle affinity code out of the heavily congested
global RPC thread pool lock and protect it with own set of locks.

On synthetic benchmarks this improves peak NFS request rate by 40%.


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