]> xenbits.xensource.com Git - people/liuw/freebsd.git/log
people/liuw/freebsd.git
9 years agoFix resource leaks in error cases.
trasz [Wed, 11 Nov 2015 23:00:57 +0000 (23:00 +0000)]
Fix resource leaks in error cases.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoif_ntb: MFV c92ba3c5: invalid buf pointer in multi-MW setups
cem [Wed, 11 Nov 2015 18:56:21 +0000 (18:56 +0000)]
if_ntb: MFV c92ba3c5: invalid buf pointer in multi-MW setups

Order of operations issue with the QP Num and MW count, which would
result in the receive buffer pointer being invalid if there are more
than 1 MW.  Corrected with parenthesis to enforce the proper order of
operations.

Reported by: John I. Kading <John.Kading@gd-ms.com>
Reported by: Conrad Meyer <cem@FreeBSD.org>
Authored by: Jon Mason <jdmason@kudzu.us>
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Add more HW registers to device sysctl tree
cem [Wed, 11 Nov 2015 18:56:11 +0000 (18:56 +0000)]
NTB: Add more HW registers to device sysctl tree

Sponsored by: EMC / Isilon Storage Division

9 years agontb: volatile some members set by interrupt routines
cem [Wed, 11 Nov 2015 18:56:02 +0000 (18:56 +0000)]
ntb: volatile some members set by interrupt routines

Sponsored by: EMC / Isilon Storage Division

9 years agontb_hw: Similarly, add a debug-leveled macro for ntb_hw
cem [Wed, 11 Nov 2015 18:55:53 +0000 (18:55 +0000)]
ntb_hw: Similarly, add a debug-leveled macro for ntb_hw

Sponsored by: EMC / Isilon Storage Division

9 years agoif_ntb: Add module-specific log level
cem [Wed, 11 Nov 2015 18:55:44 +0000 (18:55 +0000)]
if_ntb: Add module-specific log level

Rather than relying on the quite accurately named 'bootverbose'.

Sponsored by: EMC / Isilon Storage Division

9 years agoif_ntb: Transport link cleanup needs to be on a taskqueue
cem [Wed, 11 Nov 2015 18:55:34 +0000 (18:55 +0000)]
if_ntb: Transport link cleanup needs to be on a taskqueue

Because it can sleep drainking link work callout(s).  Linux (dual
BSD/GPL driver) does something very similar.

At the same time, switch the NTB CTX lock to a non-spin mutex, because
the taskqueue_swi lock can't be taken after a spin mutex.

Suggested by: Witness
Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Diff reduce with Linux
cem [Wed, 11 Nov 2015 18:55:25 +0000 (18:55 +0000)]
NTB: Diff reduce with Linux

No functional change.

Sponsored by: EMC / Isilon Storage Division

9 years agontb_hw: Correctly detect DSD/USD
cem [Wed, 11 Nov 2015 18:55:16 +0000 (18:55 +0000)]
ntb_hw: Correctly detect DSD/USD

Sponsored by: EMC / Isilon Storage Division

9 years agontb_hw: In INTx fallback, correct db shift from 15 to 16
cem [Wed, 11 Nov 2015 18:55:07 +0000 (18:55 +0000)]
ntb_hw: In INTx fallback, correct db shift from 15 to 16

Sponsored by: EMC / Isilon Storage Division

9 years agontb: Use caddr_t to simplify pointer arithmetic
cem [Wed, 11 Nov 2015 18:54:58 +0000 (18:54 +0000)]
ntb: Use caddr_t to simplify pointer arithmetic

Sponsored by: EMC / Isilon Storage Division

9 years agoNTB: Skip db_valid validation writing DB link bit
cem [Wed, 11 Nov 2015 18:54:49 +0000 (18:54 +0000)]
NTB: Skip db_valid validation writing DB link bit

In ntb_poll_link, we are intentionally writing the link bit, which is
absent from db_valid_mask.  Don't panic on a kassert when we do so.

The Linux version of this (dual BSD/GPL) driver has the db_valid_mask
assertions in callers of db_iowrite() rather than db_iowrite() itself;
it skips the assertions in the equivalent of ntb_poll_link().  Rather
than duplicating the assertions in every caller, add a db_iowrite_raw()
that doesn't check and use it from ntb_poll_link().

Suggested by: kassert_panic
Sponsored by: EMC / Isilon Storage Division

9 years agoUse explicit filename when creating locale symlinks to avoid creating a
bdrewery [Wed, 11 Nov 2015 18:45:48 +0000 (18:45 +0000)]
Use explicit filename when creating locale symlinks to avoid creating a
directory symlink when the target directory does not exist.  This will
cause an error instead of a broken setup.

Sponsored by: EMC / Isilon Storage Division

9 years agoRemove redundant declaration for sysctl kern.
bdrewery [Wed, 11 Nov 2015 16:24:52 +0000 (16:24 +0000)]
Remove redundant declaration for sysctl kern.

This is trying to fix the GCC build.

MFC after: 1 month
X-MFC-With: r290663

9 years agoUse a proper prototype.
bdrewery [Wed, 11 Nov 2015 16:23:07 +0000 (16:23 +0000)]
Use a proper prototype.

This was a failure in the GCC build.

MFC after: 1 month
X-MFC-With: r290663

9 years agoRemove dead code.
des [Wed, 11 Nov 2015 13:47:23 +0000 (13:47 +0000)]
Remove dead code.

9 years agoOne more $Mdocdate$
des [Wed, 11 Nov 2015 13:27:58 +0000 (13:27 +0000)]
One more $Mdocdate$

9 years agoRemove /* $FreeBSD$ */ from files that already have __RCSID("$FreeBSD$").
des [Wed, 11 Nov 2015 13:26:47 +0000 (13:26 +0000)]
Remove /* $FreeBSD$ */ from files that already have __RCSID("$FreeBSD$").

9 years agoNow that we have mandoc, we can leave $Mdocdate$ tags as-is. Unfortunately,
des [Wed, 11 Nov 2015 13:23:07 +0000 (13:23 +0000)]
Now that we have mandoc, we can leave $Mdocdate$ tags as-is.  Unfortunately,
there is (currently) no way to make Subversion generate correct $Mdocdate$
tags, but perhas we can teach mandoc to read Subversion's %d format.

9 years agoModify target port groups logic in CTL.
mav [Wed, 11 Nov 2015 13:18:38 +0000 (13:18 +0000)]
Modify target port groups logic in CTL.

 - Introduce "ha_shared" port option, which being set to "on" moves the
port into separate port group, shared between HA nodes.  This allows to
better handle cases when iSCSI portals are bound to CARP address that can
dynamically move between nodes.  Some initiators (at least VMware) don't
detect that after iSCSI reconnect they've attached to different SCSI port
from different port group, that totally breakes ALUA status parsing.
In theory, I believe, it should be enough to have different iSCSI portal
group tags on different nodes to make initiators detect this condition,
but it seems like VMware ignores those values, and even full LUN retaste
forced by UA does not help.
 - Make CTL report up to three port groups: 1 -- non-HA mode or ports
with "ha_shared" option set, 2 -- HA node 1, 3 -- HA node 2.
 - Report Transitioning state for all port groups when HA interlink is
connected, but neither of nodes is primary for the LUN.

MFC after: 2 weeks

9 years agoRefactor bcm2835_cpufreq to use bcm2835_mbox_property API
gonzo [Wed, 11 Nov 2015 00:45:41 +0000 (00:45 +0000)]
Refactor bcm2835_cpufreq to use bcm2835_mbox_property API

9 years ago- Set have_message in interrupt to handle "response before READ" case
gonzo [Wed, 11 Nov 2015 00:41:02 +0000 (00:41 +0000)]
- Set have_message in interrupt to handle "response before READ" case
- Serialize access to property channel when using bcm2835_mbox_property

9 years agoBuild all of sys/modules with SUBDIR_PARALLEL.
bdrewery [Tue, 10 Nov 2015 17:15:36 +0000 (17:15 +0000)]
Build all of sys/modules with SUBDIR_PARALLEL.

Sponsored by: EMC / Isilon Storage Division
MFC after: 3 weeks

9 years agoAdd new async_drain to the callout system. This is so-far not used but
rrs [Tue, 10 Nov 2015 14:49:32 +0000 (14:49 +0000)]
Add new async_drain to the callout system. This is so-far not used but
should be used by TCP for sure in its cleanup of the IN-PCB (will be coming shortly).

Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D4076

9 years agoAdd a kernel test framework. The callout_test is a demonstration and will only
rrs [Tue, 10 Nov 2015 14:14:41 +0000 (14:14 +0000)]
Add a kernel test framework. The callout_test is a demonstration and will only
work with the upcoming async-drain functionality. Tests can be added
to the tests directory and then the framework can be used to launch
those tests.

MFC after: 1 month
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D1755

9 years agoFix a bug in the CPU % limiting code
jpaetzel [Tue, 10 Nov 2015 14:14:32 +0000 (14:14 +0000)]
Fix a bug in the CPU % limiting code

If you attempt to set a pcpu limit that is higher than
110% using rctl (for instance, you want a jail to be
able to use 2 cores on your system so you set pcpu to
200%) the thing you are trying to limit becomes unthrottled.

PR: 189870
Submitted by: dustinwenz@ebureau.com
Reviewed by: trasz
MFC after: 1 week

9 years agoARM: Refactor interrupt_enable/disable/restore.
mmel [Tue, 10 Nov 2015 13:47:28 +0000 (13:47 +0000)]
ARM: Refactor interrupt_enable/disable/restore.
Allow manipulation with PSR_A bit on ARMv6+.
Remove declaration of unused functions.

This effectively enables asynchronous aborts on early bootstrap stage,
which previously was not enabled due to an error in enable_interrupts().

PR: 201434
Reported by: Gregory Soutade <soutade at gmail.com>
Approved by: kib (mentor)

9 years agoMove the MK_BLUETOOTH block down below the architecture specific sections by the
ngie [Tue, 10 Nov 2015 13:32:05 +0000 (13:32 +0000)]
Move the MK_BLUETOOTH block down below the architecture specific sections by the
other generic options

MFC after: 3 days
X-MFC with: r290659
PR: 193260
Sponsored by: EMC / Isilon Storage Divisions

9 years ago- Move ng_bluetooth.4 under MK_BLUETOOTH != no
ngie [Tue, 10 Nov 2015 13:28:41 +0000 (13:28 +0000)]
- Move ng_bluetooth.4 under MK_BLUETOOTH != no
- Move all section 5 bluetooth manpages under MK_BLUETOOTH != no

MFC after: 3 days
PR: 193260
Reported by: Philippe Michel <philippe.michel7@sfr.fr>
Sponsored by: EMC / Isilon Storage Division

9 years agoFix cp15 PAR definition and function. While here, add cp15 ATS1CPW
skra [Tue, 10 Nov 2015 13:20:21 +0000 (13:20 +0000)]
Fix cp15 PAR definition and function. While here, add cp15 ATS1CPW
function which checks an address for privileged (PL1) write access.
The function is inlined so it does not bring any cost, but makes
function set for checking privileged access complete.

Approved by: kib (mentor)

9 years agoFix pmap_fault(). It turned out that alignment abort may have higher
skra [Tue, 10 Nov 2015 13:15:34 +0000 (13:15 +0000)]
Fix pmap_fault(). It turned out that alignment abort may have higher
priority than both translation and permission ones.

Approved by: kib (mentor)

9 years agourtwn(4): add IBSS mode support
avos [Tue, 10 Nov 2015 12:52:26 +0000 (12:52 +0000)]
urtwn(4): add IBSS mode support

Tested with RTL8188EU, IBSS and STA modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4038

9 years agoAdd mlx5 and mlx5en driver(s) for ConnectX-4 and ConnectX-4LX cards
hselasky [Tue, 10 Nov 2015 12:20:22 +0000 (12:20 +0000)]
Add mlx5 and mlx5en driver(s) for ConnectX-4 and ConnectX-4LX cards
from Mellanox Technologies. The current driver supports ethernet
speeds up to and including 100 GBit/s. Infiniband support will be
done later.

The code added is not compiled by default, which will be done by a
separate commit.

Sponsored by: Mellanox Technologies
MFC after: 2 weeks

9 years agoImplement atomic_testandset_{32,int,long,64} for ARMv6. Only
kib [Tue, 10 Nov 2015 12:15:13 +0000 (12:15 +0000)]
Implement atomic_testandset_{32,int,long,64} for ARMv6.  Only
little-endian configuration for 64-bit variant is supported.

Reviewed by: mmel
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4113

9 years agoARM: Remove trailing whitespace from sys/arm/include
mmel [Tue, 10 Nov 2015 12:02:41 +0000 (12:02 +0000)]
ARM: Remove trailing whitespace from sys/arm/include
No functional changes.

Approved by:    kib (mentor)

9 years agoARM: Improve robustness of locore_v6.S and fix errors.
mmel [Tue, 10 Nov 2015 11:45:41 +0000 (11:45 +0000)]
ARM: Improve robustness of locore_v6.S and fix errors.
- boot page table is not allocated in data section, so must be
  cleared before use
- map only one section (1 MB) for SOCDEV mapping (*)
- DSB must be used for ensuring of finishing TLB operations
- Invalidate BTB when appropriate

PR: 198360
Reported by: Daisuke Aoyama <aoyama at peach.ne.jp> (*)
Approved by: kib (mentor)

9 years agoAdd missing licensing boilerplate to test-fnmatch.c
ngie [Tue, 10 Nov 2015 11:28:02 +0000 (11:28 +0000)]
Add missing licensing boilerplate to test-fnmatch.c

Carry over licensing author info from fnmatch_test.c (jilles@)

MFC after: 1 week
X-MFC with: r290572
Sponsored by: EMC / Isilon Storage Division

9 years agoFix some trivial warnings with bootparamd/main.c
ngie [Tue, 10 Nov 2015 11:19:36 +0000 (11:19 +0000)]
Fix some trivial warnings with bootparamd/main.c

- Convert K&R to something a bit less ancient
- Remove an incorrect, duplicate prototype for bootparamprog_1(..)

MFC after: 1 week
PR: 71667
Submitted by: bcran
Sponsored by: EMC / Isilon Storage Division

9 years agoRenew my MAINTAINERS entries.
hselasky [Tue, 10 Nov 2015 11:04:23 +0000 (11:04 +0000)]
Renew my MAINTAINERS entries.

9 years ago- Move the testing entries up for netbsd-tests/pjdfstest
ngie [Tue, 10 Nov 2015 10:59:40 +0000 (10:59 +0000)]
- Move the testing entries up for netbsd-tests/pjdfstest
- Add pjd to contrib/pjdfstest
- Add atf to the list; add jmmv
- Add tests
- Add share/mk/*.test.mk

9 years agoFix slots DMA memory handling. It's similar to r290553.
skra [Tue, 10 Nov 2015 10:56:52 +0000 (10:56 +0000)]
Fix slots DMA memory handling. It's similar to r290553.

Discussed with: gonzo
Approved by: kib (mentor)

9 years agoAdd support for SCTP checksum offloading for the 82580 controller
tuexen [Tue, 10 Nov 2015 10:56:01 +0000 (10:56 +0000)]
Add support for SCTP checksum offloading for the 82580 controller
similar to the 82576 controller.
Tested with Intel i340 cards.

Reviewed by: erj@
MFC after: 1 week

9 years agoUpgrade my claim on fetch and libfetch since people don't seem to give a
des [Tue, 10 Nov 2015 10:49:26 +0000 (10:49 +0000)]
Upgrade my claim on fetch and libfetch since people don't seem to give a
hoot about "advance notification requested".

9 years agoUpdate the wsp driver to support newer touch pads, like found in
hselasky [Tue, 10 Nov 2015 09:27:52 +0000 (09:27 +0000)]
Update the wsp driver to support newer touch pads, like found in
MacBookPro11,4 and MacBook12,1. This update adds support for the
force touch parameter.

PR: 204420
MFC after: 1 week

9 years agoreturn "US-ASCII" instead of "POSIX" for "C" and "POSIX" locales
bapt [Tue, 10 Nov 2015 08:11:27 +0000 (08:11 +0000)]
return "US-ASCII" instead of "POSIX" for "C" and "POSIX" locales
as it used to be in previous version of the locales. Returning
"POSIX" has too many fallouts.

9 years agocxgbe/t4_tom: add a knob to the default configuration file to tune
np [Tue, 10 Nov 2015 02:29:19 +0000 (02:29 +0000)]
cxgbe/t4_tom: add a knob to the default configuration file to tune
the TOE for LAN operation.  It is possible to set this to other values
(cluster for networks with little loss and really tight RTTs, and wan
for relatively large RTTs and/or lossy networks) depending on the
environment in which the TOE is being used.

None of this affects plain NIC operation in any way.

MFC after: 1 week

9 years agourtwn(4): fix the build.
avos [Tue, 10 Nov 2015 00:42:32 +0000 (00:42 +0000)]
urtwn(4): fix the build.

Add some missing bits from D4020.

9 years agourtwn(4): add HOSTAP mode support.
avos [Tue, 10 Nov 2015 00:12:00 +0000 (00:12 +0000)]
urtwn(4): add HOSTAP mode support.

Tested with RTL8188EU, HOSTAP and STA modes

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4034

9 years agourtwn(4): refactor and fix TX path.
avos [Mon, 9 Nov 2015 23:46:13 +0000 (23:46 +0000)]
urtwn(4): refactor and fix TX path.

- Split urtwn_tx_start() into urtwn_tx_data() and urtwn_tx_start()
  (the last will be used for beacon updates / raw xmit path).
- Remove unneeded code from _urtwn_getbuf().
- Use CCK11 for data frames in 11b mode.
- Send EAPOL frames at 1 Mbps.
- Reduce code duplication in urtwn_tx_data().
- Fix sequence numbering.
- Add IEEE80211_RADIOTAP_F_WEP flag for encrypted frames.
- Check URTWN_RUNNING flag under lock.

Tested with RTL8188EU, STA mode.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4017

9 years agoFAST_DEPEND: Fix building of wrong source files in some cases.
bdrewery [Mon, 9 Nov 2015 23:37:04 +0000 (23:37 +0000)]
FAST_DEPEND: Fix building of wrong source files in some cases.

Similar to the original reason for these dependency hints to be added,
in r124637, the missing-dependency file case can lead to building of the
wrong source.

A clear example of this is in gnu/lib/libstdc++ where the .PATH contains
both contrib/gcc and contrib/libstdc++/src.

  contrib/gcc has a debug.c.
  contrib/libstdc++/src has a debug.cc.

  When building for the objects of debug.o, debug.So, and debug.po, it is
  ambiguous for which src file to use due to the suffix transformation
  rules, even though the proper one is listed first in .PATH.

  This was normally avoided due to these dependency hints for the initial
  build, and then mkdep would add an explicit 'debug.o: debug.cc'
  dependency into the .depend file.  WITH_FAST_DEPEND does not generate
  the .depend file with these, but puts them into .depend.debug.o instead.

Rather than extending the exists() check to each object's .depend.*
file, just enable the hint when when using WITH_FAST_DEPEND.  It fixes
the problem and seems to be safe enough to use since it is mapping SRCS
back to OBJS, rather than letting make make assumptions from OBJS to
SRCS.

A similar check mapping objects to headers is present in some mk files
but was not extended here for FAST_DEPEND since it has not yet been
found to be a problem.

X-MFC-With: r290433
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoWhen extracting mtrees, pass -i so schg/sappnd are respected.
bdrewery [Mon, 9 Nov 2015 23:37:01 +0000 (23:37 +0000)]
When extracting mtrees, pass -i so schg/sappnd are respected.

This fixes /var/empty not being schg in the installation.

This was a change from fmtree to nmtree, that -i is now required to
apply these flags.

PR: 194189
Submitted by: guyyur@gmail.com
MFC after: 2 weeks
Relnotes: yes

9 years agoFix 'make cleanworld' to respect TARGET/TARGET_ARCH for cross-build objtrees.
bdrewery [Mon, 9 Nov 2015 23:36:57 +0000 (23:36 +0000)]
Fix 'make cleanworld' to respect TARGET/TARGET_ARCH for cross-build objtrees.

This simplifies the logic to always try removing the objdir if it exists
and to fallback on a 'cleandir' if no objdir exists.  The reasoning for
this is to avoid rm -rf src/* (r126024)

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

9 years agoMove 'make cleandir' from Makefile to Makefile.inc1.
bdrewery [Mon, 9 Nov 2015 23:36:46 +0000 (23:36 +0000)]
Move 'make cleandir' from Makefile to Makefile.inc1.

This leads the way for fixing cross-build cleanup, and eventually replacing
'cleandir' with it during the build.

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

9 years agoAdd a README to explain how to generate the locales from CLDR data
bapt [Mon, 9 Nov 2015 23:23:29 +0000 (23:23 +0000)]
Add a README to explain how to generate the locales from CLDR data

9 years agoConnect nmtree
bdrewery [Mon, 9 Nov 2015 23:20:45 +0000 (23:20 +0000)]
Connect nmtree

9 years agoRename usr.sbin/mtree to usr.sbin/fmtree since it is not what /usr/sbin/mtree
bdrewery [Mon, 9 Nov 2015 23:19:36 +0000 (23:19 +0000)]
Rename usr.sbin/mtree to usr.sbin/fmtree since it is not what /usr/sbin/mtree
actually is (which is usr.sbin/nmtree).

This has tricked me numerous times.

9 years agonl_langinfo: Simplify case ladder
bapt [Mon, 9 Nov 2015 22:29:47 +0000 (22:29 +0000)]
nl_langinfo: Simplify case ladder

The NONE:US-ASCII case isn't necessary.  The "NONE:" case will handle
US-ASCII, so let's remove the redundant handling.

Submitted by: marino
Obtained from: DragonflyBSD

9 years agoFix typo (s/ncpus/mp_ncpus/)
tijl [Mon, 9 Nov 2015 22:12:29 +0000 (22:12 +0000)]
Fix typo (s/ncpus/mp_ncpus/)

Reported by: bz

9 years agoReadd ascii.c forgotten in r290618
bapt [Mon, 9 Nov 2015 22:11:37 +0000 (22:11 +0000)]
Readd ascii.c forgotten in r290618

9 years agoRegenerate timedef now that the tools pad CJK correctly
bapt [Mon, 9 Nov 2015 22:09:38 +0000 (22:09 +0000)]
Regenerate timedef now that the tools pad CJK correctly

9 years agolocales: Enforce US-ASCII encoding (limited to 7-bit)
bapt [Mon, 9 Nov 2015 22:06:22 +0000 (22:06 +0000)]
locales: Enforce US-ASCII encoding (limited to 7-bit)

The US-ASCII format was getting treated identically to POSIX.  It is
supposed to throw an ILSEQ errno if a value of 0x80 or greater is
encountered, so let's bring back the "ASCII" handling.

While here, change nl_codeset to return US-ASCII only when the encoding
really is "US-ASCII".  Before "C" and "POSIX" encoding returned this
string, so now they return "POSIX".

Discussed with: ache
Submitted by: marino
Obtained from: DragonflyBSD

9 years agoAlso remove directories along with old locales
bapt [Mon, 9 Nov 2015 21:53:39 +0000 (21:53 +0000)]
Also remove directories along with old locales

Reported by: andreast

9 years agoFix kernel build, broken in r290612
garga [Mon, 9 Nov 2015 20:22:59 +0000 (20:22 +0000)]
Fix kernel build, broken in r290612

Approved by: adrian

9 years agoIntroduce portal group options in ctl.conf.
mav [Mon, 9 Nov 2015 18:33:36 +0000 (18:33 +0000)]
Introduce portal group options in ctl.conf.

While CTL has concept of port options, used at least for iSCSI ports now,
before this change it was impossible to set them manually.  There still
no user-configurable port options now, but I am planning to change that.

9 years agoNow that the PMU implementation is independent of HWPMC
bz [Mon, 9 Nov 2015 17:57:32 +0000 (17:57 +0000)]
Now that the PMU implementation is independent of HWPMC
as of r288992 use it to manage the CCNT.

Use the CNNT for get_cyclecount() instead of binuptime() when device pmu
is compiled in; if it fails to attach, fall back to the former method.

Enable by default for the BeagleBoneBlack configuration.

Optained from: Cambridge/L41
Sponsored by: DARPA/AFRL
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D3837

9 years agolinuxkpi/sysfs.h: Cast arg2 through intptr_t to avoid GCC warning
cem [Mon, 9 Nov 2015 16:50:42 +0000 (16:50 +0000)]
linuxkpi/sysfs.h: Cast arg2 through intptr_t to avoid GCC warning

The code compiles fine under Clang, but GCC on PPC is less permissive about
integer and pointer sizes.  (An intmax_t is clearly *large enough* to hold a
pointer value.)

Another follow-up to r290475.

Reported by: jhibbits
Sponsored by: EMC / Isilon Storage Division

9 years agoath(4): begin fleshing out a "reset type" extension to force cold/warn resets.
adrian [Mon, 9 Nov 2015 15:59:42 +0000 (15:59 +0000)]
ath(4): begin fleshing out a "reset type" extension to force cold/warn resets.

Right now the only way to force a cold reset is:

* The HAL itself detects it's needed, or
* The sysctl, setting all resets to be cold.

Trouble is, cold resets take quite a bit longer than warm resets.

However, there are situations where a cold reset would be nice.
Specifically, after a stuck beacon, BB/MAC hang, stuck calibration results,
etc.

The vendor HAL has a separate method to set the reset reason (which is
how HAL_RESET_BBPANIC gets set) which informs the HAL during the reset path
why it occured.  This is almost but not quite the same; I may eventually
unify both approaches in the future.

This commit just extends HAL_RESET_TYPE to include both status (eg BBPANIC)
and type (eg do COLD.)  None of the HAL code uses it yet though;  that'll
come later.

It also is a big no-op in each HAL - I need to go teach each of the HALs
about cold/warm reset through this path.

9 years agoxen-blkfront: add support for unmapped IO
royger [Mon, 9 Nov 2015 12:22:44 +0000 (12:22 +0000)]
xen-blkfront: add support for unmapped IO

Using unmapped IO is really beneficial when running inside of a VM,
since it avoids IPIs to other vCPUs in order to invalidate the
mappings.

This patch adds unmapped IO support to blkfront. The following tests
results have been obtained when running on a Xen host without HAP:

PVHVM
     3165.84 real      6354.17 user      4483.32 sys
PVHVM with unmapped IO
     2099.46 real      4624.52 user      2967.38 sys

This is because when running using shadow page tables TLB flushes and
range invalidations are much more expensive, so using unmapped IO
provides a very important performance boost.

Sponsored by: Citrix Systems R&D
MFC after: 2 weeks
X-MFC-with: r290610

dev/xen/blkfront/blkfront.c:
 - Add and announce support for unmapped IO.

9 years agox86/dma_bounce: rework _bus_dmamap_load_ma implementation
royger [Mon, 9 Nov 2015 12:19:58 +0000 (12:19 +0000)]
x86/dma_bounce: rework _bus_dmamap_load_ma implementation

The implementation of bus_dmamap_load_ma_triv currently calls
_bus_dmamap_load_phys on each page that is part of the passed in buffer.
Since each page is treated as an individual buffer, the resulting behaviour
is different from the behaviour of _bus_dmamap_load_buffer. This breaks
certain drivers, like Xen blkfront.

If an unmapped buffer of size 4096 that starts at offset 13 into the first
page is passed to the current _bus_dmamap_load_ma implementation (so the ma
array contains two pages), the result is that two segments are created, one
with a size of 4083 and the other with size 13 (because two independant
calls to _bus_dmamap_load_phys are performed, one for each physical page).
If the same is done with a mapped buffer and calling _bus_dmamap_load_buffer
the result is that only one segment is created, with a size of 4096.

This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce
buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements
_bus_dmamap_load_ma so that it's behaviour is the same as the mapped version
(_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer
code, other arches are left untouched.

Sponsored by: Citrix Systems R&D
Reviewed by: kib, jah (previous version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D888

9 years agoBump .Dd
ngie [Mon, 9 Nov 2015 10:41:27 +0000 (10:41 +0000)]
Bump .Dd

9 years agoDocument powl(3)
ngie [Mon, 9 Nov 2015 10:40:16 +0000 (10:40 +0000)]
Document powl(3)

PR: 191751
Sponsored by: EMC / Isilon Storage Division

9 years agoDecompose arp_ifinit() into arp_add_ifa_lle() and arp_announce_ifaddr().
melifaro [Mon, 9 Nov 2015 10:35:33 +0000 (10:35 +0000)]
Decompose arp_ifinit() into arp_add_ifa_lle() and arp_announce_ifaddr().
Rename arp_ifinit2() into arp_announce_ifaddr().

Eliminate zeroing ifa_rtrequest: it was used for calling arp_rtrequest()
which was responsible for handling route cloning requests. It became
obsolete since r186119 (L2/L3 split).

9 years agoUse lladdr_event to propagate gratiotus arp.
melifaro [Mon, 9 Nov 2015 10:11:14 +0000 (10:11 +0000)]
Use lladdr_event to propagate gratiotus arp.

Differential Revision: https://reviews.freebsd.org/D4019

9 years agoBump .Dd
ngie [Mon, 9 Nov 2015 09:39:59 +0000 (09:39 +0000)]
Bump .Dd

9 years agoFollow up to r290259 dealing with makefs(8)
ngie [Mon, 9 Nov 2015 09:39:07 +0000 (09:39 +0000)]
Follow up to r290259 dealing with makefs(8)

- Don't use contractions (don't -> do not)
- Change "throw away" to "discard" when describing the -o keep-bad-images option
- Revert author e-mail split I brought over from NetBSD, effectively reverting
  the change bapt made in r267668

MFC after: 3 days
Submitted by: bjk
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove noatime from tmpfs(5) fstab(5) entry.
gjb [Mon, 9 Nov 2015 06:30:26 +0000 (06:30 +0000)]
Remove noatime from tmpfs(5) fstab(5) entry.

Submitted by: Howard Su
MFC after: 3 days
X-MFC-With: r290550
Sponsored by: The FreeBSD Foundation

9 years agoIntegrate tools/regression/lib/libc/gen into the FreeBSD test suite
ngie [Mon, 9 Nov 2015 06:24:11 +0000 (06:24 +0000)]
Integrate tools/regression/lib/libc/gen into the FreeBSD test suite
as lib/libc/tests/gen

The code in test-fnmatch that was used for generating:

- bin/sh/tests/builtins/case2.0
- bin/sh/tests/builtins/case3.0

has been left undisturbed. The target `make sh-tests` has been moved over
from tools/regression/lib/libc/gen/Makefile to
lib/libc/tests/gen/Makefile and made into a PHONY target

case2.0 and case3.0 test input generation isn't being done automatically.
This needs additional discussion.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix some TAP -> ATF conversion errors
ngie [Mon, 9 Nov 2015 06:16:38 +0000 (06:16 +0000)]
Fix some TAP -> ATF conversion errors

- Remove a leftover printf from when this was a TAP based testcase
- Catch mmap failures properly

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoReduce the Makefile snippet complexity a bit
ngie [Mon, 9 Nov 2015 02:29:38 +0000 (02:29 +0000)]
Reduce the Makefile snippet complexity a bit

- Set BINDIR to TESTSDIR globally (and subsequently, remove all
  `${FILESGROUP}DIR` setting because BINDIR is set to `TESTSDIR`)
- Set MAN to "" globally, instead of per-PROG

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix typo in message from arm64 ITS workaround
emaste [Mon, 9 Nov 2015 01:49:25 +0000 (01:49 +0000)]
Fix typo in message from arm64 ITS workaround

9 years agoAdd some basic tests that exercise cputime limits with limits(1)
ngie [Mon, 9 Nov 2015 01:05:31 +0000 (01:05 +0000)]
Add some basic tests that exercise cputime limits with limits(1)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Although it doesn't make a whole lot of sense to enable RX and TX
marius [Mon, 9 Nov 2015 00:19:04 +0000 (00:19 +0000)]
- Although it doesn't make a whole lot of sense to enable RX and TX
  before their initial configuration is done, it turns out that r281337
  has the inverse effect on some older chips. Moreover, as with newer
  chips before, two chips seemingly identical according to their MAC
  revisions may behave differently in this regard, with most working
  but a few not, making changes extremely hard to test.
  Closer inspection of the corresponding Linux code suggests that RX
  and TX should only be enabled after their initial configuration with
  RTL8168G and later chips, i. e. RTL8106E{,US}, RTL8107E, as well as
  RTL8168{EP,G,GU,H}, so limit the new code path to these. [1]
- Distinguish between RTL8168H and RTL8107E, with the latter being the
  10/100-Mbit/s-only variant of the former.
- For MAC variants that can only do Fast Ethernet at a maximum, ensure
  that we don't advertise Gigabit Ethernet speed.
- In re_stop(), do the inverse of re_init_locked() and enable RXDV
  gate on RTL8168G and later chips again, matching what Linux does.

PR: 203422 [1]
MFC after: 1 week

9 years agoEnsure TEMPROOT is unique, to guard against multiple builds on same machine.
sjg [Sun, 8 Nov 2015 23:46:05 +0000 (23:46 +0000)]
Ensure TEMPROOT is unique, to guard against multiple builds on same machine.

Differential Revision: D3002
Reviewed by: gjb

9 years agourtwn(4): improve RX filter.
avos [Sun, 8 Nov 2015 23:21:54 +0000 (23:21 +0000)]
urtwn(4): improve RX filter.

- Filter out unneeded frames in STA mode.
- Implement ic_promisc() call.

Tested with RTL8188EU, STA and MONITOR modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3999

9 years agoIntegrate tools/regression/lib/libc/net into the FreeBSD test suite
ngie [Sun, 8 Nov 2015 23:06:40 +0000 (23:06 +0000)]
Integrate tools/regression/lib/libc/net into the FreeBSD test suite
as lib/libc/tests/net

Also, fix eui64_aton_test:test_str(..). The test was comparing the result
of eui64_aton to a pointer of the expected result.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agolower again the warnings and remove the pragmas unsupported by gcc 4.2.1
bapt [Sun, 8 Nov 2015 22:23:21 +0000 (22:23 +0000)]
lower again the warnings and remove the pragmas unsupported by gcc 4.2.1

9 years agoDelete leftover printfs from when these were TAP tests
ngie [Sun, 8 Nov 2015 21:57:35 +0000 (21:57 +0000)]
Delete leftover printfs from when these were TAP tests

MFC after: 1 week
X-MFC with: r290532
Sponsored by: EMC / Isilon Storage Division

9 years agoConvert print_positional_test over to ATF
ngie [Sun, 8 Nov 2015 21:38:46 +0000 (21:38 +0000)]
Convert print_positional_test over to ATF

Somehow missed in r290537

X-MFC with: r290537
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoEliminate some gcc pragmas
bapt [Sun, 8 Nov 2015 21:22:24 +0000 (21:22 +0000)]
Eliminate some gcc pragmas

9 years agoSync arm64 GENERIC whitespace/comments with amd64
emaste [Sun, 8 Nov 2015 21:08:31 +0000 (21:08 +0000)]
Sync arm64 GENERIC whitespace/comments with amd64

Sponsored by: The FreeBSD Foundation

9 years agoImprove r290373, do a runtime check rather than a compile time switch. I
andreast [Sun, 8 Nov 2015 21:06:51 +0000 (21:06 +0000)]
Improve r290373, do a runtime check rather than a compile time switch. I
learned that the Power8 and the PS3 have a mix of OFW and FDT. Both have AIM
defined. But currently they are not affected. They have no I2C devices under
OFW.

This version was tested on a Quad G5 and build tested for armv6*.

Discussed with nwhitehorn@
Reviewed by: ian@

9 years agoarm64: build usr.sbin/acpi subdirectory
emaste [Sun, 8 Nov 2015 20:56:04 +0000 (20:56 +0000)]
arm64: build usr.sbin/acpi subdirectory

The arm64 platform will in general use ACPI so we want these tools built
there.

Sponsored by: The FreeBSD Foundation

9 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sun, 8 Nov 2015 19:29:34 +0000 (19:29 +0000)]
drm/i915: Reduce diff with Linux 3.8

There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.

MFC after: 2 months

9 years agoModify the tool that generates the locales so that the generated CJK locales
bapt [Sun, 8 Nov 2015 19:08:38 +0000 (19:08 +0000)]
Modify the tool that generates the locales so that the generated CJK locales
are padded as expected by the users

Submitted by: marino
Obtained from: DragonflyBSD

9 years agoFix pagelist bus_dmamap_t map handling. Memory for pagelist is allocated
skra [Sun, 8 Nov 2015 18:48:35 +0000 (18:48 +0000)]
Fix pagelist bus_dmamap_t map handling. Memory for pagelist is allocated
by bus_dmamem_alloc() which creates associated bus_dmamap_t map for us.
When this memory is freed by bus_dmamem_free(), the map is freed as well.

Thus there is no need to free it explicitly by bus_dmamap_destroy(),
which leads to double freeing.

Discussed with: gonzo
Approved by: kib (mentor)

9 years agoMake naming more consistent; no functional changes.
trasz [Sun, 8 Nov 2015 18:11:24 +0000 (18:11 +0000)]
Make naming more consistent; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoSpeed up rctl(8) rule retrieval; the difference shows mostly in "rctl -n",
trasz [Sun, 8 Nov 2015 18:08:31 +0000 (18:08 +0000)]
Speed up rctl(8) rule retrieval; the difference shows mostly in "rctl -n",
as otherwise most of the time is spent resolving UIDs to names.

Reviewed by: mjg@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4059

9 years agoUse tmpfs(5) instead of md(4) for '/tmp' mount.
gjb [Sun, 8 Nov 2015 18:02:39 +0000 (18:02 +0000)]
Use tmpfs(5) instead of md(4) for '/tmp' mount.

Submitted by: Nikolai Lifanov
Differential Revision: D3506
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoReorganize code to elimitate one _sseek() call for append modes.
ache [Sun, 8 Nov 2015 18:00:44 +0000 (18:00 +0000)]
Reorganize code to elimitate one _sseek() call for append modes.

MFC after:      1 week

9 years agoUserspace part of reroot support. This makes it possible to change
trasz [Sun, 8 Nov 2015 17:33:48 +0000 (17:33 +0000)]
Userspace part of reroot support. This makes it possible to change
the root filesystem without full reboot, using "reboot -r". This can
be used to to eg. boot from a temporary md_image preloaded by loader(8),
setup an iSCSI session, and continue booting from rootfs mounted over
iSCSI.

Reviewed by: kib@, bapt@
MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3693