Get rid of a gcc'ism.

MFC after: 10 days


git-svn-id: svn://svn.freebsd.org/base/head@240158 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make r230454 more readable and vendor-like.

PR:		kern/171380
MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@240162 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix "Corrupted DWARF expression" from (k)gdb.

Google turned up Debian bug 405116, which describes the problem in
sufficient detail to identify the overflowing variables.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@240163 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add Intel Ivy Bridge support to hwpmc(9).
Update offcore RSP token for Sandy Bridge.
Note: No uncore support.

Will works on Family 6 Model 3a.

MFC after: 1 month
Tested by: bapt, grehan


git-svn-id: svn://svn.freebsd.org/base/head@240164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add TRIM support, enabled by default.
Fix a bug installing components from a localPath.
Allow autosizing of any partition, not just the last partition.
Adjust how ZFS is laid out to work with Boot Environments.

Submitted by:	kmoore
Obtained from:	PC-BSD
MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@240165 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
There is no need to release the pvh global lock around calls to
pmap_get_pv_entry().  In fact, some callers already held it around calls.
(In earlier versions, the same statements would apply to the page queues
lock.)

While I'm here tidy up the style of a few nearby statements and revise
some comments.

Tested by:	Ian Lepore


git-svn-id: svn://svn.freebsd.org/base/head@240166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a kernel module on pc98 for the ct(4) driver.


git-svn-id: svn://svn.freebsd.org/base/head@240170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove NetBSD compat shims for drivers originally shared with NetBSD/pc98.
NetBSD/pc98 was never merged into the main NetBSD tree and is no longer
developed.  Adding locking to these drivers would have made the compat
shims hard to impossible to maintain, so remove the shims to ease
future changes.

These changes were verified by md5.  Some additional shims can be removed
that do affect the compiled results that I will probably do in another
round.

Approved by:	nyan (tentatively)


git-svn-id: svn://svn.freebsd.org/base/head@240172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Minor mdoc fix.


git-svn-id: svn://svn.freebsd.org/base/head@240173 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove trailing whitespace.


git-svn-id: svn://svn.freebsd.org/base/head@240174 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove trailing whitespace.


git-svn-id: svn://svn.freebsd.org/base/head@240175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Avoid segfault if name is invalid.  Basically, only
check for CTL_USER if the sysctl fails with ENOENT.

PR:		169056
Reviewed by:	jhb


git-svn-id: svn://svn.freebsd.org/base/head@240176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Dynamically allocate the S/G lists passed to callback routines rather than
allocating them on the stack of various bus_dmamap_load*() functions.  The
S/G lists are stored in the DMA tags.  This matches the implementation on
all other platforms.

Discussed with:	scottl, gibbs
Tested by:	stas (arm@)


git-svn-id: svn://svn.freebsd.org/base/head@240177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libc/amd64: Do not export .cerror.

For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit
in the FBSDprivate_1.0 version. It looks like there is no reason for this
since it is not used from other libraries. Given that it cannot be accessed
from C and its strange calling convention, it is rather unlikely that other
things rely on it. Perhaps it is from a time when symbols could not be
hidden.

Most of the amd64 assembler code jumps to .cerror using the GOT. It can jump
to it directly now, as in non-PIC mode.

There are also some minor size optimizations to instructions but they yield
virtually no benefit in the size of libc.so.7 due to padding.

Reviewed by:	kib


git-svn-id: svn://svn.freebsd.org/base/head@240178 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Ensure that single-frame aggregate session frames are retransmitted
with the correct configuration.

Occasionally an aggregate TX would fail and the first frame would be
retransmitted as a non-AMPDU frame.  Since bfs_aggr=1 and bfs_nframes > 1
(from the previous AMPDU attempt), the aggr completion function would be
called and be very confused about what's going on.

Noticed by:	Kim <w8hdkim@gmail.com>
PR:		kern/171394


git-svn-id: svn://svn.freebsd.org/base/head@240180 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Eliminate an unused macro.


git-svn-id: svn://svn.freebsd.org/base/head@240181 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When calling the C++ demangler, make sure to free the returned buffer,
which might have been reallocated.

Pointed out by:	stefanf


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