]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRevert r301137 and r301163, and implement a correct fix
Glen Barber [Wed, 1 Jun 2016 20:44:28 +0000 (20:44 +0000)]
Revert r301137 and r301163, and implement a correct fix
for the CONFS issue with dma.conf and ppp.conf.

Thank you very much to Bryan Drewery for looking into the
problem and providing this fix.

Pointyhat: gjb
Sponsored by: The FreeBSD Foundation

8 years agoIf the fast path unbusy in vm_page_replace() fails, slow path needs to
Konstantin Belousov [Wed, 1 Jun 2016 20:39:00 +0000 (20:39 +0000)]
If the fast path unbusy in vm_page_replace() fails, slow path needs to
acquire the page lock, which recurses.  Avoid the recursion by reusing
the code from vm_page_remove() in a new helper
vm_page_xunbusy_maybelocked().

Reviewed by: alc
Sponsored by: The FreeBSD Foundation

8 years agoImplement a hack to re-enable installation of the dma.conf.
Glen Barber [Wed, 1 Jun 2016 20:06:55 +0000 (20:06 +0000)]
Implement a hack to re-enable installation of the dma.conf.

The 'CONFS' entries in share/mk/bsd.confs.mk explicitly check
for the 'installconfig', but does not behave properly with the
'distribute' target.

This seems to be related to the previously-reported issues
with files within /etc in the past.

Reported by: Ben Woods
Sponsored by: The FreeBSD Foundation

8 years agoReplace constant expressions that contain multiplications by
Don Lewis [Wed, 1 Jun 2016 20:04:24 +0000 (20:04 +0000)]
Replace constant expressions that contain multiplications by
fractional floating point values with integer divides.  This will
eliminate any chance that the compiler will generate code to evaluate
the expression using floating point at runtime.

Suggested by: bde
Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
MFC after: 8 days (with r300779 and r300949)

8 years agoFix the library name.
Mariusz Zaborski [Wed, 1 Jun 2016 19:54:17 +0000 (19:54 +0000)]
Fix the library name.

Reviewed by: bdrewery

8 years agops(1): Expand variables to match expanded fields
Conrad Meyer [Wed, 1 Jun 2016 19:54:05 +0000 (19:54 +0000)]
ps(1): Expand variables to match expanded fields

ki_flag and ki_tdflag have been 'long', not 'int', since 2000 and 2005,
respectively.

Submitted by: Shawn Wills <swills at isilon dot com>
Sponsored by: EMC / Isilon Storage Division

8 years agoDocument behavior of wait introduced in the r286698.
Mariusz Zaborski [Wed, 1 Jun 2016 19:49:38 +0000 (19:49 +0000)]
Document behavior of wait introduced in the r286698.

Suggested by: glebius
Reviewed by: wblock, bjk
Differential Revision: https://reviews.freebsd.org/D6080

8 years agoiw_cxgbe: Fix panic that occurs when c4iw_ev_handler tries to acquire
Navdeep Parhar [Wed, 1 Jun 2016 18:46:54 +0000 (18:46 +0000)]
iw_cxgbe: Fix panic that occurs when c4iw_ev_handler tries to acquire
comp_handler_lock but c4iw_destroy_cq has already freed the CQ memory
(which is where the lock resides).

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

8 years agoMicrooptimize locking primitives by avoiding unnecessary atomic ops.
Mateusz Guzik [Wed, 1 Jun 2016 18:32:20 +0000 (18:32 +0000)]
Microoptimize locking primitives by avoiding unnecessary atomic ops.

Inline version of primitives do an atomic op and if it fails they fallback to
actual primitives, which immediately retry the atomic op.

The obvious optimisation is to check if the lock is free and only then proceed
to do an atomic op.

Reviewed by: jhb, vangyzen

8 years agoThe (i < PROMPTLEN - 1) test added by r300442 in the code for the default
Don Lewis [Wed, 1 Jun 2016 16:56:29 +0000 (16:56 +0000)]
The (i < PROMPTLEN - 1) test added by r300442 in the code for the default
case of \c in the prompt format string is a no-op.  We already passed
this test at the top of the loop, and i has not yet been incremented in
this path.  Change this test to (i < PROMPTLEN - 2).

Reported by: Coverity
CID: 1008328
Reviewed by: cem
MFC after: 1 week

8 years agosed(1): Fix a mismatch and sync with the OpenBSD's commit.
Pedro F. Giffuni [Wed, 1 Jun 2016 16:53:02 +0000 (16:53 +0000)]
sed(1): Fix a mismatch and sync with the OpenBSD's commit.

This was causing some strange behaviour.

Reported by: olivier
Obtained from: OpenBSD (CVS rev. 1.28)

8 years agoRevert r289096:
Glen Barber [Wed, 1 Jun 2016 16:45:08 +0000 (16:45 +0000)]
Revert r289096:

Files listed in 'CONFS' are not properly included in new
installations (missing from base.txz), for reasons I still
do not fully understand.

This reverts the change excluding /etc/ppp/ppp.conf from
a new installation.  /etc/dma/dma.conf is also affected,
but requires a different solution, still being investigated.

Reported by: Ben Woods
Sponsored by: The FreeBSD Foundation

8 years agolibthr: Use formatted PANIC()
Conrad Meyer [Wed, 1 Jun 2016 16:12:26 +0000 (16:12 +0000)]
libthr: Use formatted PANIC()

No functional change, although _thread_printf() may be slightly less functional
or render some values differently from libc snprintf(3).  No ABI change.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6672

8 years agolibthr: _thread_vprintf: Enhance support for %p, %#x
Conrad Meyer [Wed, 1 Jun 2016 16:11:09 +0000 (16:11 +0000)]
libthr: _thread_vprintf: Enhance support for %p, %#x

No functional change.  No ABI change.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6672

8 years agolibthr: Add vprintf variant of _thread_printf, formatted PANIC()
Conrad Meyer [Wed, 1 Jun 2016 16:09:56 +0000 (16:09 +0000)]
libthr: Add vprintf variant of _thread_printf, formatted PANIC()

No ABI change.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6672

8 years ago[ath_hal] add azimuth timestamp payload marking for AR9380 and later chips.
Adrian Chadd [Wed, 1 Jun 2016 15:56:07 +0000 (15:56 +0000)]
[ath_hal] add azimuth timestamp payload marking for AR9380 and later chips.

8 years agourtwn: unbreak CTS-to-self protection mode.
Andriy Voskoboinyk [Wed, 1 Jun 2016 15:47:19 +0000 (15:47 +0000)]
urtwn: unbreak CTS-to-self protection mode.

Do not set HWRTSEN bit when CTS-to-self is used; CTS2SELF bit triggers
CTS frame transmission by itself (and it does not work when HWRTSEN bit
is set).

Tested with:
 * RTL8188CUS, HOSTAP mode (11g)
 * RTL8188EU, STA mode (11g)

8 years agoFix tzsetup not installing /etc/localtime for UTC
Steven Hartland [Wed, 1 Jun 2016 15:39:11 +0000 (15:39 +0000)]
Fix tzsetup not installing /etc/localtime for UTC

If tzsetup UTC is run then it successfully configured the system for UTC
including installing /etc/localtime however if the user ran just tzsetup
for interactive configuration and select UTC no /etc/localtime was installed
which resulted in failures for utilities which require said file.

Change set_zone_utc to call install_zoneinfo("UTC") to ensure that
/etc/localtime is created for interactive UTC selection.

Users who have previously run tzsetup in interactive mode and select UTC
can install the missing /etc/localtime by running tzsetup -r.

Also correct static miss-match for set_zone_utc.

MFC after: 2 weeks
Relnotes: Yes
Sponsored by: Multiplay

8 years agoEnable filemon on all architectures.
Bryan Drewery [Wed, 1 Jun 2016 15:19:49 +0000 (15:19 +0000)]
Enable filemon on all architectures.

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

8 years agourtwn: fix non-ERP BSS detection in HOSTAP mode.
Andriy Voskoboinyk [Wed, 1 Jun 2016 14:57:53 +0000 (14:57 +0000)]
urtwn: fix non-ERP BSS detection in HOSTAP mode.

Receive all beacons in HOSTAP mode; they will give more information about
present non-ERP / legacy BSSs (used to choose protection mode).

Tested with RTL8188CUS (HOSTAP, urtwn) + RTL8821AU (HOSTAP, 11b mode).

8 years agosfxge(4): cleanup: remove unused variables in common code
Andrew Rybchenko [Wed, 1 Jun 2016 14:16:16 +0000 (14:16 +0000)]
sfxge(4): cleanup: remove unused variables in common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoAdd support for loadable kernel modules.
Ruslan Bukin [Wed, 1 Jun 2016 14:12:31 +0000 (14:12 +0000)]
Add support for loadable kernel modules.

Submitted by: Yukishige Shibata <y-shibat@mtd.biglobe.ne.jp>

8 years agosfxge(4): cleanup: add missing space after if keyword
Andrew Rybchenko [Wed, 1 Jun 2016 14:11:40 +0000 (14:11 +0000)]
sfxge(4): cleanup: add missing space after if keyword

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoBuild riscv modules as PIC.
Ruslan Bukin [Wed, 1 Jun 2016 14:05:32 +0000 (14:05 +0000)]
Build riscv modules as PIC.

Submitted by: Yukishige Shibata <y-shibat@mtd.biglobe.ne.jp>

8 years agoAdd a riscv define.
Ruslan Bukin [Wed, 1 Jun 2016 14:03:13 +0000 (14:03 +0000)]
Add a riscv define.

Submitted by: Yukishige Shibata <y-shibat@mtd.biglobe.ne.jp>

8 years agosfxge(4): set moderation in efx_ev_qcreate
Andrew Rybchenko [Wed, 1 Jun 2016 14:03:07 +0000 (14:03 +0000)]
sfxge(4): set moderation in efx_ev_qcreate

This simplifies setting an initial interrupt moderation value, and
avoids most calls to evx_ev_qmoderate from contexts where MCDI is
not allowed (MCDI is need for an EVQ timer workaround in a later patch).

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6673

8 years agoDon't build some modules on RISC-V.
Ruslan Bukin [Wed, 1 Jun 2016 13:43:43 +0000 (13:43 +0000)]
Don't build some modules on RISC-V.

Submitted by: Yukishige Shibata <y-shibat@mtd.biglobe.ne.jp>

8 years ago* Enable KDTRACE options as we support DTrace now.
Ruslan Bukin [Wed, 1 Jun 2016 12:19:00 +0000 (12:19 +0000)]
* Enable KDTRACE options as we support DTrace now.
* Add bpf device to kernel config.

8 years agoReduce the priority of cxgbei(4) driver, so it doesn't get chosen
Edward Tomasz Napierala [Wed, 1 Jun 2016 12:04:04 +0000 (12:04 +0000)]
Reduce the priority of cxgbei(4) driver, so it doesn't get chosen
by default.  This is a workaround for a too simplistic ICL module
choosing mechanism.  To use it, specify offload in ctl.conf
or iscsi.conf.

This fixes a problem where "kldload cxgbei" wedges the iSCSI stack,
if you don't have a Chelsio card installed, or the endpoints of the
iSCSI session are not reachable through addresses configured
on that interface.

Reviewed by: np@
MFC after: 1 month

8 years agoDescribe default value for "offload".
Edward Tomasz Napierala [Wed, 1 Jun 2016 11:45:06 +0000 (11:45 +0000)]
Describe default value for "offload".

MFC after: 1 month

8 years agoDon't use fixup for C99 and up, the compiler result is already correct.
Andrey A. Chernov [Wed, 1 Jun 2016 10:14:25 +0000 (10:14 +0000)]
Don't use fixup for C99 and up, the compiler result is already correct.

Suggested by: bde

MFC after:      1 week

8 years agoThe pr_destroy field does not allow us to run the teardown code in a
Bjoern A. Zeeb [Wed, 1 Jun 2016 10:14:04 +0000 (10:14 +0000)]
The pr_destroy field does not allow us to run the teardown code in a
specific order.  VNET_SYSUNINITs however are doing exactly that.
Thus remove the VIMAGE conditional field from the domain(9) protosw
structure and replace it with VNET_SYSUNINITs.
This also allows us to change some order and to make the teardown functions
file local static.
Also convert divert(4) as it uses the same mechanism ip(4) and ip6(4) use
internally.

Slightly reshuffle the SI_SUB_* fields in kernel.h and add a new ones, e.g.,
for pfil consumers (firewalls), partially for this commit and for others
to come.

Reviewed by: gnn, tuexen (sctp), jhb (kernel.h)
Obtained from: projects/vnet
MFC after: 2 weeks
X-MFC: do not remove pr_destroy
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6652

8 years agohyperv: Rename some cleaned up/almost cleaned up files
Sepherosa Ziehau [Wed, 1 Jun 2016 09:20:52 +0000 (09:20 +0000)]
hyperv: Rename some cleaned up/almost cleaned up files

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoReturn real error value instead of hard-coded ENXIO (fix after r300149)
Zbigniew Bodek [Wed, 1 Jun 2016 08:20:10 +0000 (08:20 +0000)]
Return real error value instead of hard-coded ENXIO (fix after r300149)

It is possible to return real error value in case of gic_v3_attach()
failure instead of hard-coded ENXIO.

Obtained from: Semihalf
Sponsored by: Cavium

8 years agoDefine the id_t type as required by POSIX.
Ed Schouten [Wed, 1 Jun 2016 07:45:03 +0000 (07:45 +0000)]
Define the id_t type as required by POSIX.

It seems that all versions of POSIX that I could find require that
<sys/resource.h> defines id_t. Define it together with rlim_t. While
there, move these typedefs closer to the top of the header file, right
after the includes, which we do in most other header files.

8 years agohyperv/channel: Only cpu0 is supported as channel target cpu on WIN7
Sepherosa Ziehau [Wed, 1 Jun 2016 07:11:54 +0000 (07:11 +0000)]
hyperv/channel: Only cpu0 is supported as channel target cpu on WIN7

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/vmbus: Redefine event flags.
Sepherosa Ziehau [Wed, 1 Jun 2016 06:51:44 +0000 (06:51 +0000)]
hyperv/vmbus: Redefine event flags.

- Nuke unnecessary union.
- Avoid convoluted macro indirection.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6671

8 years agosfxge(4): cope with code duplication on SW events composition
Andrew Rybchenko [Wed, 1 Jun 2016 06:51:19 +0000 (06:51 +0000)]
sfxge(4): cope with code duplication on SW events composition

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D6666

8 years agoFix missing space in mandoc syntax
Allan Jude [Wed, 1 Jun 2016 06:18:34 +0000 (06:18 +0000)]
Fix missing space in mandoc syntax

Reported by: rpokala

8 years agobge: Force chipid to 5720 A0 for 5717 C0 in an early place
Sepherosa Ziehau [Wed, 1 Jun 2016 05:15:11 +0000 (05:15 +0000)]
bge: Force chipid to 5720 A0 for 5717 C0 in an early place

Discussed with: yongari
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoDon't rely on $ntpd_enable to periodically fetch the latest
Cy Schubert [Wed, 1 Jun 2016 04:37:43 +0000 (04:37 +0000)]
Don't rely on $ntpd_enable to periodically fetch the latest
leapfile.

Suggested by: cperciva
MFC after: 1 week

8 years agoTurn off nfsv4acls for arm/armv6 builds, which has an impact
Glen Barber [Wed, 1 Jun 2016 04:18:55 +0000 (04:18 +0000)]
Turn off nfsv4acls for arm/armv6 builds, which has an impact
on performance, especially with SD cards on certain SoCs.

Requested by: trasz
Discussed with: ian, kientzle

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

8 years ago[ath_hal] implement shared PA handling checks, based on ath9k.
Adrian Chadd [Wed, 1 Jun 2016 03:49:22 +0000 (03:49 +0000)]
[ath_hal] implement shared PA handling checks, based on ath9k.

These are apparently conditional on there being a shared PA/LNA, which
at least on AR9462/QCA9535 devices I have isn't a thing.

I'm .. not yet sure which devices it /is/ a thing, so I'll come back
to that.

Tested:

* QCA9565 STA + bluetooth

Obtained from: Linux ath9k

8 years agoUpdate zfs(8) and zpool-features(7) man pages with new hashing algorithms
Allan Jude [Wed, 1 Jun 2016 03:36:31 +0000 (03:36 +0000)]
Update zfs(8) and zpool-features(7) man pages with new hashing algorithms

Sponsored by: ScaleEngine Inc.

8 years ago[ath_hal] add MCI bits from ath9k for QCA9565
Adrian Chadd [Wed, 1 Jun 2016 03:27:33 +0000 (03:27 +0000)]
[ath_hal] add MCI bits from ath9k for QCA9565

* Add extra debugging - the weights debugging is really useful to ensure
  things are programmed into the wlan coexistence table.  The weights are
  what traffic priority each of the various modes get (tx, tx-high-priority,
  rx-beacon, etc) if they're all zero, things work very poorly.

* Add in coex init routines from ath9k for AR9462 and QCA9565 1ANT and 2ANT.
  This control things like beacon stomping, ACK handling, antennas, PA/LNA
  shared, etc.

* Some ancillary bits.

TODO:

* There's some conditional stuff around MCI_ANT_ARCH_PA_LNA_SHARED() in ath9k
  which doesn't always enable force-on LNA.  That'll have to be examined
  and merged in as appropriate.

Obtained from: linux ath9k

8 years ago[ath_hal] add support for QCA9565 for configuring the bluetooth antenna LNA diversity.
Adrian Chadd [Wed, 1 Jun 2016 03:24:53 +0000 (03:24 +0000)]
[ath_hal] add support for QCA9565 for configuring the bluetooth antenna LNA diversity.

Notably, this also sets AR_BTCOEX_WL_LNADIV to FORCE_ON, so LNA diversity
is always enabled and under control of the wifi chip.

Tested:

* QCA9565, STA + bluetooth mode

Obtained from: Linux ath9k

8 years ago[ath_hal] Allow the BT antenna diversity option to be enabled for QCA9565.
Adrian Chadd [Wed, 1 Jun 2016 03:21:23 +0000 (03:21 +0000)]
[ath_hal] Allow the BT antenna diversity option to be enabled for QCA9565.

Obtained from: Linux ath9k

8 years ago[ath_hal] add QCA9565 bluteooth antenna control.
Adrian Chadd [Wed, 1 Jun 2016 03:20:55 +0000 (03:20 +0000)]
[ath_hal] add QCA9565 bluteooth antenna control.

This configures the LNA antenna diversity control, which should be on
if wlan owns the LNA for bluetooth coexistence.  Otherwise, make sure
it's off.

I think this is eventually intended to allow 1-antenna bluetooth +
wifi setups for QCA9565, but I'm not sure where that's actually configured
in ath9k.

Obtained from: Linux ath9k

8 years ago[ath_hal] add extra debugging for MCI interrupts.
Adrian Chadd [Wed, 1 Jun 2016 03:17:36 +0000 (03:17 +0000)]
[ath_hal] add extra debugging for MCI interrupts.

8 years agomkimg: Indicate that input file pages are unlikely to be reused.
Mark Johnston [Wed, 1 Jun 2016 02:30:06 +0000 (02:30 +0000)]
mkimg: Indicate that input file pages are unlikely to be reused.

mkimg(1) uses a swap file to back input file chunks. When the output file
is being written out, blocks of the swap file are mapped and their contents
copied. This causes the backing VM pages to enter the active queue, and when
the output file is large relative to system memory (as is generally the
case), can result in a shortfall of inactive memory. This causes the
pagedaemon to aggressively scan the active queue and swap out process
memory in an attempt to meet the shortfall. Because mkimg's input files
are typically the intermediate result of some build process, there's no
need to push them all through the active queue. Use madvise(2) to indicate
that the backing pages may be reclaimed in preference to active pages. In
the case of the swap file, these pages will be freed as soon as mkimg
exits anyway.

When using mkimg on a desktop-class system with large amounts of dirty
process memory, this change substantially improves mkimg runtime and
reduces swap usage.

Reviewed by: marcel
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6654

8 years ago[ath_hal] add extra MCI definitions used by the later chips (QCA9565/Aphrodite).
Adrian Chadd [Wed, 1 Jun 2016 01:43:46 +0000 (01:43 +0000)]
[ath_hal] add extra MCI definitions used by the later chips (QCA9565/Aphrodite).

Obtained from: Linux ath9k

8 years agoWITH_META_MDE: Fix machine/include and x86/include issues.
Bryan Drewery [Tue, 31 May 2016 23:40:21 +0000 (23:40 +0000)]
WITH_META_MDE: Fix machine/include and x86/include issues.

- Fixes 'ln: File exists' errors.
- Fixes creating include directories in the source directory as well.

Sponsored by: EMC / Isilon Storage Division

8 years agoCoverity fixes for r300906
Alan Somers [Tue, 31 May 2016 23:26:45 +0000 (23:26 +0000)]
Coverity fixes for r300906

lib/libdevdctl/consumer.cc
In Consumer::DisconnectFromDevd, don't close the socket if it's
already closed.

cddl/usr.sbin/zfsd/case_file.cc
lib/libdevdctl/consumer.h
Delete dead code leftover from before devd(8) gained SOCK_SEQPACKET
support

Reported by: Coverity
CID: 13561551356169
Sponsored by: Spectra Logic Corp

8 years agoDefine SYSDIR earlier since the defined(FIRMWS) block depends on it.
Bryan Drewery [Tue, 31 May 2016 23:14:15 +0000 (23:14 +0000)]
Define SYSDIR earlier since the defined(FIRMWS) block depends on it.

It uses it in a dependency, which won't work if it is not yet defined.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missed updates for r301079 and r301084.
Bryan Drewery [Tue, 31 May 2016 23:12:43 +0000 (23:12 +0000)]
Add missed updates for r301079 and r301084.

8 years agoWITH_META_MODE: Resolve SYSDIR to avoid changed build commands.
Bryan Drewery [Tue, 31 May 2016 23:08:43 +0000 (23:08 +0000)]
WITH_META_MODE: Resolve SYSDIR to avoid changed build commands.

Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Require filemon(4) be loaded.
Bryan Drewery [Tue, 31 May 2016 22:37:11 +0000 (22:37 +0000)]
WITH_META_MODE: Require filemon(4) be loaded.

Since META_MODE is being sold and used as a working incremental build, it won't
make much sense if filemon data is excluded.  There is no way to recover
from that in a subsequent build.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix a crash while iterating compat strings when no match is found.
Jared McNeill [Tue, 31 May 2016 21:58:09 +0000 (21:58 +0000)]
Fix a crash while iterating compat strings when no match is found.

Spotted by: ian

8 years agoMake RLIM_INFINITY usable without including <stdint.h>.
Ed Schouten [Tue, 31 May 2016 21:34:02 +0000 (21:34 +0000)]
Make RLIM_INFINITY usable without including <stdint.h>.

By using __uint64_t instead of uint64_t, this constant can also be used
if <sys/resource.h> is included on its own.

8 years agozfsd: Remove a redundant semicolon,
Pedro F. Giffuni [Tue, 31 May 2016 21:23:57 +0000 (21:23 +0000)]
zfsd: Remove a redundant semicolon,

8 years agoWITH_META_MODE: Mitigate switching from without to with META_MODE.
Bryan Drewery [Tue, 31 May 2016 21:22:19 +0000 (21:22 +0000)]
WITH_META_MODE: Mitigate switching from without to with META_MODE.

Adding .META to targets-to-build will ensure that they will rebuild if there
is no .meta file.

Adding it to all SUFFIXES and objects ensures that at least objects will
rebuild if there is no .meta file.

This will be reverted if bmake's behavior changes to rebuild on missing .meta
files.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove mentions that PTHREAD_PROCESS_SHARED is not supported from man pages.
Jilles Tjoelker [Tue, 31 May 2016 21:16:34 +0000 (21:16 +0000)]
Remove mentions that PTHREAD_PROCESS_SHARED is not supported from man pages.

Also add support for process-shared synchronization objects to the HISTORY
sections where they already exist.

8 years agoFix typo ESRC -> ESRCH in pthread man pages.
Jilles Tjoelker [Tue, 31 May 2016 21:09:42 +0000 (21:09 +0000)]
Fix typo ESRC -> ESRCH in pthread man pages.

8 years agosfxge(4): avoid code duplication in SW events definition
Andrew Rybchenko [Tue, 31 May 2016 20:54:42 +0000 (20:54 +0000)]
sfxge(4): avoid code duplication in SW events definition

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D6662

8 years agoAdd missing dependency on <machine/param.h>.
Ed Schouten [Tue, 31 May 2016 19:24:32 +0000 (19:24 +0000)]
Add missing dependency on <machine/param.h>.

The SHMLBA definition provided by this header file is defined as
PAGE_SIZE. PAGE_SIZE is only available when <machine/param.h> is
included.

8 years agoAttach the generic USB OHCI driver to the arm64 build.
Andrew Turner [Tue, 31 May 2016 19:19:21 +0000 (19:19 +0000)]
Attach the generic USB OHCI driver to the arm64 build.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agodpcpu_init should have also passed in the calculated cpuid, not the
Andrew Turner [Tue, 31 May 2016 19:17:32 +0000 (19:17 +0000)]
dpcpu_init should have also passed in the calculated cpuid, not the
devicetree ID.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoImprove POSIX conformance of <signal.h>.
Ed Schouten [Tue, 31 May 2016 19:05:41 +0000 (19:05 +0000)]
Improve POSIX conformance of <signal.h>.

- This header file has always depended on pthread_t, pthread_attr_t,
  struct timespec, size_t and uid_t. Only as of POSIX 2008, these
  dependencies have been states explicitly. They should now be defined.

- In our implementation, struct sigevent::sigev_notify_attributes has
  type "void *" instead of "pthread_attr_t *". My guess is that this was
  done to prevent pulling in the pthread types, but this can easily be
  avoided by using the underlying structure types.

8 years agoAllow the kernel to boot on a CPU where the devicetree has numbered it with
Andrew Turner [Tue, 31 May 2016 18:45:52 +0000 (18:45 +0000)]
Allow the kernel to boot on a CPU where the devicetree has numbered it with
a non-zero ID. To do this we increment the cpuid of any CPUs with a smaller
devicetree ID by one to stop them conflicting with the boot CPU.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoFor EILSEQ case in mbsnrtowcs() and wcsnrtombs() update src to point to
Andrey A. Chernov [Tue, 31 May 2016 18:44:33 +0000 (18:44 +0000)]
For EILSEQ case in mbsnrtowcs() and wcsnrtombs() update src to point to
the character after the one this conversion stopped at.

PR:     209907
Submitted by: Roel Standaert <roel@abittechnical.com> (partially)
MFC after:      3 days

8 years agoFix indentation in dhclient rc.d script
Eric van Gyzen [Tue, 31 May 2016 18:40:47 +0000 (18:40 +0000)]
Fix indentation in dhclient rc.d script

8 years agosfxge(4): move definition of the SW events to sfxge.h
Andrew Rybchenko [Tue, 31 May 2016 18:34:39 +0000 (18:34 +0000)]
sfxge(4): move definition of the SW events to sfxge.h

Tx flush done event is defined and Rx-specific header is not a good
place for it.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agoFix prototype of dbm_open().
Ed Schouten [Tue, 31 May 2016 18:32:57 +0000 (18:32 +0000)]
Fix prototype of dbm_open().

The last argument of dbm_open() should be a mode_t according to POSIX;
not an int.

Reviewed by: pfg, kib
Differential Revision: https://reviews.freebsd.org/D6650

8 years agosfxge(4): zero should be used as RxQ label in SW event
Andrew Rybchenko [Tue, 31 May 2016 18:31:17 +0000 (18:31 +0000)]
sfxge(4): zero should be used as RxQ label in SW event

The buggy code was using the rxq index but should use the evq label
associated with the rxq. It was missed in r298735.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D6661

8 years agoDocument r300240, net.inet.tcp.ecn.enable now is a three way setting
Steven Kreuzer [Tue, 31 May 2016 18:30:33 +0000 (18:30 +0000)]
Document r300240, net.inet.tcp.ecn.enable now is a three way setting

Approved by: re (gjb, implicit, relnotes)

8 years agoDocument r300906, ZFS fault management daemon
Steven Kreuzer [Tue, 31 May 2016 18:15:18 +0000 (18:15 +0000)]
Document r300906, ZFS fault management daemon

Approved by: re (gjb, implicit, relnotes)

8 years agoarm_gic_map is a mask not the CPUs ID, there is no need to shift it.
Andrew Turner [Tue, 31 May 2016 18:05:17 +0000 (18:05 +0000)]
arm_gic_map is a mask not the CPUs ID, there is no need to shift it.

Pointy-hat to: andrew
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agosfxge(4): regenerate MCDI headers from firmwaresrc .yml
Andrew Rybchenko [Tue, 31 May 2016 18:04:16 +0000 (18:04 +0000)]
sfxge(4): regenerate MCDI headers from firmwaresrc .yml

Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoBin interrupts to the correct CPU when we boot on a non-zero CPU.
Andrew Turner [Tue, 31 May 2016 17:49:47 +0000 (17:49 +0000)]
Bin interrupts to the correct CPU when we boot on a non-zero CPU.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoifconfig(8) now supports some output formatting options
Allan Jude [Tue, 31 May 2016 17:30:08 +0000 (17:30 +0000)]
ifconfig(8) now supports some output formatting options

specified by the -f flag or IFCONFIG_FORMAT environment variable, the user
can request that inet4 subnet masks be printed in CIDR or dotted-quad
notation, in addition to the traditional hex output.
inet6 prefixes can be printed in CIDR as well.

For more documentation see the ifconfig(8) man page.

PR: 169072
Requested by: seanc, marcel, brd, many others
Reviewed by: gnn, jhb (earlier version)
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D2856

8 years agoUpdate the Security Team member list with the actual
Remko Lodder [Tue, 31 May 2016 17:23:27 +0000 (17:23 +0000)]
Update the Security Team member list with the actual
members.

Discussed with: glebius

8 years agoFix kernel stack disclosures in the Linux and 4.3BSD compat layers.
Gleb Smirnoff [Tue, 31 May 2016 16:56:30 +0000 (16:56 +0000)]
Fix kernel stack disclosures in the Linux and 4.3BSD compat layers.

Submitted by: CTurt
Security: SA-16:20
Security: SA-16:21

8 years agoEnable setting BF_COHERENT on DMA tags. This allows the kernel to start
Andrew Turner [Tue, 31 May 2016 16:28:56 +0000 (16:28 +0000)]
Enable setting BF_COHERENT on DMA tags. This allows the kernel to start
using the cache handling functions.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years ago[ath_hal] rename the MCI state info routine.
Adrian Chadd [Tue, 31 May 2016 16:08:06 +0000 (16:08 +0000)]
[ath_hal] rename the MCI state info routine.

It's not /really/ "get state".

8 years ago[ath_hal] add support for setting the azimuth timestamp in the outgoing TX payload.
Adrian Chadd [Tue, 31 May 2016 16:07:15 +0000 (16:07 +0000)]
[ath_hal] add support for setting the azimuth timestamp in the outgoing TX payload.

FYI: This is an unsupported/deprecated feature of the 11n hardware.

8 years ago[ath_hal] reserve a HAL_TXDESC_ bit for azimuth TX timestamp requests.
Adrian Chadd [Tue, 31 May 2016 16:05:54 +0000 (16:05 +0000)]
[ath_hal] reserve a HAL_TXDESC_ bit for azimuth TX timestamp requests.

8 years agoCosmetics - add missing space after ellipses in shutdown messages.
Edward Tomasz Napierala [Tue, 31 May 2016 15:27:33 +0000 (15:27 +0000)]
Cosmetics - add missing space after ellipses in shutdown messages.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd support for simplex USB MIDI devices, which only provide BULK or
Hans Petter Selasky [Tue, 31 May 2016 15:05:50 +0000 (15:05 +0000)]
Add support for simplex USB MIDI devices, which only provide BULK or
INTERRUPT endpoints for moving data in one direction, like the KeyRig
49 from M-Audio.

Requested by: Ivan Klymenko <fidaj@ukr.net>
MFC after: 1 week

8 years agoMake CMSG_*() work without having NULL available.
Ed Schouten [Tue, 31 May 2016 13:32:33 +0000 (13:32 +0000)]
Make CMSG_*() work without having NULL available.

The <sys/socket.h> is not supposed to declare NULL, according to POSIX.
Our implementation complies with that, meaning that we need to make sure
that CMSG_*() doesn't use it.

8 years agoImplement _ALIGN() using internal integer types.
Ed Schouten [Tue, 31 May 2016 13:31:19 +0000 (13:31 +0000)]
Implement _ALIGN() using internal integer types.

The existing version depends on register_t and uintptr_t, which are only
available when including headers such as <sys/types.h>. As this macro is
used by <sys/socket.h>, for example, it should be written in such a way
that it doesn't depend on those types.

8 years agoMake strfmon_l() work without requiring the use of <xlocale.h>.
Ed Schouten [Tue, 31 May 2016 12:29:21 +0000 (12:29 +0000)]
Make strfmon_l() work without requiring the use of <xlocale.h>.

The strfmon_l() function provided by <xlocale/_monetary.h> is also part
of POSIX 2008's <monetary.h>, so it should be exposed by default.

Change the check used in <monetary.h> to be similar to the one that's
part of <wchar.h>, where we both test for __POSIX_VISIBLE and
_XLOCALE_H_.

8 years agoSet oldfp so the check for fp == oldfp works as expected.
Andrew Turner [Tue, 31 May 2016 11:32:09 +0000 (11:32 +0000)]
Set oldfp so the check for fp == oldfp works as expected.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoAdd "iscsictl -e". Among other things, it makes it possible to perform
Edward Tomasz Napierala [Tue, 31 May 2016 11:32:07 +0000 (11:32 +0000)]
Add "iscsictl -e".  Among other things, it makes it possible to perform
discovery without attaching to the targets ("iscsictl -Ad ... -e off"),
and then attach to selected ones ("iscsictl -Mi ... -e on").

PR: 204129
MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6633

8 years agoMove a device_printf under bootverbose where it should have been.
Andrew Turner [Tue, 31 May 2016 09:24:16 +0000 (09:24 +0000)]
Move a device_printf under bootverbose where it should have been.

Reported by: bz
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoMark the ThunderX and generic PCI drivers as cache-coherent when we know
Andrew Turner [Tue, 31 May 2016 09:15:21 +0000 (09:15 +0000)]
Mark the ThunderX and generic PCI drivers as cache-coherent when we know
this to be the case. This will mean we don't try and handle the cache in
bus_dmamap_sync when it is not needed.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6605

8 years agoAdd missing dependency on <machine/_limits.h>.
Ed Schouten [Tue, 31 May 2016 08:38:24 +0000 (08:38 +0000)]
Add missing dependency on <machine/_limits.h>.

In r227474, this header file was changed to define SIG_ATOMIC_{MIN,MAX}
in terms of LONG_{MIN,MAX}. Unlike all of the definitions in this header
file, LONG_{MIN,MAX} is provided by <limits.h>. Remove the dependency on
<limits.h> by using __LONG_{MIN,MAX} instead and including
<machine/_limits.h>.

This change is needed to make SIG_ATOMIC_{MIN,MAX} work without
including any other header files.

8 years agoAdd missing dependency on <machine/_limits.h>.
Ed Schouten [Tue, 31 May 2016 08:36:39 +0000 (08:36 +0000)]
Add missing dependency on <machine/_limits.h>.

This header uses __INT_MIN and __INT_MAX, which is provided by
<machine/_limits.h>. This is needed to make <stdint.h>'s WCHAR_MIN and
WCHAR_MAX work without including other headers as well.

8 years agoCosmetics: add missing space after the ':' in etc/rc.d/random.
Edward Tomasz Napierala [Tue, 31 May 2016 08:31:34 +0000 (08:31 +0000)]
Cosmetics: add missing space after the ':' in etc/rc.d/random.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agor169386 (PR 112515) was incomplete: it treated 307 as an error except
Dag-Erling Smørgrav [Tue, 31 May 2016 08:27:39 +0000 (08:27 +0000)]
r169386 (PR 112515) was incomplete: it treated 307 as an error except
in verbose mode, and did not handle 308 at all.

r241840 (PR 172451) added support for 308, but with the same bug.

Correctly handle both by recognizing them as redirects in all places
where we check the HTTP result code.

PR: 112515 173451 209546
Submitted by: novel@
MFC after: 1 week

8 years agoLet <sched.h> define struct timespec.
Ed Schouten [Tue, 31 May 2016 08:07:40 +0000 (08:07 +0000)]
Let <sched.h> define struct timespec.

POSIX 2004 doesn't require that this header defines struct timespec, but
does allow it. For FreeBSD, we would at least need a forward declaration
for sched_rr_get_interval().

POSIX 2008 is a bit more demanding, as it now requires that it is
declared. Remove the old forward declaration and include the _timespec.h
header. This should conform to both POSIX 2004 and 2008 now.