Fix a miscalculation that caused cxgbe/tom to auto-increment
a TOE socket's tx buffer size too aggressively.

Approved by:	re (delphij)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255410 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Rework the tx credit mechanism between the cxgbe/tom driver
and the card.  This helps smooth out some burstiness in the
exchange.

Approved by:	re (glebius)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255411 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
In r243868, the error message buffer errmsg have been changed from
an on-stack array to a pointer and therefore sizeof(errmsg) would
become 4 or 8 bytes depending on the architecture.

Fix this by using ERRMSGL in place of sizeof().

Submitted by:	J David <j.david.lists@gmail.com>
MFC after:	3 days
Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255412 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove unneeded mappings from libmap32.conf.  Move it up one level and
install it on powerpc64 in addition to amd64.

Reviewed by:	kib
Approved by:	re (blanket)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use the canonical bits for wired, etc. in the PTE. This is important for
interactions with certain kinds of hypervisors that look into the PTEs
more closely than they should.

Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use a spin lock instead of a mutex to gate RTAS. This is required if RTAS
calls are involved in interrupt handling.

Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add hook called when every new processor is brought online -- including the
BSP -- so that platform modules have a chance to add the new CPU to any
internal bookkeeping.

Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255417 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add POWER CPUs to the kernel's knowledge. This does not imply we currently
actually run on any machines with POWER CPUs but avoids closing that door
unnecessarily.

Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255418 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Raise artificial limits on number of CPUs and number of interrupts.

Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255419 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Attach only on hardware that is actually supported as opposed to hardware
that seems like it has some of the problems we might want.

Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revert r255420. This seems to break some Powermac systems and will be
revisited much later.

Pointy hat to:		me
Approved by:		re (kib, implicit due to breakage 10 minutes ago)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
These three files appeared in 6.0p1, which was imported into the vendor
branch but never merged to head.  They were inadvertantly left out when
6.1p1 was merged to head.  It didn't make any difference at the time,
because they were unused, but one of them is required for DNS-based host
key verification.

Approved by:	re (blanket)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255422 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make the primary name of the OF console device /dev/ofwcons, and only
alias it to the contents of the output property if it is defined. This
avoids a panic when booting machines (QEMU) where the output-device
property is not defined.

Since output-device is free-form and potentially conflicts with other
entries in /dev, I also am not sure we should be doing the aliasing at
all, but this at least makes things work again.

Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255424 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The correct variable is apparently MACHINE_ARCH, not TARGET_ARCH.

Approved by:	re (blanket)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255425 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping use
an address in the first 2GB of the process's address space.  This flag should
have the same semantics as the same flag on Linux.

To facilitate this, add a new parameter to vm_map_find() that specifies an
optional maximum virtual address.  While here, fix several callers of
vm_map_find() to use a VMFS_* constant for the findspace argument instead of
TRUE and FALSE.

Reviewed by:	alc
Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Pass -n (do not emit comments) when saving mtree information for future
mergemaster(8) runs.

MFC after:	3 days
Approved by:	re (kib)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255428 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Emit the correct standard library dependency line for C++ programs.  In
the CLANG_IS_CC case, the default is now libc++.  Only use libstdc++ if
!CLANG_IS_CC or it was explicitly requested in CXXFLAGS.

Submitted by:	theraven
Approved by:	re (gjb)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the aborting of association with the iterator using an empty
user initiated error cause (using SCTP_ABORT|SCTP_SENDALL).

Approved by: re (delphij)
MFC after: 1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255434 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFV r247844 (illumos-gate 13975:ef6409bc370f)

Illumos ZFS issues:
  3582 zfs_delay() should support a variable resolution
  3584 DTrace sdt probes for ZFS txg states

Provide a compatibility shim for Solaris's cv_timedwait_hires
to help aid future porting.

Approved by:	re (ZFS blanket)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@255437 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Go way past 11 and bump bhyve's max vCPUs to 16.

This should be sufficient for 10.0 and will do
until forthcoming work to avoid limitations
in this area is complete.

Thanks to Bela Lubkin at tidalscale for the
headsup on the apic/cpu id/io apic ASL parameters
that are actually hex values and broke when
written as decimal when 11 vCPUs were configured.

Approved by:	re@


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