]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUpgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0
dim [Sat, 5 Mar 2016 20:24:31 +0000 (20:24 +0000)]
Upgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm and clang will soon be available here:
<http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Roman Divacky, Davide Italiano and Antoine Brodin
for their help.

Relnotes: yes

8 years agoSignal handling within tcsh vfork code path will conflict with some system
mp [Sat, 5 Mar 2016 19:55:42 +0000 (19:55 +0000)]
Signal handling within tcsh vfork code path will conflict with some system
libraries (such as libthr) which maintain their own signal state. This
change adds the tcsh SAVESIGVEC option to save and restore the sigvecs for
the signals the child modifies before it execs.

Reviewed by: kib, rwatson
Reported by: kib

8 years agoUpgrade to Unbound 1.5.8.
des [Sat, 5 Mar 2016 19:29:18 +0000 (19:29 +0000)]
Upgrade to Unbound 1.5.8.

8 years agoPut the tentative merge-back date in ObsoleteFiles.inc.
dim [Sat, 5 Mar 2016 16:05:06 +0000 (16:05 +0000)]
Put the tentative merge-back date in ObsoleteFiles.inc.

8 years agoFix "files" arguments
bapt [Sat, 5 Mar 2016 15:53:06 +0000 (15:53 +0000)]
Fix "files" arguments

8 years agoMerge ^/head r296369 through r296409.
dim [Sat, 5 Mar 2016 15:34:54 +0000 (15:34 +0000)]
Merge ^/head r296369 through r296409.

8 years agoAdd support to enable/disable both the EHCI and OHCI Allwinner clocks. This
andrew [Sat, 5 Mar 2016 13:17:53 +0000 (13:17 +0000)]
Add support to enable/disable both the EHCI and OHCI Allwinner clocks. This
adds a lock to ensure only a single device is accessing the hardware. A
reference count is added to only enable when we start to use the clock,
and to disable after we have finished needing the clock.

This was extracted from a larger review to add OHCI support to the
Allwinner SoCs.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by: jmcneill
X-Differential Revision: https://reviews.freebsd.org/D5481

8 years agoAdd myself as a ports committer
cmt [Sat, 5 Mar 2016 11:20:02 +0000 (11:20 +0000)]
Add myself as a ports committer

Mentors are miwi@ and rene@

Approved by: rene (mentor)

8 years agoRevert r296395.
bdrewery [Sat, 5 Mar 2016 05:39:59 +0000 (05:39 +0000)]
Revert r296395.

This mistakenly removed the SUBDIR_PARALLEL but even worse is that the install
(and build) order is not correct due to the lack of SUBDIR_DEPEND on the
most critical libraries.  The only reason they build correctly now is because
buildworld's 'make libraries' orders them properly.

Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoConditionalize building makewhatis(1) for upgrades that need it.
bdrewery [Sat, 5 Mar 2016 05:08:57 +0000 (05:08 +0000)]
Conditionalize building makewhatis(1) for upgrades that need it.

Remove building of the legacy makewhatis(1) since it was only needed for
6.0 upgrades.

On my 2.2 GHz system libsqlite3 takes 60-100 seconds to build, which due to
its serialized nature can hold up the build waiting on it to finish in
bootstrap-tools.

makewhatis(1) was only required to be a build tool to support upgrades
from 6.0 which was properly removed in r208324 but later reverted due to
installworld using it.  The installworld issue was fixed in r275622
when it was added to ITOOLS.  A BOOTSTRAPPING check was missed when
makewhatis(1) was replaced with mandoc in r283777.

Sponsored by: EMC / Isilon Storage Division

8 years agoStray tabs and spaces.
pfg [Sat, 5 Mar 2016 01:17:23 +0000 (01:17 +0000)]
Stray tabs and spaces.

No functional change.

8 years agoDIRDEPS_BUILD: Connect ofed.
bdrewery [Fri, 4 Mar 2016 22:37:44 +0000 (22:37 +0000)]
DIRDEPS_BUILD: Connect ofed.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate libsdp to the latest 1.1.108-0.17.ga6958ef.
bdrewery [Fri, 4 Mar 2016 22:37:31 +0000 (22:37 +0000)]
Update libsdp to the latest 1.1.108-0.17.ga6958ef.

The only relevant change here is the support for IPv6 in the config
file.  The previous version of this supported IPv6 but not in the
config.  The change for that ended up removing __sdp_sockaddr_to_sdp
which the IPV4 config code required; the IPv6 fix resolved the lack of
that symbol.

Note that the ChangeLog was lacking entries for which we already had the
changes for, which itself was an upstream bug.

Obtained from: https://www.openfabrics.org/downloads/libsdp/libsdp-1.1.108-0.17.ga6958ef.tar.gz
Sponsored by: EMC / Isilon Storage Division

8 years agoFix missing symbol program_invocation_short_name.
bdrewery [Fri, 4 Mar 2016 22:37:25 +0000 (22:37 +0000)]
Fix missing symbol program_invocation_short_name.

This fixes runtime when logging is enabled.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: For bootstrapping always install all headers.
bdrewery [Fri, 4 Mar 2016 22:37:21 +0000 (22:37 +0000)]
DIRDEPS_BUILD: For bootstrapping always install all headers.

There is no good way to guess if any of these will be needed but
they commonly are and add no extra overhead so just stage them.

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't add duplicates from LOCAL_LIB_DIRS.
bdrewery [Fri, 4 Mar 2016 22:37:16 +0000 (22:37 +0000)]
Don't add duplicates from LOCAL_LIB_DIRS.

This causes parallel failures.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix over/under-linking in contrib/ofed.
bdrewery [Fri, 4 Mar 2016 22:37:09 +0000 (22:37 +0000)]
Fix over/under-linking in contrib/ofed.

Sponsored by: EMC / Isilon Storage Division

8 years agoAllow adding to SOLINKOPTS.
bdrewery [Fri, 4 Mar 2016 22:37:00 +0000 (22:37 +0000)]
Allow adding to SOLINKOPTS.

Sponsored by: EMC / Isilon Storage Division

8 years agoNO_ROOT: Create the METALOG directory on installworld/distributeworld.
bdrewery [Fri, 4 Mar 2016 22:36:56 +0000 (22:36 +0000)]
NO_ROOT: Create the METALOG directory on installworld/distributeworld.

When not using NO_ROOT the DESTDIR is implicitly created by the
distrib-dirs call.  However with NO_ROOT it is trying to write
to the METALOG right away before running distrib-dirs which
may fail.

Sponsored by: EMC / Isilon Storage Division

8 years agoParallel installation has been safe here since r267511 added SUBDIR_DEPEND.
bdrewery [Fri, 4 Mar 2016 22:36:42 +0000 (22:36 +0000)]
Parallel installation has been safe here since r267511 added SUBDIR_DEPEND.

Sponsored by: EMC / Isilon Storage Division

8 years agoxdr: Fix xdr_rpc* defines.
pfg [Fri, 4 Mar 2016 22:03:38 +0000 (22:03 +0000)]
xdr: Fix xdr_rpc* defines.

The defines for xdr_rpc* in xdr.h are wrong. It could be
very well that Solaris did strip the '_t' from xdr_u_int32_t,
but Solaris has a xdr_u_int32 function, we don't have this.
So all of this defines will lead to an unresolved symbol.

This explains why we do not use these functions in FreeBSD
while they are used in Illumos/Solaris.

Obtained from: linux libtirpc (git 7864122e61ffe4db1aa8ace89117358a1e3a391b)
MFC after: 3 weeks

8 years agonet80211: fix possible overflow in IEEE80211_TU_TO_TICKS()
avos [Fri, 4 Mar 2016 21:22:11 +0000 (21:22 +0000)]
net80211: fix possible overflow in IEEE80211_TU_TO_TICKS()

For hz=1000 any number, greater than 4194 causes integer overflow;
this change casts the number to uint64_t before operating with it.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5268

8 years agoSet bhsdi_target_transfer_tag to reserved value, which is 0xffffffff.
mav [Fri, 4 Mar 2016 19:57:11 +0000 (19:57 +0000)]
Set bhsdi_target_transfer_tag to reserved value, which is 0xffffffff.

This should be a purely cosmetic change.

8 years agoelfcopy: fail if debug link target is empty
emaste [Fri, 4 Mar 2016 18:28:19 +0000 (18:28 +0000)]
elfcopy: fail if debug link target is empty

An empty debug link target previously returned a confusing and incorrect
error like "objcopy: fread failed: No error: 0". Now, return an explicit
error.

GNU objcopy allows an empty file as the debug link target. However,
that case is nonsensical so diverging from GNU behaviour is fine.

Reviewed by: bdrewery
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5541

8 years agoAdd an UPDATING entry for the recent AIO changes.
jhb [Fri, 4 Mar 2016 17:42:59 +0000 (17:42 +0000)]
Add an UPDATING entry for the recent AIO changes.

Suggested by: maxim

8 years agoPass MNTK_NO_IOPF and MNTK_UNMAPPED_BUFS flags from the lower
kib [Fri, 4 Mar 2016 17:24:28 +0000 (17:24 +0000)]
Pass MNTK_NO_IOPF and MNTK_UNMAPPED_BUFS flags from the lower
filesystem to the nullfs mount.

MNTK_NO_IOPF must be present on the nullfs struct mount so that struct
file fo_read and fo_write fops operate in the mode requested by the
lower mount.

MNTK_UNMAPPED_BUFS allows VOP_GETPAGES() to use unmapped buffers.  It
does not matter for VOP_GETPAGES() calls from vm_fault() since handle
of the vm_object always points to the lower vnode.  But it may be
useful for other situations where VOP_GETPAGES() is used.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAdd dd as a bootstrap tool, for status= support
emaste [Fri, 4 Mar 2016 16:03:15 +0000 (16:03 +0000)]
Add dd as a bootstrap tool, for status= support

In r295757 I added status=none to buildworld's use of dd, but FreeBSD
versions before April 2014 lack support.

8 years agoWork around aliasing issues detected in modern GCC.
pfg [Fri, 4 Mar 2016 15:30:41 +0000 (15:30 +0000)]
Work around aliasing issues detected in modern GCC.

Avoid casting gymnastics that lead to pointer aliasing by introducing an
inline function as done in NetBSD (but without #if0'd WIP code).

Obtained from: NetBSD (CVS Rev. 1.24, 1.25)

8 years agoThe register read/write mphy functions have misleading whitespace around
sbruno [Fri, 4 Mar 2016 14:23:34 +0000 (14:23 +0000)]
The register read/write mphy functions have misleading whitespace around
the locked check. This cleanup merely preserves the existing functionality
while improving the ready check.

Submitted by: Jim Thompson
Reviewed by: gnn erj
Obtained from: Netgate
MFC after: 2 weeks
Sponsored by: Netgate
Differential Revision: https://reviews.freebsd.org/D5448

8 years agoAlso remove libcapsicum and libexec/casper after the casper changes
bapt [Fri, 4 Mar 2016 13:58:39 +0000 (13:58 +0000)]
Also remove libcapsicum and libexec/casper after the casper changes

8 years agocxgbe(4): Very basic T6 awareness. This is part of ongoing work to
np [Fri, 4 Mar 2016 13:11:13 +0000 (13:11 +0000)]
cxgbe(4): Very basic T6 awareness.  This is part of ongoing work to
update to the latest internal shared code.

- Add a chip_params structure to keep track of hardware constants for
  all generations of Terminators handled by cxgbe.
- Update t4_hw_pci_read_cfg4 to work with T6.
- Update the hardware debug sysctls (hidden within dev.<tNnex>.<n>.misc.*) to
  work with T6.  Most of the changes are in the decoders for the CIM
  logic analyzer and the MPS TCAM.
- Acquire the regwin lock around indirect register accesses.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

8 years agoWhitespace fixes.
hselasky [Fri, 4 Mar 2016 09:07:30 +0000 (09:07 +0000)]
Whitespace fixes.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agohyperv/hn: Add per-TX ring stats for # of transmitted packets
sephe [Fri, 4 Mar 2016 07:07:42 +0000 (07:07 +0000)]
hyperv/hn: Add per-TX ring stats for # of transmitted packets

MFC after: 2 weeks
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Pass channel to send done callbacks.
sephe [Fri, 4 Mar 2016 07:00:37 +0000 (07:00 +0000)]
hyperv/hn: Pass channel to send done callbacks.

Mainly to strigent the data packet send done check.

MFC after: 2 weeks
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Add multiple channel support, a.k.a. vRSS
sephe [Fri, 4 Mar 2016 06:52:11 +0000 (06:52 +0000)]
hyperv/hn: Add multiple channel support, a.k.a. vRSS

Each channel contains one RX ring and one TX ring.  And we
try to distribute the channels to different evenly.

Note: Currently we don't have enough information to extract
the RSS type and RSS hash value from the received packets.

This greatly improves the TX/RX performance for 8 virtual CPU
Hyper-V over 10Ge: it can max out 10Ge for TCP when multiple
RX/TX rings are enabled.

This almost doubles the TX/RX performance for locally connected
Hyper-Vs: was 6Gbps w/ 128 TCP streams, now 11Gbps w/ multiple
RX/TX rings enabled.

It is not enabled by default; it will be switched on after more
tests.

Collaborated with: Hongjiang Zhang <honzhan microsoft com>
MFC after: 2 week
Sponsored by: Microsoft OSTC

8 years agoFix ubldr build failure on mipsn32 and mipsn32el targets.
sgalabov [Fri, 4 Mar 2016 05:36:53 +0000 (05:36 +0000)]
Fix ubldr build failure on mipsn32 and mipsn32el targets.

Approved by: adrian (mentor)

8 years agoSet argument encode/result decode call backs for 'maplist' and 'all'.
araujo [Fri, 4 Mar 2016 03:10:08 +0000 (03:10 +0000)]
Set argument encode/result decode call backs for 'maplist' and 'all'.

Note: Listing a map is still not fully implemented.

Obtained from: OpenBSD (r1.16, r1.17)

8 years agoImplement the 'master' request.
araujo [Fri, 4 Mar 2016 02:14:32 +0000 (02:14 +0000)]
Implement the 'master' request.

Obtained from: OpenBSD (r1.15)

8 years agoRemove default initializations for rman, a'la r296331
jhibbits [Fri, 4 Mar 2016 01:25:45 +0000 (01:25 +0000)]
Remove default initializations for rman, a'la r296331

8 years agoMerge ^/head r296007 through r296368.
dim [Thu, 3 Mar 2016 23:15:46 +0000 (23:15 +0000)]
Merge ^/head r296007 through r296368.

8 years agoRegenerate llvm and clang manpages.
dim [Thu, 3 Mar 2016 23:09:57 +0000 (23:09 +0000)]
Regenerate llvm and clang manpages.

8 years agoUpdate llvm and clang to 3.8.0 release.
dim [Thu, 3 Mar 2016 22:50:52 +0000 (22:50 +0000)]
Update llvm and clang to 3.8.0 release.

8 years agoAdd support for resetting the PHY via GPIO.
jmcneill [Thu, 3 Mar 2016 22:26:36 +0000 (22:26 +0000)]
Add support for resetting the PHY via GPIO.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by: andrew, jmcneill
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5505

8 years agoAdd support for Allwinner A31 RTC controller.
jmcneill [Thu, 3 Mar 2016 22:19:39 +0000 (22:19 +0000)]
Add support for Allwinner A31 RTC controller.

Very similar to the A10 RTC controller with a few register offsets changed
and a different location for the LOSC switch status.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by: jmcneill
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5500

8 years agozyd, run, ural: do not corrupt MAC address
avos [Thu, 3 Mar 2016 20:06:16 +0000 (20:06 +0000)]
zyd, run, ural: do not corrupt MAC address

Do not use ic_macaddr as a storage for current BSSID;
it may be reused in vap creation procedure;
similar to r288619.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5513

8 years agonet80211: drop <smth> -> INIT state transition warning (STA mode only)
avos [Thu, 3 Mar 2016 19:53:46 +0000 (19:53 +0000)]
net80211: drop <smth> -> INIT state transition warning (STA mode only)

This warning is irrelevant, since user can execute
'ifconfig wlan0 down' (or turn off card via rfkill switch) at any time.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5511

8 years agoFix ixl with RSS
smh [Thu, 3 Mar 2016 19:49:37 +0000 (19:49 +0000)]
Fix ixl with RSS

Fix compilation of ixl when RSS option is set, broken by r295946

MFC after: 3 weeks
X-MFC-With: r295946
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5428

8 years agoDEBUG_FILES: Create the DEBUGFILEDIR if it doesn't exist on install.
bdrewery [Thu, 3 Mar 2016 18:08:58 +0000 (18:08 +0000)]
DEBUG_FILES: Create the DEBUGFILEDIR if it doesn't exist on install.

Currently the base.txz distribution does not get the BSD.debug.dist mtree
extracted into it.  So if you start from that and then try to build a 3rd-party
application outside of buildworld it will by-default try installing the
debug files into a missing directory if they are being installed into /usr/lib.

Check for the existence before forcing the directory to be created rather than
the older way of running a shell command with test -d || mkdir -p always.

Reported by: HardenedBSD (https://github.com/HardenedBSD/secadm/issues/23)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5411

8 years agoFix dtrace probes (introduced in 287759): debug__input was used
gnn [Thu, 3 Mar 2016 17:46:38 +0000 (17:46 +0000)]
Fix dtrace probes (introduced in 287759): debug__input was used
for output and drop; connect didn't always fire a user probe
some probes were missing in fastpath

Submitted by: Hannes Mehnert
Sponsored by: REMS, EPSRC
Differential Revision: https://reviews.freebsd.org/D5525

8 years agoMFV r296350:
pfg [Thu, 3 Mar 2016 15:36:00 +0000 (15:36 +0000)]
MFV r296350:
Split each domain again after striping any trailing dot.

Reported by:  dumbbell
Obtained from: openresolv (53416cf1b4)

8 years agoAdd sunrpc compat define for xp_sock.
pfg [Thu, 3 Mar 2016 14:44:30 +0000 (14:44 +0000)]
Add sunrpc compat define for xp_sock.

SunRPC is using xp_sock in SVCXPRT, while TI-RPC is using
xp_fd. Add a compatibility define.

Illumos has something similar for the non-kernel case.

Obtained from: linux-nfs project (git 0d94036c3a0d4c24d22bf6a8c40ac6625d972c29)

8 years agoUse correct size for malloc.
ae [Thu, 3 Mar 2016 13:07:59 +0000 (13:07 +0000)]
Use correct size for malloc.

Obtained from: Yandex LLC
MFC after: 1 week

8 years agoAdd more functions to the LinuxKPI.
hselasky [Thu, 3 Mar 2016 09:56:04 +0000 (09:56 +0000)]
Add more functions to the LinuxKPI.

Define strnicmp as a function macro instead of a regular macro while
at it.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAllow for overlapping quirk device ranges. Prior to this patch only
hselasky [Thu, 3 Mar 2016 08:47:27 +0000 (08:47 +0000)]
Allow for overlapping quirk device ranges. Prior to this patch only
the first device entry matching the USB vendor, product and revision
would be searched for quirks. After this patch all device entries will
be searched for quirks.

MFC after: 1 week

8 years agoo -t comman line option added to the usage().
maxim [Thu, 3 Mar 2016 07:07:44 +0000 (07:07 +0000)]
o -t comman line option added to the usage().

8 years agoAdd missing atf dirs.
bdrewery [Thu, 3 Mar 2016 06:37:17 +0000 (06:37 +0000)]
Add missing atf dirs.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove casper library entries to proper places.
bdrewery [Thu, 3 Mar 2016 06:22:51 +0000 (06:22 +0000)]
Move casper library entries to proper places.

Sponsored by: EMC / Isilon Storage Division

8 years agoReplace all resource occurrences of '0UL/~0UL' with '0/~0'.
jhibbits [Thu, 3 Mar 2016 05:07:35 +0000 (05:07 +0000)]
Replace all resource occurrences of '0UL/~0UL' with '0/~0'.

Summary:
The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a
32-bit platform, will leave the upper 32 bits as 0.  The maximum range of a
resource is 0xFFF.... (all bits of the full type set).  By dropping the 'ul'
suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit
platforms gets it to a type-independent 'unsigned max'.

Reviewed By: cem
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5255

8 years agofix tcpdebug: - assign to "flags" in each probe, not only debug-input
gnn [Thu, 3 Mar 2016 02:46:12 +0000 (02:46 +0000)]
fix tcpdebug: - assign to "flags" in each probe, not only debug-input
compute "len" in the same way in each probe

Submitted by: Hannes Mehnert
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D5524

8 years agoRestore support for decay time of -1 (no decay).
jasone [Thu, 3 Mar 2016 01:43:36 +0000 (01:43 +0000)]
Restore support for decay time of -1 (no decay).

8 years agocxgbe(4): First of many changes to reduce diffs with internal shared
np [Thu, 3 Mar 2016 01:41:53 +0000 (01:41 +0000)]
cxgbe(4): First of many changes to reduce diffs with internal shared
code:

- Rename some CamelCase variables.
- s/t4_link_start/t4_link_l1cfg/g
- Pull in t4_get_port_type_description.
- Move t4_wait_op_done to t4_hw.c.
- Flip the order of the RDMA stats.
- Remove unsused function t4_iq_start_stop.
- Move t4_wait_op_done and t4_wait_op_done_val to t4_hw.c

Obtained from: Chelsio Communications

8 years agoAdd a cast to prevent a compiler warning.
jasone [Thu, 3 Mar 2016 01:30:28 +0000 (01:30 +0000)]
Add a cast to prevent a compiler warning.

8 years agoLet rman_init() initialize the default rman range.
jhibbits [Thu, 3 Mar 2016 01:12:13 +0000 (01:12 +0000)]
Let rman_init() initialize the default rman range.

If rm_start and rm_end are both 0 on input to rman_init(), rman_init()
pre-initializes them to the default range.  No need to set it before.

8 years agoAnother convert to bus_alloc_resource_anywhere().
jhibbits [Thu, 3 Mar 2016 01:09:00 +0000 (01:09 +0000)]
Another convert to bus_alloc_resource_anywhere().

Depending on how cbus hands out resources, this could actually be
bus_alloc_resource_any() instead.

8 years agoAllocate the PCI BAR resource with bus_alloc_resource_any()
jhibbits [Thu, 3 Mar 2016 01:07:17 +0000 (01:07 +0000)]
Allocate the PCI BAR resource with bus_alloc_resource_any()

We don't support allocating any other range with PCI BARs.

8 years agosh: Remove a redundant STPUTC check.
jilles [Wed, 2 Mar 2016 22:52:54 +0000 (22:52 +0000)]
sh: Remove a redundant STPUTC check.

8 years agosh: Don't trust that signal descriptions fit within 49 bytes.
jilles [Wed, 2 Mar 2016 21:24:46 +0000 (21:24 +0000)]
sh: Don't trust that signal descriptions fit within 49 bytes.

8 years agoAdd guessed dependencies to OBJS after bsd.dep.mk in case of it adding to SRCS.
bdrewery [Wed, 2 Mar 2016 21:03:42 +0000 (21:03 +0000)]
Add guessed dependencies to OBJS after bsd.dep.mk in case of it adding to SRCS.

This was a regression in r295985.

bsd.dep.mk adds to SRCS for dtrace probes, yacc grammars and some
others.

The code that is moving is planned to be removed once FAST_DEPEND is
default (and the only option) though since FAST_DEPEND doesn't use this.

Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoFix meta2deps.sh tracking of dependencies inside .CURDIR.
bdrewery [Wed, 2 Mar 2016 20:06:24 +0000 (20:06 +0000)]
Fix meta2deps.sh tracking of dependencies inside .CURDIR.

An example of this is in share/i18n/csmapper.

Reviewed by: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove self-reference to destroy_dev_drain(9).
bdrewery [Wed, 2 Mar 2016 19:22:24 +0000 (19:22 +0000)]
Remove self-reference to destroy_dev_drain(9).

MFC after: 1 week

8 years agodaemon(8): Add -t option to set process title
cem [Wed, 2 Mar 2016 19:10:39 +0000 (19:10 +0000)]
daemon(8): Add -t option to set process title

The default process title is taken from the argv[0] value (any
particular hardlink name).  Add a -t option to override the default.

PR: 205016
Submitted by: Yuri <yuri@rawbw.com>
No objection from: freebsd-current@
Sponsored by: EMC / Isilon Storage Division

8 years agoIf callout_stop_safe() noted that the callout is currently executing,
kib [Wed, 2 Mar 2016 18:46:17 +0000 (18:46 +0000)]
If callout_stop_safe() noted that the callout is currently executing,
but next invocation is cancelled while migrating,
sleepq_check_timeout() needs to be informed that the callout is
stopped.  Otherwise the thread switches off CPU and never become
runnable, since running callout could have already raced with us,
while the migrating and cancelled callout could be one which is
expected to set TDP_TIMOFAIL flag for us.  This contradicts with the
expected behaviour of callout_stop() for other callers, which
e.g. decrement references from the callout callbacks.

Add a new flag CS_MIGRBLOCK requesting report of the situation as
'successfully stopped'.

Reviewed by: jhb (previous version)
Tested by: cognet, pho
PR: 200992
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D5221

8 years agoFix handling of DT_TEXTREL for an object with more than one read-only
kib [Wed, 2 Mar 2016 16:36:24 +0000 (16:36 +0000)]
Fix handling of DT_TEXTREL for an object with more than one read-only
segment.  According to gABI spec, presence of the tag indicates that
dynamic linker must be prepared to handle relocations against any
read-only segment, not only the segment which we, somewhat arbitrary,
declared the text.

For each read-only segment, add write permission before relocs are
processed, and return to the mapping mode requested by the phdr, after
relocs are done.

Reported, tested, and reviewed by: emaste
PR: 207631
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAdd gem5 support, so we attach there as well.
bz [Wed, 2 Mar 2016 15:26:55 +0000 (15:26 +0000)]
Add gem5 support, so we attach there as well.

Fix the boundary limit to end at the end of the region and not one beyond (1).

Diagnosed by: andrew (1)
Reviewed by: andrew, br
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D5493

8 years agoForce re-routing PCI interrupts (this is for legacy INTx not MSI).
bz [Wed, 2 Mar 2016 15:20:42 +0000 (15:20 +0000)]
Force re-routing PCI interrupts (this is for legacy INTx not MSI).
Need this for gem5, but was not needed on real hadrware (yet) as it
was always MSI.

Reviewed by: andrew, jhb
Discovered by: andrew
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D5494

8 years agoThe cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S,
andrew [Wed, 2 Mar 2016 14:33:46 +0000 (14:33 +0000)]
The cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S,
only define it when building for ARMv5 or prior.

Sponsored by: ABT Systems Ltd

8 years agoSupport for Enhanced Allocation in PCI
wma [Wed, 2 Mar 2016 09:54:58 +0000 (09:54 +0000)]
Support for Enhanced Allocation in PCI

    On some platforms, BAR entries are hardcoded and must not be accessed
    using standard method. Add functionality to identify this situation
    and configure the bus based on Enhanced Allocation structure.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5242

8 years agoImprove ThunderX PEM driver to work on pass2 revision
wma [Wed, 2 Mar 2016 08:39:59 +0000 (08:39 +0000)]
Improve ThunderX PEM driver to work on pass2 revision

    Things changed:
    * do not allocate 4GB of SLI space, because it's the waste of
      system resources. Allocate only small portions when needed.
    * provide own implementation of activate_resource which performs
      address translation between PCI bus and host PA address space.
      This is temporary solution, should be replaced by bus_map_resource
      once implemented.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5294

8 years agohyperv/hn: Make # of rings configurable
sephe [Wed, 2 Mar 2016 05:24:55 +0000 (05:24 +0000)]
hyperv/hn: Make # of rings configurable

And since the host may not being able to allocate the # of rings
requested by us, save the # of rings allocated by the host in the
ring_inuse counters; use ring_inuse counters for run time operation.

This paves the way for the upcoming vRSS support.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoUse m_catpkt(9) to ensure that pkthdr fields are updated properly.
markj [Wed, 2 Mar 2016 05:05:02 +0000 (05:05 +0000)]
Use m_catpkt(9) to ensure that pkthdr fields are updated properly.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoSet tres to NULL to avoid a double free if the m_pullup() below fails.
markj [Wed, 2 Mar 2016 05:04:04 +0000 (05:04 +0000)]
Set tres to NULL to avoid a double free if the m_pullup() below fails.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoUse m_catpkt(9) to avoid a possible use-after-free in ieee80211_defrag().
markj [Wed, 2 Mar 2016 05:01:58 +0000 (05:01 +0000)]
Use m_catpkt(9) to avoid a possible use-after-free in ieee80211_defrag().

m is not guaranteed to be valid after m_cat() returns. The effects of this
are most noticeable when INVARIANTS is enabled, since m's header length
field is given a value of 0xdeadc0de by the trash dtor.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoDocument m_catpkt(), and remove misinformation about m_cat(9).
markj [Wed, 2 Mar 2016 04:58:51 +0000 (04:58 +0000)]
Document m_catpkt(), and remove misinformation about m_cat(9).

Since m_cat() may copy data from the second mbuf chain into the last mbuf
of the first chain, it may free the first mbuf of the second chain. Thus,
the second chain is not guaranteed to be valid after m_cat() returns.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoFix a typo that prevented pw(8) from setting a user's UID to 0.
markj [Wed, 2 Mar 2016 04:56:36 +0000 (04:56 +0000)]
Fix a typo that prevented pw(8) from setting a user's UID to 0.

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

8 years agoRemove redundant NULL pointer comparison.
cy [Wed, 2 Mar 2016 03:28:57 +0000 (03:28 +0000)]
Remove redundant NULL pointer comparison.

Reported  by: PVS-Studio (V595) in D5245
Differential Revision: D5245

8 years agoReplace some more default range checks with RMAN_IS_DEFAULT_RANGE().
jhibbits [Wed, 2 Mar 2016 03:26:56 +0000 (03:26 +0000)]
Replace some more default range checks with RMAN_IS_DEFAULT_RANGE().

This is a follow-on to r295832.

8 years agohyperv/hn: Fix typo in comment
sephe [Wed, 2 Mar 2016 03:19:59 +0000 (03:19 +0000)]
hyperv/hn: Fix typo in comment

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Make read buffer per-channel
sephe [Wed, 2 Mar 2016 03:07:31 +0000 (03:07 +0000)]
hyperv/hn: Make read buffer per-channel

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reorganized by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoUse the m_extadd() function instead of deprecated MEXTADD().
jhibbits [Wed, 2 Mar 2016 02:29:35 +0000 (02:29 +0000)]
Use the m_extadd() function instead of deprecated MEXTADD().

Suggested by: glebius

8 years agoRemove some debug printfs
jhibbits [Wed, 2 Mar 2016 02:27:53 +0000 (02:27 +0000)]
Remove some debug printfs

8 years agohyperv/hn: Pass channel to hv_nv_on_receive_completion()
sephe [Wed, 2 Mar 2016 02:27:13 +0000 (02:27 +0000)]
hyperv/hn: Pass channel to hv_nv_on_receive_completion()

While I'm here, staticize this function.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Modified by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoFix regression in r296242 affecting several drivers. For EXT_NET_DRV,
glebius [Wed, 2 Mar 2016 02:12:01 +0000 (02:12 +0000)]
Fix regression in r296242 affecting several drivers. For EXT_NET_DRV,
EXT_MOD_TYPE, EXT_DISPOSABLE types we should first execute the free
callback, then free the mbuf, otherwise we will derefernce memory that
was just freed.

Reported and tested: jhibbits

8 years agohyperv/chan: Factor out the vcpu setting
sephe [Wed, 2 Mar 2016 01:40:47 +0000 (01:40 +0000)]
hyperv/chan: Factor out the vcpu setting

And use it for cpu0 assignment; it does not sound right to assume that
cpu0 maps to vcpu0.  And this factored out function will be exposed to
drivers, if driver specific CPU binding is needed, e.g. hn(4).

Move default cpu select after saving channel offer message. This makes
sure that all useful information of the channel has been setup.

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

8 years agohyperv/chan: Function renaming; no functional change
sephe [Wed, 2 Mar 2016 01:33:30 +0000 (01:33 +0000)]
hyperv/chan: Function renaming; no functional change

The renamed function create a sysctl tree for channel, and many
non-statistics nodes exists, so don't claim it only adds sysctl
nodes for statistics.

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

8 years agohyperv/chan: Add sysctl node to check whether monitor is allocated or not
sephe [Wed, 2 Mar 2016 01:26:05 +0000 (01:26 +0000)]
hyperv/chan: Add sysctl node to check whether monitor is allocated or not

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

8 years agoFix 2 bugs in the mpc85xx local bus controller driver.
jhibbits [Wed, 2 Mar 2016 00:18:05 +0000 (00:18 +0000)]
Fix 2 bugs in the mpc85xx local bus controller driver.

1) Include opt_platform.h to get QORIQ_DPAA.  Otherwise the definition of
OCP85XX_TGTIF_LBC is incorrect.
2) The child resources are already allocated, just activate them, instead of
incorrectly remapping the memory regions (resource lists for lbc consist of the
virtual address of the child's resources, not the physical address).

Sponsored by: Alex Perez/Inertial Computing

8 years agoRemove filemon->lock wrappers.
bdrewery [Wed, 2 Mar 2016 00:13:13 +0000 (00:13 +0000)]
Remove filemon->lock wrappers.

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

8 years agoCorrect a comment.
bdrewery [Tue, 1 Mar 2016 23:58:53 +0000 (23:58 +0000)]
Correct a comment.

8 years agoAdd support for Allwinner A31/A31s EHCI controller and USB PHY.
jmcneill [Tue, 1 Mar 2016 22:54:30 +0000 (22:54 +0000)]
Add support for Allwinner A31/A31s EHCI controller and USB PHY.

Reviewed by: andrew, Emmanuel Vadot <manu@bidouilliste.com>
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D5467

8 years agoUse SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.
jhb [Tue, 1 Mar 2016 22:51:44 +0000 (22:51 +0000)]
Use SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.

Reviewed by: kib
MFC after: 1 month
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D5516