Commit Graph

198064 Commits

Author SHA1 Message Date
Scott Long
cee9136cc6 Implement basic cpuset reporting in procstat via the -S flag.
Obtained from:	Netflix, Inc.
MFC after:	3 days
2015-03-10 09:41:48 +00:00
Michael Tuexen
8f290ed51b Fix a typo.
MFC after: 1 week
2015-03-10 09:16:31 +00:00
Ian Lepore
140e744269 Remove MODULES_OVERRIDE="" and WITHOUT_MODULES="ahc" from armv6 configs.
These are left over from long ago when there was no way to load modules
on early armv6 platforms, and when there was a build problem with ahc
that has long since been fixed, and they just keep getting copy-pasted
into new configs.
2015-03-10 02:33:51 +00:00
Ryan Stone
1761699194 Add missing counter definitions
Differential Revision:	https://reviews.freebsd.org/D1591
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:24:16 +00:00
Ryan Stone
bc0ad9a99d Fix Ivy Bridge+ MEM_UOPS_RETIRED counters
The MEM_UOPS_RETIRED actually work the same way as the Sandy
Bridge counters, but the counters were documented in a different
way and that seemed to cause the Ivy Bridge counters to be
implemented incorrectly.  Use the same counter definitions as
Sandy Bridge.  While I'm here, rename the counters to match
what's documented in the datasheet.

Differential Revision:	https://reviews.freebsd.org/D1590
MFC after:	1 month
Sponsored by:	Sandvine Inc.
2015-03-10 01:24:08 +00:00
Ryan Stone
e31c323f95 Support architectural events on Haswell/Ivy Bridge
Differential Revision:	https://reviews.freebsd.org/D1589
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:24:02 +00:00
Ryan Stone
ae9975db34 Use the correct event table for Haswell Xeon events
Differential Revision:	https://reviews.freebsd.org/D1588
MFC after:	1 month
Sponsored by:	Sandvine Inc.
2015-03-10 01:23:55 +00:00
Ryan Stone
9e60f3acd2 Fix Sandy Bridge+ hwpmc branch counters
On Sandy Bridge and later, to count branch-related events you
have to or together a mask indicating the type of branch
instruction to count (e.g. direct jump, branch, etc) and a bits
indicating whether to count taken and not-taken branches.  The
current counter definitions where defining this bits individually,
so the counters never worked and always just counted 0.

Fix the counter definitions to instead contain the proper
combination of masks.  Also update the man pages to reflect the
new counters.

Differential Revision:	https://reviews.freebsd.org/D1587
MFC after:	1 month
Sponsored by:	Sandvine Inc.
2015-03-10 01:23:47 +00:00
Ryan Stone
89d0633b86 Fix pmc unit restrictions to match documentation
A couple of pmc counters did not work because there were being
restricted to the wrong PMC unit.  I've verified that these
counters now work and match the documented restrictions.

Differential Revision:	https://reviews.freebsd.org/D1586
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:23:40 +00:00
Ryan Stone
d444c14119 Fix various bugs in Haswell counter definitions
1) The "WALK_COMPLETED_2M_4M" event incorrectly referenced 4K pages.
2) The umask for RING0 and RING123 events was reversed.

Differential Revision:	https://reviews.freebsd.org/D1585
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:23:34 +00:00
Ryan Stone
f1ec0939ec Add manpage for Haswell Xeon pmc implementation
Differential Revision:	https://reviews.freebsd.org/D1584
Reviewed by:	gnn
MFC After:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:22:43 +00:00
Ian Lepore
023911aa01 Use the new ifnet API. Also, allocate bus_dma_maps as needed instead of
pre-allocating them all at start-up.  Also fix a bug in cgem_stop(); before,
it wasn't properly unloading dma maps due to a cut-and-paste error.
2015-03-09 22:39:58 +00:00
Ian Lepore
b1029a9bc8 Revert accidentally commited file from r279824. We're not quite ready to
enable dtrace module building on all arm platforms yet.
2015-03-09 22:01:57 +00:00
Ian Lepore
3e096b705c Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN.
ntpd is hard-coded to use /dev/ppsN, and typically when multiple PPS sources
are available the sysadmin will symlink the right one(s) to /dev/ppsN, so
it's best to not usurp those names directly.
2015-03-09 21:58:41 +00:00
Ian Lepore
f61d8cc6fe Remove the static DTB config and instead build modules/dtb/am335x.
Also, remove WITHOUT_MODULES="ahc" which was added long ago to work around
build problems that have long since been fixed correctly.

PR:		198460
2015-03-09 21:54:27 +00:00
Ian Lepore
7115aa8d18 Add a dtb module for AM335x systems (just Beaglebone right now). 2015-03-09 21:50:10 +00:00
Julien Charbon
eb96dc3336 In TCP, connect() can return incorrect error code EINVAL
instead of EADDRINUSE or ECONNREFUSED

PR:			https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196035
Differential Revision:	https://reviews.freebsd.org/D1982
Reported by:		Mark Nunberg <mnunberg@haskalah.org>
Submitted by:		Harrison Grundy <harrison.grundy@astrodoggroup.com>
Reviewed by:		adrian, jch, glebius, gnn
Approved by:		jhb
MFC after:		2 weeks
2015-03-09 20:29:16 +00:00
Jung-uk Kim
be070eb896 Fix a typo in comment and explain the reason. 2015-03-09 20:26:42 +00:00
Xin LI
394e3bd088 Fix CARP when in use in a HyperV environment:
- Bump link state when stopping or starting the interface;
 - Don't handle SIOCGIFADDR specially, similar to r277103.

This change is based on a previous revision from Andy Zhang
(Microsoft) who did the diagnostic work and many thanks to
them for their help in supporting the HyperV work.

PR:		kern/187203
MFC after:	2 weeks
2015-03-09 20:11:16 +00:00
Ian Lepore
726f3ad5aa Attach the prcm clock driver early, so it can set the mpcore timer frequency.
Submitted by:	Svatopluk Kraus
2015-03-09 15:54:14 +00:00
Edward Tomasz Napierala
5d44d58834 Erm, revert chunk committed by mistake.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:44:36 +00:00
Warner Losh
601e4171b4 Add the DTrace modules to the build, rather than only build the dtrace
modules.
2015-03-09 15:43:33 +00:00
Edward Tomasz Napierala
6d8e60c342 Make things more readable; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:31:33 +00:00
Edward Tomasz Napierala
ef4b8dfad7 Remove some particularly bad code; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:20:12 +00:00
Ian Lepore
a286c311ab Add minimum cache line sizes to struct cpuinfo, use them in the new cache
maintenance routines.  Also add a routine to invalidate the branch cache.

Submitted by:	Michal Meloun
2015-03-09 14:46:10 +00:00
Ian Lepore
5ca6daaa26 Clean data cache before instruction cache in armv7_icache_sync_range().
Also ensure dsb precedes isb in all icache maintenance routines (first
do a data sync, then stall the instruction stream until it finishes).

Submitted by:	Michal Meloun
2015-03-09 14:42:25 +00:00
Edward Tomasz Napierala
8f0eba6738 Fix memory leak.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:21:00 +00:00
Edward Tomasz Napierala
5585582d14 Improve separated_concat() to properly handle the case of concatenating
"/" and "/foo".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:00:59 +00:00
Edward Tomasz Napierala
1bc6f46438 Minor optimization/cleanup in node_path(); no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 11:59:58 +00:00
Marcelo Araujo
53f7fd617c Fix style(9) from my previous commit r279803.
Spotted by:	kevlo
2015-03-09 10:29:15 +00:00
Marcelo Araujo
18733a0b76 Now ifconfig(8) can set the media option as 10Gbase-T for ixgbe(4).
Differential Revision:	D823
Reviewed by:	jfvogel
Approved by:	jfvogel
Sponsored by:	QNAP Systems Inc.
2015-03-09 08:43:27 +00:00
Marcelo Araujo
df634d45d3 Fix the media detected for copper cables NIC based on chipset X540T.
Phabric:        D811
Reviewed by:    jfvogel
Approved by:	jfvogel
Sponsored by:   QNAP Systems Inc.
2015-03-09 08:22:11 +00:00
Mark Johnston
d85550b2c7 Don't specify a function name in the example SDT(9) probe. As with the
module component, it is a bug that the SDT(9) KPI allows one to specify the
function component of an SDT probe. Currently, the module component is
filled in automatically if left unset; this is not yet true for the function
component, but will be addressed by some ongoing work.

MFC after:	3 days
2015-03-09 04:00:46 +00:00
Mark Johnston
aa14e9b7c9 Reimplement support for userland core dump compression using a new interface
in kern_gzio.c. The old gzio interface was somewhat inflexible and has not
worked properly since r272535: currently, the gzio functions are called with
a range lock held on the output vnode, but kern_gzio.c does not pass the
IO_RANGELOCKED flag to vn_rdwr() calls, resulting in deadlock when vn_rdwr()
attempts to reacquire the range lock. Moreover, the new gzio interface can
be used to implement kernel core compression.

This change also modifies the kernel configuration options needed to enable
userland core dump compression support: gzio is now an option rather than a
device, and the COMPRESS_USER_CORES option is removed. Core dump compression
is enabled using the kern.compress_user_cores sysctl/tunable.

Differential Revision:	https://reviews.freebsd.org/D1832
Reviewed by:	rpaulo
Discussed with:	kib
2015-03-09 03:50:53 +00:00
Mark Johnston
10b92369a1 Call xo_finish(3) before exiting in usage(). 2015-03-09 03:31:26 +00:00
Nathan Whitehorn
4b2b0f5043 Provide a shim layer in loader to condense the Open Firmware device tree to
an FDT. This is how Linux and OS X boot and can avoid some issues with
using Open Firmware at runtime. The code is highly experimental and disabled
by default; it can be turned on by setting the loader environment variable
"usefdt" to a non-NULL value.
2015-03-09 02:57:34 +00:00
Nathan Whitehorn
78f38c60bc Fix loader on PowerPC following r279784. It turns out that, due to .PATH
confusion, the _setjmp.S in libstand was never being used and was instead
being shadowed by the libc version. Since the libc version now uses FPRs,
it caused loader to crash.
2015-03-09 02:19:44 +00:00
Adrian Chadd
f35f94f4fd Methodise a couple more of the VLAN methods. 2015-03-08 23:02:15 +00:00
Jilles Tjoelker
33df3caae6 touch(1): Xref utimensat(2) instead of utimes(2). 2015-03-08 22:49:34 +00:00
Adrian Chadd
6ee7c13baf Now that if_arge.c handles actual 'locked' media settings, enable
the WAN port to look like it has its own PHY on PHY4 (port5).
2015-03-08 22:07:32 +00:00
Adrian Chadd
bbe493ec23 Modify the if_arge code to use a /fixed/ media mode when it's configured.
Otherwise, the initial media speed would change if a PHY is hooked up,
sending PHY speed notifications.  For the AP135 at least, the RGMII
PHY has a static speed/duplex configured and if the PHY plumbing
attaches the PHY to the if_arge interface, the first link speed change
from 1000/full will set the MAC to something that isn't useful.

This shouldn't affect any other platforms - everything I looked at is
using hard-coded speed/duplex as static, as they're facing a switch
with no PHY attached.
2015-03-08 22:03:54 +00:00
Adrian Chadd
749cac133f Add per-port vlan support for the AR8327.
All the per-port support is really doing is applying a port visibility
mask to each of the switchports.  Everything still look like a single
portgroup (vlan id 1), but the per-port visibility mask is modified.

Whilst I'm here, also add some initial dot1q support - the pvid stuff
is doing the right thing, but it's not useful without the rest of
the VLAN table programming.

It's enough for me to be able to use the LAN/WAN port distinction
on the AP135, where there isn't (for now!) a dedicated PHY for the
"WAN" port.

Tested:

* AP135, QCA9558 SoC + AR8327 switch
2015-03-08 21:59:03 +00:00
George V. Neville-Neil
6b031ddd14 Summary: Remove the need for `mpid which is Illumos/Solaris specific. 2015-03-08 21:51:37 +00:00
Luiz Otavio O Souza
5126a47396 Fix contraction and unnecessary commas in function arguments.
Found with mandoc and igor.
2015-03-08 21:17:56 +00:00
Luiz Otavio O Souza
de85f85a3a Put the new sentence on a new line.
Found with igor.
2015-03-08 21:11:08 +00:00
Pedro F. Giffuni
049855d88f bge(4): Small memory leak
CID:		1229985
Reviewed by:	marcel
Differential Review:	https://reviews.freebsd.org/D2024
2015-03-08 19:55:46 +00:00
Dmitry Morozovsky
b4ed898162 Ouch, I've misread the original text.
Still reword phrase a bit, hopefully in a bit less misleading form than before.

MFC after:	1 week
X-MFC-With:	r279783
Pointy Hat to:	marck
2015-03-08 19:50:30 +00:00
Nathan Whitehorn
1ee3532451 Save and restore non-volatile floating-point registers during longjmp().
This should also save and restore non-volatile Altivec registers, but that
needs to wait on solving two problems:
1. Adding the nonvolatile vector registers means we need 5 more than _JBLEN
   entries in jmp_buf on 32-bit targets (64-bit is OK).
2. Need to figure out how to determine if saving/restoring vector regs
   is supported on the current CPU from userland.

MFC after:	1 month
2015-03-08 19:37:08 +00:00
Dmitry Morozovsky
2e7a899b36 Correct wordings a bit.
MFC after:	1 week
2015-03-08 17:34:06 +00:00
Nathan Whitehorn
8ff77bff59 Provide $FreeBSD$ in the standard way. This fixes the build with clang 3.6. 2015-03-08 16:50:45 +00:00