MFV r246653:
Import vendor change to avoid "unitialized variable" warnings.

Illumos ZFS issues:
  3522 zfs module should not allow uninitialized variables

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


git-svn-id: svn://svn.freebsd.org/base/head@247187 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Now that qsort(3) has a sample comparison function, point to that
example from bsearch(3) too, so that we don't have to duplicate
the example code in both places.

PR:		docs/176197
Reviewed by:	stefanf
Approved by:	remko (mentor), gjb (mentor)
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@247189 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sh: Test that the exit status is 1 if read encounters EOF.


git-svn-id: svn://svn.freebsd.org/base/head@247190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add basic and not very reliable protection against going to sleep with
thread scheduled by interrupt fired after we entered critical section.
None of cpu_sleep() implementations on ARM check sched_runnable() now, so
put the first line of defence here.  This mostly fixes unexpectedly long
sleeps in synthetic tests of calloutng code and probably other situations.


git-svn-id: svn://svn.freebsd.org/base/head@247195 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Enable PREEMPTION by default now that PR 147501 has been fixed.


git-svn-id: svn://svn.freebsd.org/base/head@247197 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Print kernel args as late as possible before jumping into kernel.


git-svn-id: svn://svn.freebsd.org/base/head@247200 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
"fdt addr" gets run from loader.rc before the kernel is loaded.
This was broken by r247045 which tried to copy the FDT into the
module directory immediately.
Instead, store the address and arrange for the FDT to get
copied into the module directory later when the usual
FDT initialization runs.


git-svn-id: svn://svn.freebsd.org/base/head@247201 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add macroses to properly map IO peripherals memory window from
    ARM physical memory address space to VideoCore address space


git-svn-id: svn://svn.freebsd.org/base/head@247204 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Pull in r175962 from upstream llvm trunk:

  X86: Disable cmov-memory patterns on subtargets without cmov.

  Fixes PR15115.

For the i386 arch, this should enable cmov instructions only on
-march=pentiumpro and higher.  Since our default CPU is i486, cmov
instructions will now be disabled by default.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@247205 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sh: If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.


git-svn-id: svn://svn.freebsd.org/base/head@247206 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Bump per-device interrupt limit to more reasonable default.

Some hardware like DMA and GPIO controllers might require
more then 8 interrupts per device instance.

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
Discussed with:	gber@, raj@


git-svn-id: svn://svn.freebsd.org/base/head@247207 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Move dma, sdhci and mbox nodes down in dts in order to get them
    initialized after FPIO controller since they might rely on GPIO
    functionality

- Update interrupts property of dma node to contain all allocated
    interrupts


git-svn-id: svn://svn.freebsd.org/base/head@247208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'