Add missing "static".


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232964 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add PCI Id for the AMT SOL UART on G4x series Intel chipsets.

Submitted by:	admin zahost ru
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232967 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Expose some C11 stuff that is also C++11 stuff in C++11 mode.

Approved by:	dim (mentor)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232971 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Import a slightly newer libc++, with some bugs fixed that were found by running
the test suite on FreeBSD.

Approved by:	dim (mentor)


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

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Rtld on diet 3.

Stop using strerror(3) in rtld, which brings in msgcat and stdio.
Directly access sys_errlist array of errno messages with private
rtld_strerror() function.

Now,
$ size /libexec/ld-elf.so.1
   text    data     bss     dec     hex filename
  96983    2480    8744  108207   1a6af /libexec/ld-elf.so.1

Reviewed by:	dim, kan
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232974 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add an assert for proctree_lock to proc_to_reap().

Discussed with:	kib
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Hide stty(1) errors.

If rc(8) is executed without using a TTY, this error appears at the
beginning:

	stty: stdin isn't a terminal

Because this is to be expected and of course not harmful, it is better
to simply hide the error message.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232976 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make init(8) slightly more robust when /dev/console is missing.

If the environment doesn't offer a working /dev/console, the existing
version of init(8) will simply refuse running rc(8) scripts. This means
you'll only have a system running init(8) and nothing else.

Change the code to do the following:

- Open /dev/console like we used to do, but make it more robust to use
  O_NONBLOCK to prevent blocking on a carrier.
- If this fails, use /dev/null as stdin and /var/log/init.log as stdout
  and stderr.
- If even this fails, use /dev/null as stdin, stdout and stderr.

So why us this useful? Well, if you remove the `getpid() == 1' check in
main(), you can now use init(8) inside jails to properly execute rc(8).
It still requires some polishing, as existing tools assume init(8) has
PID 1.

Also it is now possible to use use init(8) on `headless' devices that
don't even have a serial boot console.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232977 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Correctly calculate the callout interval for beacon generation.

Submitted by:	monthadar@gmail.com


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232978 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use LIST_FOREACH_SAFE() instead of LIST_FOREACH() in pmap_remove(), since
the point of this loop is to remove elements. This worked by accident before.

MFC after:	2 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232980 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Pedantic nit: use vm_pindex_t instead of long for a count of pages.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update man page to present -T argument in synopsis

MFC with r183347

MFC after:	0 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232986 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add the missing IPOIB option.

Sponsored by:	iXsystems, Inc.
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232990 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a PCI quirk to ignore PCI map registers from configuration space.
For example, some BIOS for AMD SB600 south bridge may map HPET MMIO base
address as a memory BAR for SMBus controller depending on a PM register
configuration.  Before r231161 (and r232086, subsequent MFC to stable/9),
it was not fatal but hpet(4) just failed to attach.  Since we probe and
attach HPET earlier than PCI devices now, it caused unfortunate hard lockup.
With this patch, it does not hang any more and HPET works at the same time.
Clean up some style nits while I am in the neighborhood.

PR:		kern/165647
Reviewed by:	jhb
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232991 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Remove unncessary type casts
- Make kernel backtrace routine more robust by refusing to backtrace
    further when encountered function that is possibly modifies SP
    value


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232992 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Fix an erroneous invocation of the editline.
- Fix wrong scaling in the bc.library.
- Let length(0.000) conform to what gnu bc does.

PR:	bin/159227
Submitted by:	AIDA Shinra <shinra at j10n dot org>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232994 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add debug.kld_debug loader tunable.

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232997 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fill out fake preload structure to let userland tools like pmc(3) know
about kernel module base address and actual size


git-svn-id: svn+ssh://svn.freebsd.org/base/head@232998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add CTLFLAG_TUN to the sysctl definition and fix style.

Pointed by:	Garrett Cooper
MFC after:	2 weeks


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