]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoIntroduce lib/libgcc_eh and lib/libgcc_s for LLVM's implementation
emaste [Thu, 13 Oct 2016 18:57:18 +0000 (18:57 +0000)]
Introduce lib/libgcc_eh and lib/libgcc_s for LLVM's implementation

They are not yet connected to the build, but I am adding them to allow
for easier testing, ports exp-runs, etc.

Reviewed by: ed
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8188

7 years agoImprove typing of POSIX search tree functions.
ed [Thu, 13 Oct 2016 18:25:40 +0000 (18:25 +0000)]
Improve typing of POSIX search tree functions.

Back in 2015 when I reimplemented these functions to use an AVL tree, I
was annoyed by the weakness of the typing of these functions. Both tree
nodes and keys are represented by 'void *', meaning that things like the
documentation for these functions are an absolute train wreck.

To make things worse, users of these functions need to cast the return
value of tfind()/tsearch() from 'void *' to 'type_of_key **' in order to
access the key. Technically speaking such casts violate aliasing rules.
I've observed actual breakages as a result of this by enabling features
like LTO.

I've filed a bug report at the Austin Group. Looking at the way the bug
got resolved, they made a pretty good step in the right direction. A new
type 'posix_tnode' has been added to correspond to tree nodes. It is
still defined as 'void' for source-level compatibility, but in the very
far future it could be replaced by a proper structure type containing a
key pointer.

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8205

7 years agoWith build without TCP_HHOOK and with INVARIANTS. Before mutex.h came
glebius [Thu, 13 Oct 2016 18:02:29 +0000 (18:02 +0000)]
With build without TCP_HHOOK and with INVARIANTS.  Before mutex.h came
via sys/hhook.h -> sys/rmlock.h -> sys/mutex.h.

7 years agoFix octeon model comparison in Cavium SDK
emaste [Thu, 13 Oct 2016 17:16:32 +0000 (17:16 +0000)]
Fix octeon model comparison in Cavium SDK

buildkernel failed with GCC 5.3 with
error: comparison of constant '852736' with boolean expression is always true

Sponsored by: The FreeBSD Foundation

7 years ago'b' is short for --binary, it isn't 'a'.
imp [Thu, 13 Oct 2016 17:03:54 +0000 (17:03 +0000)]
'b' is short for --binary, it isn't 'a'.

PR: 213437
Submitted by: Ganael LAPLANCHE

7 years agoConvert ­ U+00AD soft hyphen to - in Cavium Octeon SDK
emaste [Thu, 13 Oct 2016 16:57:19 +0000 (16:57 +0000)]
Convert ­ U+00AD soft hyphen to - in Cavium Octeon SDK

Linux's copy of the Cavium SDK does not have these non-ASCII characters
and this reduces noise in diffs when comparing the two.

Sponsored by: The FreeBSD Foundation

7 years ago[net80211] remove now duplicate copy of the QOSDATA check macro.
adrian [Thu, 13 Oct 2016 16:45:01 +0000 (16:45 +0000)]
[net80211] remove now duplicate copy of the QOSDATA check macro.

7 years ago[net80211] add some more QoS frame subtypes.
adrian [Thu, 13 Oct 2016 16:41:34 +0000 (16:41 +0000)]
[net80211] add some more QoS frame subtypes.

7 years agoFix typos: use correct string format and value to compare.
br [Thu, 13 Oct 2016 15:26:51 +0000 (15:26 +0000)]
Fix typos: use correct string format and value to compare.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8226

7 years agoFix strchr, strrchr implementation: convert c to char
br [Thu, 13 Oct 2016 15:23:53 +0000 (15:23 +0000)]
Fix strchr, strrchr implementation: convert c to char
(according to standard).

Discussed with: andrew
Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8239

7 years agoFix a race in vm_page_busy_sleep(9).
kib [Thu, 13 Oct 2016 14:41:05 +0000 (14:41 +0000)]
Fix a race in vm_page_busy_sleep(9).

Suppose that we have an exclusively busy page, and a thread which can
accept shared-busy page.  In this case, typical code waiting for the
page xbusy state to pass is
again:
VM_OBJECT_WLOCK(object);
...
if (vm_page_xbusied(m)) {
vm_page_lock(m);
  VM_OBJECT_WUNLOCK(object);    <---1
vm_page_busy_sleep(p, "vmopax");
  goto again;
}

Suppose that the xbusy state owner locked the object, unbusied the
page and unlocked the object after we are at the line [1], but before we
executed the load of the busy_lock word in vm_page_busy_sleep().  If it
happens that there is still no waiters recorded for the busy state,
the xbusy owner did not acquired the page lock, so it proceeded.

More, suppose that some other thread happen to share-busy the page
after xbusy state was relinquished but before the m->busy_lock is read
in vm_page_busy_sleep().  Again, that thread only needs vm_object lock
to proceed.  Then, vm_page_busy_sleep() reads busy_lock value equal to
the VPB_SHARERS_WORD(1).

In this case, all tests in vm_page_busy_sleep(9) pass and we are going
to sleep, despite the page being share-busied.

Update check for m->busy_lock == VPB_UNBUSIED in vm_page_busy_sleep(9)
to also accept shared-busy state if we only wait for the xbusy state to
pass.

Merge sequential if()s with the same 'then' clause in
vm_page_busy_sleep().

Note that the current code does not share-busy pages from parallel
threads, the only way to have more that one sbusy owner is right now
is to recurse.

Reported and tested by: pho (previous version)
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D8196

7 years agoMark the socket as un-writable when it is 1-to-1 and the SCTP association
tuexen [Thu, 13 Oct 2016 13:53:01 +0000 (13:53 +0000)]
Mark the socket as un-writable when it is 1-to-1 and the SCTP association
is freed.

MFC after: 1 month

7 years agoWhitespace changes.
tuexen [Thu, 13 Oct 2016 13:38:14 +0000 (13:38 +0000)]
Whitespace changes.

MFC after: 1 month

7 years agoMFV r307214:
mm [Thu, 13 Oct 2016 11:40:34 +0000 (11:40 +0000)]
MFV r307214:
Sync libarchive with vendor. Style and tests fixes.

Important vendor bugfixes (relevant to FreeBSD):
#801: FreeBSD Coverity report: resource leak in libarchive/tar/test/main.c

MFC after: 1 week

7 years agoMove printing the AArch64 ID registers to a new SYSINIT, the previous
andrew [Thu, 13 Oct 2016 09:06:29 +0000 (09:06 +0000)]
Move printing the AArch64 ID registers to a new SYSINIT, the previous
location only prints them when booting on SMP with multiple cores.

MFC after: 1 week
Sponsored by: DARPA, AFRL

7 years agoChange atf_skip call to atf_expect_fail to make it clear that a failure is
ngie [Thu, 13 Oct 2016 08:35:08 +0000 (08:35 +0000)]
Change atf_skip call to atf_expect_fail to make it clear that a failure is
expected

MFC after: 2 weeks
PR: 212861
Suggested by: jmmv
Sponsored by: Dell EMC Isilon

7 years agoExpect :large to fail on FreeBSD
ngie [Thu, 13 Oct 2016 08:27:19 +0000 (08:27 +0000)]
Expect :large to fail on FreeBSD

FreeBSD doesn't appear to validate large -o size values like
NetBSD does

MFC after: 2 weeks
PR: 212862
Sponsored by: Dell EMC Isilon

7 years agoPort contrib/netbsd-tests/fs/tmpfs/h_tools.c to FreeBSD
ngie [Thu, 13 Oct 2016 07:32:25 +0000 (07:32 +0000)]
Port contrib/netbsd-tests/fs/tmpfs/h_tools.c to FreeBSD

- Add inttypes.h #include for PRId64 macro
- Use FreeBSD's copy of getfh(2), which doesn't include a `fh_size` parameter.
  Use sizeof(fhandle_t) instead as the size of fhp is always fixed as
  fhandle_t, unlike NetBSD's copy of fhp, which is void*.

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

7 years agoconvert iicsmb to use iicbus_transfer for all operations
avg [Thu, 13 Oct 2016 07:25:18 +0000 (07:25 +0000)]
convert iicsmb to use iicbus_transfer for all operations

Previously the driver used more low level operations like iicbus_start
and iicbus_write.  The problem is that those operations are not
implemented by iicbus(4) and the calls were effectively routed to
a driver to which the bus is attached.
But not all of the controllers implement such low level operations
while all of the drivers are expected to have iicbus_transfer.

While there fix incorrect implementation of iicsmb_bwrite and iicsmb_bread.
The former should send a byte count before the actual bytes, while the
latter should first receive the byte count and then receive the bytes.

I have tested only these commands:
- quick (r/w)
- send byte
- receive byte
- read byte
- write byte

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8170

7 years agoAlso, remove etc/rc.d/zfsbe when MK_ZFS == no
ngie [Thu, 13 Oct 2016 07:12:20 +0000 (07:12 +0000)]
Also, remove etc/rc.d/zfsbe when MK_ZFS == no

X-MFC with: r307182, r307191
Sponsored by: Dell EMC Isilon

7 years agoInstall etc/rc.d/zfsbe when MK_ZFS != no
ngie [Thu, 13 Oct 2016 07:10:27 +0000 (07:10 +0000)]
Install etc/rc.d/zfsbe when MK_ZFS != no

X-MFC with: r307182
Sponsored by: Dell EMC Isilon

7 years agoSkip :uchg on FreeBSD
ngie [Thu, 13 Oct 2016 07:02:54 +0000 (07:02 +0000)]
Skip :uchg on FreeBSD

Unfortunately removing files with uchg set always succeeds with root on
FreeBSD. Unfortunately running the test as an unprivileged user isn't doable
because mounting tmpfs requires root

PR: 212861
Sponsored by: Dell EMC Isilon

7 years agoFix building on i386 and arm. But 'public domain' headers on the files
imp [Thu, 13 Oct 2016 06:56:23 +0000 (06:56 +0000)]
Fix building on i386 and arm. But 'public domain' headers on the files
with no creative content. Include "lost" changes from git:
o Use /dev/efi instead of /dev/efidev
o Remove redundant NULL checks.

Submitted by: kib@, dim@, zbb@, emaste@

7 years agorc.d/zfsbe: a new script designed for boot environment support
avg [Thu, 13 Oct 2016 06:19:54 +0000 (06:19 +0000)]
rc.d/zfsbe: a new script designed for boot environment support

Currently zfsbe ensures that subordinate filesystems are mounted at the
right mount points.
The script assumes that the subordinate filesystems of a boot environment
have their canmount property set to noauto, so that they are not
automatically mounted on boot.  Whereas the root filesystem is mounted
by the kernel, there was nothing to mount its subordinates.
rc.d/zfsbe fills that gap.

Discussed with: allanjude, will
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D7797

7 years agokern_linker: Handle module-loading failures in preloaded .ko files
cem [Thu, 13 Oct 2016 02:06:23 +0000 (02:06 +0000)]
kern_linker: Handle module-loading failures in preloaded .ko files

The runtime kernel loader, linker_load_file, unloads kernel files that
failed to load all of their modules. For consistency, treat preloaded
(loader.conf loaded) kernel files in the same way.

Reviewed by: kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8200

7 years agoMany shops still prefer rc.conf(5) based jail configuration(s). In-part
dteske [Wed, 12 Oct 2016 20:50:17 +0000 (20:50 +0000)]
Many shops still prefer rc.conf(5) based jail configuration(s). In-part
because they can use sysrc in conjunction with ssh and xargs to perform
en-masse changes in a large distribution with lots of jails spread over
many hosts on a LAN/WAN.

Provide a mechanism for disabling the warning eschewed by /etc/rc.d/jail
in said situation. If jail_confwarn="NO" is in rc.conf(5) (default "YES")
skip the warning that per-jail configurations are obsolete and that the
user should migrate to jail.conf(5).

Reviewed by: jelischer
MFC after: 3 days
Sponsored by: FIS Global, Inc.
Differential Revision: https://reviews.freebsd.org/D7465

7 years agonet80211: convert all ieee80211_input_mimo*() consumers
avos [Wed, 12 Oct 2016 20:50:13 +0000 (20:50 +0000)]
net80211: convert all ieee80211_input_mimo*() consumers
to ieee80211_add_rx_params() + drop last (ieee80211_rx_stats) parameter

Note: there is an additional check for ieee80211_get_rx_params()
return value (which does not exist in the original diff).

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D8207

7 years agoTemporarily disconnect efivar to fix arm and i386 builds
emaste [Wed, 12 Oct 2016 20:25:03 +0000 (20:25 +0000)]
Temporarily disconnect efivar to fix arm and i386 builds

7 years agoMFportsnap r264740: Use case insensitive match when parsing host(1) output.
cperciva [Wed, 12 Oct 2016 20:24:33 +0000 (20:24 +0000)]
MFportsnap r264740: Use case insensitive match when parsing host(1) output.

Some DNS caches turn "FreeBSD.org" into "freebsd.org", which was causing
the printed SRV records to not match our regex.

PR: 170503
MFC after: 2 weeks

7 years ago[fdt] Add one more heuristic to determine MAC address of the SMSC device
gonzo [Wed, 12 Oct 2016 19:53:10 +0000 (19:53 +0000)]
[fdt] Add one more heuristic to determine MAC address of the SMSC device

- If check for net,ethernet/usb,device compatible node fails, try to find
    .../usb/hub/ethernet, where ... is bus path that can depend on actual HW.
    net,ethernet/usb,device compatibity strings are FreeBSD custom invention
    that is used only in RPi DTBs and since there is no other way to tie USB
    device to FDT node we just do our best effort here to work with upstream
    device tree

- Use -1 value to indicate invalid phandle_t, 0 is valid phandle value and
    shouldn't be used as error signal

7 years agoThe TFO server-side code contains some changes that are not conditioned on
jtl [Wed, 12 Oct 2016 19:06:50 +0000 (19:06 +0000)]
The TFO server-side code contains some changes that are not conditioned on
the TCP_RFC7413 kernel option. This change removes those few instructions
from the packet processing path.

While not strictly necessary, for the sake of consistency, I applied the
new IS_FASTOPEN macro to all places in the packet processing path that
used the (t_flags & TF_FASTOPEN) check.

Reviewed by: hiren
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D8219

7 years agoAdd COMPAT_FREEBSD10 to the MIPS ERL kernel config
emaste [Wed, 12 Oct 2016 18:49:30 +0000 (18:49 +0000)]
Add COMPAT_FREEBSD10 to the MIPS ERL kernel config

As of r302092, pipe is a wrapper around pipe2 and the pipe syscall is no
longer used. It is included only with the COMPAT_FREEBSD10 kernel option.
Add the compat option to support upgrades from systems with an earlier
userland.

MFC after: 1 week

7 years agoINTRNG: Propagate IRQ activation error to API consumer
gonzo [Wed, 12 Oct 2016 17:10:59 +0000 (17:10 +0000)]
INTRNG: Propagate IRQ activation error to API consumer

Keep resource state consistent with INTRNG state - if intr_activate_irq
fails - deactivate resource and propagate error to calling function

Reviewed by: mmel

7 years agoAvoid using 'head' in generating groff doc date
emaste [Wed, 12 Oct 2016 15:49:20 +0000 (15:49 +0000)]
Avoid using 'head' in generating groff doc date

It may not be available in certain cross build cases.

Note that this is a slight change in functionality, in that now only the
first line of the source ChangeLog file is processed. This is acceptable
as groff will be retired and we won't encounter a possibly-different
ChangeLog format.

Reported by: jhibbits
Tested by: jhibbits

7 years agoUse the armv6 GENERIC kernel in the release images on hardware this kernel
andrew [Wed, 12 Oct 2016 15:29:22 +0000 (15:29 +0000)]
Use the armv6 GENERIC kernel in the release images on hardware this kernel
config supports.

Approved by: gjb
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D8147

7 years agoAdd comment on use of abort() in libc
emaste [Wed, 12 Oct 2016 13:56:14 +0000 (13:56 +0000)]
Add comment on use of abort() in libc

Suggested by: jonathan (in review D8133)

7 years agoKeep in-sync MK_SSP=no option both with kernel and userspace.
br [Wed, 12 Oct 2016 13:51:41 +0000 (13:51 +0000)]
Keep in-sync MK_SSP=no option both with kernel and userspace.

Pointed out by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoAdd different libc ldscript: the one without libssp --
br [Wed, 12 Oct 2016 13:19:21 +0000 (13:19 +0000)]
Add different libc ldscript: the one without libssp --
we don't have it when MK_SSP==no.

This fixes compilation on MIPS.

Reviewed by: imp
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8212

7 years agoUse M_WAITOK in PIO_KEYMAP ioctl
emaste [Wed, 12 Oct 2016 12:56:18 +0000 (12:56 +0000)]
Use M_WAITOK in PIO_KEYMAP ioctl

The malloc return value is not checked.

Submitted by: CTurt <ecturt@gmail.com>
MFC after: 1 week

7 years agoremove a few stray spaces from sys/param.h
avg [Wed, 12 Oct 2016 11:17:10 +0000 (11:17 +0000)]
remove a few stray spaces from sys/param.h

7 years agobump __FreeBSD_version for libzfs_core.h
avg [Wed, 12 Oct 2016 11:12:31 +0000 (11:12 +0000)]
bump __FreeBSD_version for libzfs_core.h

7 years agoUse copyout() instead of pointing sbuf to user-space buffer.
mav [Wed, 12 Oct 2016 08:25:13 +0000 (08:25 +0000)]
Use copyout() instead of pointing sbuf to user-space buffer.

MFC after: 2 weeks

7 years agoinstall header files required development with libzfs_core
avg [Wed, 12 Oct 2016 07:08:32 +0000 (07:08 +0000)]
install header files required development with libzfs_core

libzfs_core provides a rather limited but committed (stable) interface
for working with ZFS.  We install libzfs_core shared library but we do
not install header files required for developing programs that use
the library.  This change is to install the required header files
libzfs_core.h, libnvpair.h and sys/nvpair.h.

The headers are installed into the same locations as on illumos.

Reviewed by: mav, markj
Differential Revision: https://reviews.freebsd.org/D8005

7 years agosmbus: allow child devices to be added via hints
avg [Wed, 12 Oct 2016 06:58:01 +0000 (06:58 +0000)]
smbus: allow child devices to be added via hints

This will allow to add slave drivers in the same fashion as for iicbus.

Also, allow other code to add a child device and set its 'addr' ivar.
The ivar can only be set if it's unset, it can not be changed.
That could be used, for example, by a platform driver that has
a precise description of the hardware and, thus, knows what drivers
can handle what slaves.

The slave auto-probing code is unsafe and broken because it uses
7-bit slave addresses.  It's going to be removed.

Note: internally the driver uses address of zero as an unset address
while smbus_get_addr() returns it as -1 for compatibility reasons.
The address is expected to be unset only for children that do not
work with slaves like, for example, smb(4).

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D8173

7 years agoFix typo in comment
gonzo [Wed, 12 Oct 2016 05:35:57 +0000 (05:35 +0000)]
Fix typo in comment

Spotted by: loos

7 years agoMake BCM28x USB driver compatible with upstream device tree
gonzo [Wed, 12 Oct 2016 03:36:46 +0000 (03:36 +0000)]
Make BCM28x USB driver compatible with upstream device tree

This should have been committed in r307093: resource allocation depends
on source of the device tree. upstream dts has extra interrupt that we can
ignore

7 years agoMake VCHI driver compatible with upstream DT
gonzo [Wed, 12 Oct 2016 03:08:58 +0000 (03:08 +0000)]
Make VCHI driver compatible with upstream DT

- Add compatibility string
- Compensate difference in base address between our custom DTB and upstream one

7 years agoMake BCM283x USB driver compatible with upstream DT
gonzo [Wed, 12 Oct 2016 03:07:49 +0000 (03:07 +0000)]
Make BCM283x USB driver compatible with upstream DT

- Make resource allocation logic depend on compatibility string
    to check what format of DTS node should be used - FreeBSD's or upstream

7 years agoMake BCM2835 GPIO driver compatible with upstream DT
gonzo [Wed, 12 Oct 2016 03:06:05 +0000 (03:06 +0000)]
Make BCM2835 GPIO driver compatible with upstream DT

- Add compatibility string
- Make reserverd and read-only properties optional

7 years agoAdd compatibility string from upstream DT
gonzo [Wed, 12 Oct 2016 03:03:55 +0000 (03:03 +0000)]
Add compatibility string from upstream DT

7 years agoMake framebuffer driver compatible with upstream DT
gonzo [Wed, 12 Oct 2016 03:03:05 +0000 (03:03 +0000)]
Make framebuffer driver compatible with upstream DT

- Add compatibility string
- Add simplebus as possible parent bus

7 years agoAdd compatible strings used in upstream dts files
gonzo [Wed, 12 Oct 2016 03:00:42 +0000 (03:00 +0000)]
Add compatible strings used in upstream dts files

7 years agoMake sure intc is attached before interrupt consumers
gonzo [Wed, 12 Oct 2016 02:58:27 +0000 (02:58 +0000)]
Make sure intc is attached before interrupt consumers

If pass order is not specified devices are attached in the order they are
defined in dts. Some interrupt consumers may be defined before intc. Also
make sure intc interrupt-parent local_intc is attached before intc itself.

7 years agoCurrently, when tcp_input() receives a packet on a session that matches a
jtl [Wed, 12 Oct 2016 02:30:33 +0000 (02:30 +0000)]
Currently, when tcp_input() receives a packet on a session that matches a
TCPCB, it checks (so->so_options & SO_ACCEPTCONN) to determine whether or
not the socket is a listening socket. However, this causes the code to
access a different cacheline. If we first check if the socket is in the
LISTEN state, we can avoid accessing so->so_options when processing packets
received for ESTABLISHED sessions.

If INVARIANTS is defined, the code still needs to access both variables to
check that so->so_options is consistent with the state.

Reviewed by: gallatin
MFC after: 1 week
Sponsored by: Netflix

7 years agoIn the TCP stack, the hhook(9) framework provides hooks for kernel modules
jtl [Wed, 12 Oct 2016 02:16:42 +0000 (02:16 +0000)]
In the TCP stack, the hhook(9) framework provides hooks for kernel modules
to add actions that run when a TCP frame is sent or received on a TCP
session in the ESTABLISHED state. In the base tree, this functionality is
only used for the h_ertt module, which is used by the cc_cdg, cc_chd, cc_hd,
and cc_vegas congestion control modules.

Presently, we incur overhead to check for hooks each time a TCP frame is
sent or received on an ESTABLISHED TCP session.

This change adds a new compile-time option (TCP_HHOOK) to determine whether
to include the hhook(9) framework for TCP. To retain backwards
compatibility, I added the TCP_HHOOK option to every configuration file that
already defined "options INET". (Therefore, this patch introduces no
functional change. In order to see a functional difference, you need to
compile a custom kernel without the TCP_HHOOK option.) This change will
allow users to easily exclude this functionality from their kernel, should
they wish to do so.

Note that any users who use a custom kernel configuration and use one of the
congestion control modules listed above will need to add the TCP_HHOOK
option to their kernel configuration.

Reviewed by: rrs, lstewart, hiren (previous version), sjg (makefiles only)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D8185

7 years agoifnet: Use if_link_state snapshot to invoke ifnet_link_event
sephe [Wed, 12 Oct 2016 01:52:29 +0000 (01:52 +0000)]
ifnet: Use if_link_state snapshot to invoke ifnet_link_event

So that everyone in this task have consistent view of link state.

Reviewed by: ae
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8214

7 years agoUse correct size type in do_setopt_accept_filter
emaste [Wed, 12 Oct 2016 00:56:49 +0000 (00:56 +0000)]
Use correct size type in do_setopt_accept_filter

Submitted by: ecturt@gmail.com

7 years agoExtract suffix rules into bsd.suffixes[-posix].mk.
jonathan [Wed, 12 Oct 2016 00:42:46 +0000 (00:42 +0000)]
Extract suffix rules into bsd.suffixes[-posix].mk.

Refactor make suffix rules into separate files (one for POSIX and one not),
and rationalise the rules so that bsd.lib.mk can contain only those rules
that are library-specific (.c.po and .c.pico).

This can be accomplished by adding ${STATIC_CFLAGS} to the .c.o rule
unconditionally. STATIC_CFLAGS are only defined for use by sys.mk rules in
lib/libpam/Makefile.inc (see r227797), so it should be safe to include
them unconditionally in sys.mk's .c.o rule (tested by make universe and a
ports exp-run).

Reviewed by: bdrewery, sjg
Approved by: rwatson (mentor)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D6805

7 years agoInclude stubs even on the platforms we don't support so libsysdecode
imp [Tue, 11 Oct 2016 22:54:29 +0000 (22:54 +0000)]
Include stubs even on the platforms we don't support so libsysdecode
continues to build.

7 years agoProperly include the 802.11n PHY support files when the BWM_GPL_PHY
imp [Tue, 11 Oct 2016 22:32:12 +0000 (22:32 +0000)]
Properly include the 802.11n PHY support files when the BWM_GPL_PHY
option is included. Remove the comment suggesting that people
uncomment things because it is OBE.

7 years agoAdd efivar(1) to manipulate EFI variables. It uses a similar command
imp [Tue, 11 Oct 2016 22:31:45 +0000 (22:31 +0000)]
Add efivar(1) to manipulate EFI variables. It uses a similar command
line interface to the Linux program, as well as adding a number of
useful features to make using it in shell scripts easier (since we
don't have a filesystem to fall back on interacting with).

Differential Revision: https://reviews.freebsd.org/D8128
Reviewed by: kib@, wblock@, Ganael Laplanche

7 years agoCreate libefivar library. This library aims to provide
imp [Tue, 11 Oct 2016 22:30:41 +0000 (22:30 +0000)]
Create libefivar library. This library aims to provide
the same API as the GPL'd version of this library. It implements the common
Linux API for programatically manipulating UEFI environment varibales using
the UEFI Runtime Services the kernel provides. It replaces the old efi
library since it is programmed to a different interface, but retails the
CHAR16 to UTF-8 and vice versa conversion routines. The new name is to match
Linux program's expectations.

Differential Revision: https://reviews.freebsd.org/D8128
Reviewed by: kib@, wblock@, Ganael Laplanche

7 years agoCreate /dev/efidev to provide an ioctl interface to
imp [Tue, 11 Oct 2016 22:24:30 +0000 (22:24 +0000)]
Create /dev/efidev to provide an ioctl interface to
userland.  It supports userland interfaces to UEFI Runtime Services. This is
indended to the the MI portion of EFI RuntimeServices support.

Differential Revision: https://reviews.freebsd.org/D8128
Reviewed by: kib@, wblock@, Ganael Laplanche

7 years agoMake Rapsberry Pi watchdog driver compatible with upstream DTS
gonzo [Tue, 11 Oct 2016 21:40:15 +0000 (21:40 +0000)]
Make Rapsberry Pi watchdog driver compatible with upstream DTS

- Fix compatibility strings
- Compensate the difference in base address for our custom DTS and
    upstream one (for backward compatibility)

7 years agoMake intc driver compatible with upstream DTS
gonzo [Tue, 11 Oct 2016 21:37:34 +0000 (21:37 +0000)]
Make intc driver compatible with upstream DTS

- Fix compatibility strings
- Properly decode upstream's two-cell interrupt specs. Our home-made dts
    does not have two-cell interrupts so no need to preserve backward
    compatibility

7 years agoDon't use fmaxl/fminl on platforms with no long double support,
br [Tue, 11 Oct 2016 20:31:59 +0000 (20:31 +0000)]
Don't use fmaxl/fminl on platforms with no long double support,
use fmax/fmin instead.

This fixes fmaxmin test failure on MIPS64.

Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8216

7 years agoWhen downgrading exclusively busied page to shared-busy state, wakeup
kib [Tue, 11 Oct 2016 18:09:37 +0000 (18:09 +0000)]
When downgrading exclusively busied page to shared-busy state, wakeup
waiters.  Otherwise, owners of the shared-busy state are left blocked
and might get into a deadlock.

Note that the vm_page_busy_downgrade() function is not used in the
tree right now.

Reported and tested by: pho (previous version)
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D8195

7 years agoMake LLTABLE list lock private for if_llatbl.c
ae [Tue, 11 Oct 2016 17:41:13 +0000 (17:41 +0000)]
Make LLTABLE list lock private for if_llatbl.c

Rename lock and macros to reflect that it protects V_lltables list.

7 years agoFix printf format warning.
jhb [Tue, 11 Oct 2016 17:11:17 +0000 (17:11 +0000)]
Fix printf format warning.

7 years agoINTRNG - fix MSI/MSIX release path
gonzo [Tue, 11 Oct 2016 17:00:29 +0000 (17:00 +0000)]
INTRNG - fix MSI/MSIX release path

Use isrc in attached MSI data structure instead of using map's
isrc directly. map's isrc is set to NULL on IRQ deactivation
which happens prior to pci_release_msi so MSI_RELEASE_MSI
receives array of NULLs

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D8206

7 years agoCorrected non-portable reuse of va_list in dt_printf()
gnn [Tue, 11 Oct 2016 16:12:12 +0000 (16:12 +0000)]
Corrected non-portable reuse of va_list in dt_printf()

Submitted by: Graeme Jenkinson
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8157

7 years agoRemove mqtest{3,4} from the obsoleted list.
kib [Tue, 11 Oct 2016 15:55:45 +0000 (15:55 +0000)]
Remove mqtest{3,4} from the obsoleted list.

Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

7 years agoFix copy/paste bug in r306747.
mav [Tue, 11 Oct 2016 15:27:39 +0000 (15:27 +0000)]
Fix copy/paste bug in r306747.

Submitted by: emaste, pfg
MFC after: 3 days

7 years agoFix bug where malloc(.., M_NOWAIT) return value is not checked, Change to
sbruno [Tue, 11 Oct 2016 14:08:53 +0000 (14:08 +0000)]
Fix bug where malloc(.., M_NOWAIT) return value is not checked, Change to
M_WAITOK and move outside the mutex

Submitted by: shurd
Reviewed by: mmacy@nextbsd.org
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D7649

7 years agoAdd Cavium sponsor entity
emaste [Tue, 11 Oct 2016 13:30:39 +0000 (13:30 +0000)]
Add Cavium sponsor entity

7 years agosfxge(4): update external port mapping for Medford
arybchik [Tue, 11 Oct 2016 13:08:48 +0000 (13:08 +0000)]
sfxge(4): update external port mapping for Medford

Extend the mapping table for external port numbering to support port modes
which output to the second external port only. Where supported, map from
the current port mode rather than inferring from all the available modes.
Updated comments for clarity.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8210

7 years agoCorrect indent.
kib [Tue, 11 Oct 2016 11:46:02 +0000 (11:46 +0000)]
Correct indent.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

7 years agoFill msg_len for the initial element of msgvec.
kib [Tue, 11 Oct 2016 11:45:12 +0000 (11:45 +0000)]
Fill msg_len for the initial element of msgvec.

Submitted by: Daniel Salzman <daniel.salzman@nic.cz>
MFC after: 3 days

7 years agohyperv/hn: Rework link status support.
sephe [Tue, 11 Oct 2016 02:54:56 +0000 (02:54 +0000)]
hyperv/hn: Rework link status support.

This is the preamble for network device SR-IOV and
NDIS_STATUS_NETWORK_CHANGE handling.

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

7 years agohyperv/vmbus: Allow driver to inject synchronous task into channel taskq.
sephe [Tue, 11 Oct 2016 02:43:23 +0000 (02:43 +0000)]
hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.

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

7 years agoAdd the ability to override the size of the swap partition when building
np [Mon, 10 Oct 2016 22:36:44 +0000 (22:36 +0000)]
Add the ability to override the size of the swap partition when building
VM images.  The default continues to be 1G.

Reviewed by: gjb@
Sponsored by: Chelsio Communications

7 years agomakewhatis: make output reproducible
emaste [Mon, 10 Oct 2016 19:09:35 +0000 (19:09 +0000)]
makewhatis: make output reproducible

The mandoc search database generation uses each page's inode number as
a hash key to index hard linked pages only once.  However, it also
processed the pages ordered by hash key resulting in effectively non-
deterministic output.

Instead:

1) provide fts_open() with a comparison function to process directories
   and files in a deterministic order
2) in addition to the existing hash, insert pages into a linked list
   which will be sorted (by virtue of 1)
3) iterate over pages by the list in 2, instead of hash order

I will work on upstreaming this change.

Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8213

7 years agoFreeBSD 11.0 release date added.
maxim [Mon, 10 Oct 2016 18:36:26 +0000 (18:36 +0000)]
FreeBSD 11.0 release date added.

7 years agoAdd missing *.gz extension.
avos [Mon, 10 Oct 2016 17:18:23 +0000 (17:18 +0000)]
Add missing *.gz extension.

7 years agombuf(9), mbuf_tags(9): fix function prototypes.
avos [Mon, 10 Oct 2016 17:16:02 +0000 (17:16 +0000)]
mbuf(9), mbuf_tags(9): fix function prototypes.

- Add m_getclr(9) symlink to ObsoleteFiles.inc (removed in r295481).
- Add const qualifiers in m_dup(), m_dup_pkthdr() and m_tag_copy_chain()
(r286450).
- Fix m_dup_pkthdr() definition (it's not the same as m_move_pkthdr()).

MFC after: 5 days

7 years agoAdd a missing word.
jhb [Mon, 10 Oct 2016 17:00:12 +0000 (17:00 +0000)]
Add a missing word.

MFC after: 1 month

7 years agosrc.conf.5: regen after r306965
emaste [Mon, 10 Oct 2016 15:47:30 +0000 (15:47 +0000)]
src.conf.5: regen after r306965

7 years agoCorrect sense of WITHOUT_MANDOCDB knob
emaste [Mon, 10 Oct 2016 15:40:08 +0000 (15:40 +0000)]
Correct sense of WITHOUT_MANDOCDB knob

WITHOUT_MANDOCDB *disables* the use of mandoc's makewhatis.

7 years agoRemove old makewhatis(1) man page when using mandoc
emaste [Mon, 10 Oct 2016 15:29:59 +0000 (15:29 +0000)]
Remove old makewhatis(1) man page when using mandoc

mandoc installs makewhatis(8)

7 years agoSkip test on MIPS as we don't have shared page implemented yet.
br [Mon, 10 Oct 2016 14:21:40 +0000 (14:21 +0000)]
Skip test on MIPS as we don't have shared page implemented yet.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agochown: use NULL instead of 0 for null pointer
emaste [Mon, 10 Oct 2016 14:21:21 +0000 (14:21 +0000)]
chown: use NULL instead of 0 for null pointer

7 years agoEnsure data in pipe is available to read.
br [Mon, 10 Oct 2016 13:40:05 +0000 (13:40 +0000)]
Ensure data in pipe is available to read.
Useful for latest (5th, direct mode) test only.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agosfxge(4): sync tlv_layout.h with firmwaresrc and update port-mode definition use
arybchik [Mon, 10 Oct 2016 09:54:01 +0000 (09:54 +0000)]
sfxge(4): sync tlv_layout.h with firmwaresrc and update port-mode definition use

It fixes driver attach issue to a new firmware which reports a new
port-modes.

Reviewed by:    gnn
Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D8203

7 years agohyperv/hn: Suffix NDIS offload size with NDIS version.
sephe [Mon, 10 Oct 2016 06:14:38 +0000 (06:14 +0000)]
hyperv/hn: Suffix NDIS offload size with NDIS version.

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

7 years agohyperv/hn: Generalize RSS capabilities query.
sephe [Mon, 10 Oct 2016 05:59:30 +0000 (05:59 +0000)]
hyperv/hn: Generalize RSS capabilities query.

- Support NDIS < 6.30.
- Stringent response checks.

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

7 years agohyperv/hn: Fix if_hw_tsomax setup.
sephe [Mon, 10 Oct 2016 05:50:01 +0000 (05:50 +0000)]
hyperv/hn: Fix if_hw_tsomax setup.

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

7 years agohyperv/hn: Fix checksum offload settings
sephe [Mon, 10 Oct 2016 05:41:39 +0000 (05:41 +0000)]
hyperv/hn: Fix checksum offload settings

The _correct_ way to identify the supported checksum offloading and
TSO parameters is to query OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES.

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

7 years agoAdd CHIP dts into the build
manu [Mon, 10 Oct 2016 04:53:15 +0000 (04:53 +0000)]
Add CHIP dts into the build

7 years agoSet INLINE_LIMIT in the aarch64 case for gcc.
andrew [Sun, 9 Oct 2016 21:47:20 +0000 (21:47 +0000)]
Set INLINE_LIMIT in the aarch64 case for gcc.

Submitted by: andreast
MFC after: 1 week

7 years agoARM: Remove unused includes.
mmel [Sun, 9 Oct 2016 10:25:47 +0000 (10:25 +0000)]
ARM: Remove unused includes.

MFC after: 1 week