]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoCorrect MDSRCS use in <arch>/string/Makefile.inc.
brooks [Thu, 2 Mar 2017 17:05:52 +0000 (17:05 +0000)]
Correct MDSRCS use in <arch>/string/Makefile.inc.

- Remove .c files which duplicate entries in MISRCS.
- Use the same, less merge conflict prone style in all cases.
- Use MDSRCS for mips (.c and .S files both ended up in SRCS).
- Remove pointless sparc64 Makefile.inc.
- Remove uninformative foreign VCS ID entries.

Reviewed by: emaste, imp, jhb
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D9841

7 years agoInline some trivial wrapper functions.
mav [Thu, 2 Mar 2017 16:14:15 +0000 (16:14 +0000)]
Inline some trivial wrapper functions.

MFC after: 2 weeks

7 years agoFix date.
des [Thu, 2 Mar 2017 14:50:01 +0000 (14:50 +0000)]
Fix date.

Reported by: delphij, mckay
MFC with: r314528

7 years agoImplement taskqueue_poll_is_busy() for use by the LinuxKPI.
hselasky [Thu, 2 Mar 2017 12:20:23 +0000 (12:20 +0000)]
Implement taskqueue_poll_is_busy() for use by the LinuxKPI.
Refer to comment above function for a detailed description.

Discussed with: kib @
MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agoExecute last ZIO of log commit synchronously.
mav [Thu, 2 Mar 2017 07:55:47 +0000 (07:55 +0000)]
Execute last ZIO of log commit synchronously.

For short transactions overhead of context switch can be too large.
Skipping it gives significant latency reduction.  For large ones,
including multiple ZIOs, latency is less critical, while throughput
there may become limited by checksumming speed of single CPU core.
To get best of both cases, execute last ZIO directly from calling
thread context to save latency, while all others (if there are any)
enqueue to taskqueues in traditional way.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

7 years agoCompletely skip cache flushing for not supporting log devices.
mav [Thu, 2 Mar 2017 07:50:06 +0000 (07:50 +0000)]
Completely skip cache flushing for not supporting log devices.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

7 years agoloader.efi: reduce the size of the staging area if necessary
dexuan [Thu, 2 Mar 2017 07:25:50 +0000 (07:25 +0000)]
loader.efi: reduce the size of the staging area if necessary

The loader assumes physical memory in [2MB, 2MB + EFI_STAGING_SIZE)
is Conventional Memory, but actually it may not, e.g. in the case
of Hyper-V Generation-2 VM (i.e. UEFI VM) running on Windows
Server 2012 R2 host, there is a BootServiceData memory block at
the address 47.449MB and the memory is not writable.

Without the patch, the loader will crash in efi_copy_finish():
see PR 211746.

The patch verifies the end of the staging area, and reduces its
size if necessary. This way, the loader will not try to write into
the BootServiceData memory any longer.

Thank Marcel Moolenaar for helping me on this issue!

The patch also allocates the staging area in the first 1GB memory.
See the comment in the patch for this.

PR: 211746
Reviewed by: marcel, kib, sephe
Approved by: sephe (mentor)
MFC after: 2 weeks
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D9686

7 years agoWordsmith mlx4{en,ib}(4)
ngie [Thu, 2 Mar 2017 06:57:13 +0000 (06:57 +0000)]
Wordsmith mlx4{en,ib}(4)

- Replace the "following lines" with more terse phrases.
- Use .Lk for the mellanox URL.
- Reword the SUPPORT section so it's less wordy.

The DESCRIPTION section suggestions are still outstanding; improving
the section requires additional review to make sure the nuance/message
is correct per the original intent.

Bump .Dd for the change

Submitted by: wblock
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D9241

7 years agoAdd missing section to .Xr macro calls for wpifw(4)
ngie [Thu, 2 Mar 2017 06:25:50 +0000 (06:25 +0000)]
Add missing section to .Xr macro calls for wpifw(4)

The driver manpage for wpifw(4) is missing, but will be added soon. This
fixes the other 2 .Xr calls lacking sections to match the 3rd,
syntactically correct, reference in the SEE ALSO section.

MFC after: 1 week
Reported by: make manlint
Sponsored by: Dell EMC Isilon

7 years agoSort .Xr: ahci(4) comes before ahd(4)
ngie [Thu, 2 Mar 2017 06:22:05 +0000 (06:22 +0000)]
Sort .Xr: ahci(4) comes before ahd(4)

X-MFC with: r314110
Reported by: make manlint
Sponsored by: Dell EMC Isilon

7 years agoAdd missing section when referencing ctl(4) via .Xr macro
ngie [Thu, 2 Mar 2017 06:03:21 +0000 (06:03 +0000)]
Add missing section when referencing ctl(4) via .Xr macro

MFC after: 1 week
Reported by: make manlint
Sponsored by: Dell EMC Isilon

7 years agokern.cam.da.X.delete_method: add -width to .Bl macro call
ngie [Thu, 2 Mar 2017 06:02:17 +0000 (06:02 +0000)]
kern.cam.da.X.delete_method: add -width to .Bl macro call

Now the section width is set appropriately per the BIO_DELETE
parameter being described.

Reported by: make manlint
MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Thu, 2 Mar 2017 05:04:45 +0000 (05:04 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agomakefs: remove clause 3 & 4 from Manuel Bouyer license
emaste [Thu, 2 Mar 2017 04:11:18 +0000 (04:11 +0000)]
makefs: remove clause 3 & 4 from Manuel Bouyer license

ffs_bswap.c 1.34
ufs_bswap.h 1.34

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

7 years agomakefs: remove archaic __P prototypes from ufs_bswap.h
emaste [Thu, 2 Mar 2017 04:08:14 +0000 (04:08 +0000)]
makefs: remove archaic __P prototypes from ufs_bswap.h

This reduces differences with NetBSD

Sponsored by: The FreeBSD Foundation

7 years ago[intelspi][bytgio] Fix buildworld with MODULES_WITH_WORLD set
gonzo [Thu, 2 Mar 2017 03:19:39 +0000 (03:19 +0000)]
[intelspi][bytgio] Fix buildworld with MODULES_WITH_WORLD set

Add opt_platform.h and opt_acpi.h to the dependencies so modules can be
built as a part of buildworld when MODULES_WITH_WORLD is set

Reported by: Andre Albsmeier (for 11-stable)
MFC after: 1 day

7 years agoregen src.conf.5 after r313169
emaste [Thu, 2 Mar 2017 02:10:59 +0000 (02:10 +0000)]
regen src.conf.5 after r313169

Sponsored by: The FreeBSD Foundation

7 years agoExpose the sbuf_putbuf() symbol to libsbuf. There are a few other symbols
scottl [Thu, 2 Mar 2017 01:39:23 +0000 (01:39 +0000)]
Expose the sbuf_putbuf() symbol to libsbuf.  There are a few other symbols
that are present but not exposed, like get/set/clear flags, not sure if they
need to be exposed at this point.

Sponsored by: Netflix

7 years agoUpdate jemalloc to 4.5.0.
jasone [Thu, 2 Mar 2017 01:14:48 +0000 (01:14 +0000)]
Update jemalloc to 4.5.0.

7 years agoUpdate to reflect that SHA-1 has now been broken.
des [Thu, 2 Mar 2017 00:27:21 +0000 (00:27 +0000)]
Update to reflect that SHA-1 has now been broken.

Submitted by: ak
MFC after: 1 week

7 years agoUpgrade to OpenSSH 7.3p1.
des [Thu, 2 Mar 2017 00:11:32 +0000 (00:11 +0000)]
Upgrade to OpenSSH 7.3p1.

7 years agoImport dma snapshot from git 2017-02-10
bapt [Wed, 1 Mar 2017 21:42:22 +0000 (21:42 +0000)]
Import dma snapshot from git 2017-02-10

The only change is:
use basename to select executable identity

PR: 216910
Submitted by: Andrej Ebert <andrej@ebert.su>

7 years agocxgbe/iw_cxgbe: Do not check the size of the memory region being
np [Wed, 1 Mar 2017 20:23:21 +0000 (20:23 +0000)]
cxgbe/iw_cxgbe: Do not check the size of the memory region being
registered.  T4/5/6 have no internal limit on this size.  This is
probably a copy paste from the T3 iw_cxgb driver.

MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agoFix NPTv6 rule counters when one_pass is not enabled.
ae [Wed, 1 Mar 2017 20:00:19 +0000 (20:00 +0000)]
Fix NPTv6 rule counters when one_pass is not enabled.

Consider the rule matching when both @done and @retval values
returned from ipfw_run_eaction() are zero. And modify ipfw_nptv6()
to return IP_FW_DENY and @done=0 when addresses do not match.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

7 years agoSplit the ficl CFLAGS when they refer to an arch-specific include path.
pfg [Wed, 1 Mar 2017 19:36:32 +0000 (19:36 +0000)]
Split the ficl CFLAGS when they refer to an arch-specific include path.

This is a minimal attempt to keep consistency in the Makefiles so that
moving ficl to somwehere like contrib will be less error prone.

MFC after: 1 week

7 years agoloader: r314112 did introduce dereference freed pointer entry
tsoome [Wed, 1 Mar 2017 19:02:43 +0000 (19:02 +0000)]
loader: r314112 did introduce dereference freed pointer entry

CID: 1371675
Reported by: Coverity
Reviewed by: jhb, allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D9846

7 years agoMake gtaskqueue compatible with drm-next such that they can be used with the
sbruno [Wed, 1 Mar 2017 18:37:35 +0000 (18:37 +0000)]
Make gtaskqueue compatible with drm-next such that they can be used with the
linuxkpi tasklets.

Submitted by: mmacy@nextbsd.org
Reported by: hps

7 years agoDo not invoke the resize event when previous provider's size was zero.
ae [Wed, 1 Mar 2017 18:03:32 +0000 (18:03 +0000)]
Do not invoke the resize event when previous provider's size was zero.
This is similar to r303637 fix for geom_disk.

Reported by: avg
Tested by: avg
MFC after: 1 week

7 years agoAdd check missed in r314257.
mav [Wed, 1 Mar 2017 17:35:56 +0000 (17:35 +0000)]
Add check missed in r314257.

MFC after: 11 days

7 years agoRemove hard line breaks from README.md
emaste [Wed, 1 Mar 2017 15:39:58 +0000 (15:39 +0000)]
Remove hard line breaks from README.md

This is rendered with variable-width formatting and a proportional font,
so hard line breaks before 80 cols are undesired.

7 years agoAdd some explanation for SV_TIMEKEEP flag.
kib [Wed, 1 Mar 2017 12:10:24 +0000 (12:10 +0000)]
Add some explanation for SV_TIMEKEEP flag.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

7 years agoWith the removal of IA64, the only arch which uses ia32 compat is amd64.
kib [Wed, 1 Mar 2017 11:39:29 +0000 (11:39 +0000)]
With the removal of IA64, the only arch which uses ia32 compat is amd64.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoSet USB OTG mode to host (missed in vendor DTS for some reason).
br [Wed, 1 Mar 2017 10:55:12 +0000 (10:55 +0000)]
Set USB OTG mode to host (missed in vendor DTS for some reason).

Sponsored by: DARPA, AFRL

7 years agoUse vm_map_insert() instead of vm_map_find() in elf_map_insert().
kib [Wed, 1 Mar 2017 10:28:15 +0000 (10:28 +0000)]
Use vm_map_insert() instead of vm_map_find() in elf_map_insert().

Elf_map_insert() needs to create mapping at the known fixed address.
Usage of vm_map_find() assumes, on the other hand, that any suitable
address space range above or equal the specified hint, is acceptable.
Due to operating on the fresh or cleared address space, vm_map_find()
usually creates mapping starting exactly at hint.

Switch to vm_map_insert() use to clearly request fixed mapping from
the VM.

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

7 years agoWhen deallocating the vm object in elf_map_insert() due to
kib [Wed, 1 Mar 2017 10:22:07 +0000 (10:22 +0000)]
When deallocating the vm object in elf_map_insert() due to
vm_map_insert() failure, drop the vnode lock around the call to
vm_object_deallocate().

Since the deallocated object is the vm object of the vnode, we might
get the vnode lock recursion there.  In fact, it is almost impossible
to make vm_map_insert() failing there on stock kernel.

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

7 years agohyperv/hn: Misaligned chimney sending buffers should not be used
sephe [Wed, 1 Mar 2017 09:05:12 +0000 (09:05 +0000)]
hyperv/hn: Misaligned chimney sending buffers should not be used

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

7 years agohyperv/hn: Make sure that RNDIS packet message is at least 4B aligned.
sephe [Wed, 1 Mar 2017 08:50:41 +0000 (08:50 +0000)]
hyperv/hn: Make sure that RNDIS packet message is at least 4B aligned.

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

7 years agohyperv/hn: Simplify RNDIS packet total length calculation.
sephe [Wed, 1 Mar 2017 08:24:17 +0000 (08:24 +0000)]
hyperv/hn: Simplify RNDIS packet total length calculation.

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

7 years agoAdd kernel support for the TP-LINK MR3040.
imp [Wed, 1 Mar 2017 05:53:53 +0000 (05:53 +0000)]
Add kernel support for the TP-LINK MR3040.

Submitted by: Chris Christensen <cchristensen@llnw.com>
Pull Request: https://github.com/freebsd/freebsd/pull/38

7 years agoBack out r314471. In https://reviews.freebsd.org/D1858 it was clear
imp [Wed, 1 Mar 2017 05:38:04 +0000 (05:38 +0000)]
Back out r314471. In https://reviews.freebsd.org/D1858 it was clear
that this shouldn't go in. I was unaware when I merged the pull
request. I don't wish to upset the status quo, so backout per
project practice.

Pull Request: https://github.com/freebsd/freebsd/pull/92
Noted by: hrs@

7 years agoUse :H to manipulate .CURDIR-relative paths instead of ../
ngie [Wed, 1 Mar 2017 05:21:21 +0000 (05:21 +0000)]
Use :H to manipulate .CURDIR-relative paths instead of ../

This simplifies make output

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoSimplify idioms in Makefiles further
ngie [Wed, 1 Mar 2017 05:19:35 +0000 (05:19 +0000)]
Simplify idioms in Makefiles further

- Use SRCTOP-relative paths instead of .CURDIR-relative ones where possible
- Use :H to manipulate .CURDIR in areas instead of ..-relative paths.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFixed TCO v3 tick convert
imp [Wed, 1 Mar 2017 05:18:43 +0000 (05:18 +0000)]
Fixed TCO v3 tick convert

TCO v3's internal timer is stored as seconds.

Submitted by: Denir Li <denir-li@users.noreply.github.com>
Pull Request: https://github.com/freebsd/freebsd/pull/51
Pull Request: https://github.com/freebsd/freebsd/pull/52

7 years agolocks: fix compilation with KTR wihout KTR_LOCKS
mjg [Wed, 1 Mar 2017 05:18:22 +0000 (05:18 +0000)]
locks: fix compilation with KTR wihout KTR_LOCKS

While here wrap the overly long line.

Reported by: np

7 years agoSimplify idioms in usr.sbin/lpr Makefiles
ngie [Wed, 1 Mar 2017 05:14:45 +0000 (05:14 +0000)]
Simplify idioms in usr.sbin/lpr Makefiles

Use :H instead of .CURDIR-relative pathing to simplify make output, etc.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agolocks: ensure proper barriers are used with atomic ops when necessary
mjg [Wed, 1 Mar 2017 05:06:21 +0000 (05:06 +0000)]
locks: ensure proper barriers are used with atomic ops when necessary

Unclear how, but the locking routine for mutexes was using the *release*
barrier instead of acquire. This must have been either a copy-pasto or bad
completion.

Going through other uses of atomics shows no barriers in:
- upgrade routines (addressed in this patch)
- sections protected with turnstile locks - this should be fine as necessary
  barriers are in the worst case provided by turnstile unlock

I would like to thank Mark Millard and andreast@ for reporting the problem and
testing previous patches before the issue got identified.

ps.
  .-'---`-.
,'          `.
|             \
|              \
\           _  \
,\  _    ,'-,/-)\
( * \ \,' ,' ,'-)
 `._,)     -',-')
   \/         ''/
    )        / /
   /       ,'-'

Hardware provided by: IBM LTC

7 years agoCreate README.md file for viewing on github.
imp [Wed, 1 Mar 2017 05:05:05 +0000 (05:05 +0000)]
Create README.md file for viewing on github.

This is a lightly edited README using github's MARKDOWN.

Submitted by: Johan <johan2422@gmail.com>
Pull Request: https://github.com/freebsd/freebsd/pull/56

7 years agoSimplify/improve idioms in usr.sbin/ntp Makefiles
ngie [Wed, 1 Mar 2017 04:54:06 +0000 (04:54 +0000)]
Simplify/improve idioms in usr.sbin/ntp Makefiles

- Use SRCTOP-relative paths to other directories instead of
  .CURDIR-relative ones. This simplifies pathing in make/displayed output.
- Also, use :H where possible/sensical to manipulate .CURDIR-relative
  paths
- Remove superfluous bsd.own.mk .includes which are already handled via
  src.opts.mk .includes

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix VNET - DAD detected duplicate IPv6 address
imp [Wed, 1 Mar 2017 04:47:22 +0000 (04:47 +0000)]
Fix VNET - DAD detected duplicate IPv6 address

Assign a hopefully unique, locally administered etheraddr. - for
epairNa & epairNb

Submitted by: Catalin <sslevil@users.noreply.github.com>
Pull Request: https://github.com/freebsd/freebsd/pull/92

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:41:59 +0000 (04:41 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUpdate tw_cl_share.h to allow 255 LUNs
imp [Wed, 1 Mar 2017 04:40:57 +0000 (04:40 +0000)]
Update tw_cl_share.h to allow 255 LUNs

TW_CL_MAX_NUM_LUNS should not be 16 but I presume 255. I have a 3ware
controller with more than 16 volumes (LUN's) and otherwise all LUN's
above the 16'th are not working.

Submitted by: jcatrysse <j.catrysse@proximedia.be>
Pull Request: https://github.com/freebsd/freebsd/pull/100

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:35:21 +0000 (04:35 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

Also, use :H where possible/sensical to manipulate .CURDIR-relative paths

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoMake wsp process a single touchpad tap and interpret it as a
imp [Wed, 1 Mar 2017 04:27:58 +0000 (04:27 +0000)]
Make wsp process a single touchpad tap and interpret it as a
left-click event.  It can be disabled setting the new
hw.usb.wsp.enable_single_tap_clicks sysctl to 0.

Submitted by: K Staring <qdk@quickdekay.net>
Pull Request: https://github.com/freebsd/freebsd/pull/97

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:24:56 +0000 (04:24 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:24:24 +0000 (04:24 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:23:53 +0000 (04:23 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:22:23 +0000 (04:22 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ${RPCDIR}/ypxfrd.x in
the make targets with ${.ALLSRC} .

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:19:04 +0000 (04:19 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:18:28 +0000 (04:18 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:17:59 +0000 (04:17 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:17:18 +0000 (04:17 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:16:40 +0000 (04:16 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ${RPCDIR}/ypupdate_prot.x in
the make targets with ${.ALLSRC} .

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:14:41 +0000 (04:14 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse .ALLSRC instead of RPCSRC
ngie [Wed, 1 Mar 2017 04:13:31 +0000 (04:13 +0000)]
Use .ALLSRC instead of RPCSRC

This is a trivial simplification in the Makefile, meant to serve as
a good example for what to do with rules like this.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse .ALLSRC instead of RPCSRC
ngie [Wed, 1 Mar 2017 04:12:24 +0000 (04:12 +0000)]
Use .ALLSRC instead of RPCSRC

This is a trivial simplification in the Makefile, meant to serve as
a good example for what to do with rules like this.

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:02:36 +0000 (04:02 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 04:00:17 +0000 (04:00 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoUse SRCTOP-relative paths to other directories instead of .CURDIR-relative ones
ngie [Wed, 1 Mar 2017 03:59:18 +0000 (03:59 +0000)]
Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

The SRCTOP conversion simplifies pathing in make/displayed output.

Also, while here, change a hardcoded path to ar5523.bin.uu in the make target
with ${.ALLSRC} .

MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoAdd additional __FreeBSD_version guards around the hsearch_r testcases
ngie [Wed, 1 Mar 2017 03:31:12 +0000 (03:31 +0000)]
Add additional __FreeBSD_version guards around the hsearch_r testcases

The reasoning for this is the same as r276046: to ease MFCing the tests
to ^/stable/10 .

This was accidentally missed in r313439

MFC after: 1 week
X-MFC with: r313439
Sponsored by: Dell EMC Isilon

7 years agoRevert prior commit to restore the files mangled by my "fixing" merge
imp [Wed, 1 Mar 2017 02:10:40 +0000 (02:10 +0000)]
Revert prior commit to restore the files mangled by my "fixing" merge
conflicts for a git rebase I tried to do.

7 years agostrstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert
imp [Wed, 1 Mar 2017 02:07:51 +0000 (02:07 +0000)]
strstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert
and remove clause 3 while I'm here.

7 years agoiwn: fix data rate parsing for Rx radiotap header.
avos [Wed, 1 Mar 2017 00:42:38 +0000 (00:42 +0000)]
iwn: fix data rate parsing for Rx radiotap header.

Tested with Intel 6205, MONITOR mode + RTL8188EU, STA mode.

7 years agoAdd an ATF test for IPv6 SLAAC with multiple fibs
asomers [Wed, 1 Mar 2017 00:28:04 +0000 (00:28 +0000)]
Add an ATF test for IPv6 SLAAC with multiple fibs

Tests that an interface can get a SLAAC address and that it inserts its
routes into the correct fib. Does not test anything to do with NDP.

PR: 196361
Reviewed by: Erick Turnquist <jhujhiti@adjectivism.org>
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9776

7 years agoFix spelling mistake in comment, firmwrae -> firmware
gavin [Tue, 28 Feb 2017 23:55:03 +0000 (23:55 +0000)]
Fix spelling mistake in comment, firmwrae -> firmware

7 years agoRenumber copyright clause 4
imp [Tue, 28 Feb 2017 23:42:47 +0000 (23:42 +0000)]
Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

7 years agoMerge CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
cognet [Tue, 28 Feb 2017 23:30:14 +0000 (23:30 +0000)]
Merge CK as of commit 24d26965d1a28039062ba3bcf9433b623f3d2c5e, to get
a fix in ck_epoch.

7 years agoWhen IPv6 fragments reassembly is complete, update mbuf's csum_data
ae [Tue, 28 Feb 2017 22:58:19 +0000 (22:58 +0000)]
When IPv6 fragments reassembly is complete, update mbuf's csum_data
and csum_flags using information from all fragments. This fixes
dropping of reassembled packets due to wrong checksum when the IPv6
checksum offloading is enabled on a network card.

Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC

7 years agoInitialize pcb_save for thread0.
kib [Tue, 28 Feb 2017 22:54:52 +0000 (22:54 +0000)]
Initialize pcb_save for thread0.

Otherwise kernel traps on NULL dereference if fpu_kern(9) is used from the
thread0 context.

Reported by: cem
Reviewed by: cem, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoAdd Ubiquiti Rocket M support
imp [Tue, 28 Feb 2017 22:49:45 +0000 (22:49 +0000)]
Add Ubiquiti Rocket M support

Updated to use geom_uzip

Submitted by:   Michael Vale <m.vale@live.com.au>
Pull Request:   https://github.com/freebsd/freebsd/pull/16

7 years agoThis should have been K3771_INIT.
imp [Tue, 28 Feb 2017 22:22:53 +0000 (22:22 +0000)]
This should have been K3771_INIT.

Pointy Hat to: imp@

7 years agoSort declaration of sem_clockwait_np
vangyzen [Tue, 28 Feb 2017 21:47:00 +0000 (21:47 +0000)]
Sort declaration of sem_clockwait_np

Also mention <time.h> in sem_timedwait(3), because POSIX does,
and because the user will need it for clockid_t, struct timespec,
and TIMER_ABSTIME.

Reported by: bde
MFC after: 9 days
X-MFC with: r314179
Sponsored by: Dell EMC

7 years agoFix arge0 mdio bus
imp [Tue, 28 Feb 2017 21:39:08 +0000 (21:39 +0000)]
Fix arge0 mdio bus

This makes arge0 phy's attach.

Submitted by: Michael Vale <m.vale@live.com.au>
Pull Request: https://github.com/freebsd/freebsd/pull/16

7 years agoUpdate PICOSTATION_M2HP
imp [Tue, 28 Feb 2017 21:39:00 +0000 (21:39 +0000)]
Update PICOSTATION_M2HP

Make the random number generator work so we can do WPA encryption on the AP's.

Submitted by: Michael Vale <m.vale@live.com.au>
Pull Request: https://github.com/freebsd/freebsd/pull/16

7 years agoProvide a comment on why stdio.h needs to be included.
scottl [Tue, 28 Feb 2017 21:27:51 +0000 (21:27 +0000)]
Provide a comment on why stdio.h needs to be included.

7 years agoInclude stdio.h to fix libsbuf build.
jkim [Tue, 28 Feb 2017 21:18:45 +0000 (21:18 +0000)]
Include stdio.h to fix libsbuf build.

Reviewed by: scottl

7 years agoThe kern.geom.part.auto_resize should be tunable.
oshogbo [Tue, 28 Feb 2017 20:51:20 +0000 (20:51 +0000)]
The kern.geom.part.auto_resize should be tunable.

7 years agodc(1): Introduce e command, equivalent to p, but writes to stderr
pfg [Tue, 28 Feb 2017 20:50:49 +0000 (20:50 +0000)]
dc(1): Introduce e command, equivalent to p, but writes to stderr

Obtained from: OpenBSD
MFC after: 2 weeks

7 years agoFix include/arpa/nameser_compat.h by adding T_DNAME definition.
imp [Tue, 28 Feb 2017 20:34:25 +0000 (20:34 +0000)]
Fix include/arpa/nameser_compat.h by adding T_DNAME definition.
Fixes Apache trafficserver

Submitted by: John J. Rushford <https://github.com/jrushford>
Pull Request: https://github.com/freebsd/freebsd/pull/104

7 years agoAdd support for Vodafone/Huawei K3771.
imp [Tue, 28 Feb 2017 20:25:45 +0000 (20:25 +0000)]
Add support for Vodafone/Huawei K3771.
See also http://www.draisberghof.de/usb_modeswitch/device_reference.txt

Submitted by: Dean Hamstead <https://github.com/djzort>
Pull Request: https://github.com/freebsd/freebsd/pull/76

7 years agoLinux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
dchagin [Tue, 28 Feb 2017 19:55:16 +0000 (19:55 +0000)]
Linux epoll return EEXIST on case when op is EPOLL_CTL_ADD, and the supplied
file descriptor fd is already registered with this epoll instance.

MFC after: 1 month

7 years agoLinux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
dchagin [Tue, 28 Feb 2017 19:54:22 +0000 (19:54 +0000)]
Linux epoll return ENOENT error in case when op is EPOLL_CTL_MOD or
EPOLL_CTL_DEL, and fd is not registered with this epoll instance.

MFC after: 1 month

7 years agoFreeBSD does not have analgue for epill EPOLLPRI event type.
dchagin [Tue, 28 Feb 2017 19:49:21 +0000 (19:49 +0000)]
FreeBSD does not have analgue for epill EPOLLPRI event type.
So, do not set EPOLLPRI event acidently.
Also, do not set EPOLLWRNORM and EPOLLRDNORM events as epoll
do not set this events.

MFC after: 1 month

7 years agoDon't remove ofwdump.8 on FreeBSD/mips.
jhb [Tue, 28 Feb 2017 19:32:45 +0000 (19:32 +0000)]
Don't remove ofwdump.8 on FreeBSD/mips.

FreeBSD/mips has installed ofwdump by default since r288232.

Sponsored by: DARPA / AFRL

7 years agocxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.
np [Tue, 28 Feb 2017 19:27:41 +0000 (19:27 +0000)]
cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.

Sockets representing the TCP endpoints for iWARP connections are
allocated by the ibcore module.  Before this revision they were closed
either by the ibcore module or the iw_cxgbe hardware driver depending on
the state transitions during connection teardown.  This is error prone
and there were cases where both iw_cxgbe and ibcore closed the socket
leading to double-free panics.  The fix is to let ibcore close the
sockets it creates and never do it in the driver.

- Use sodisconnect instead of soclose (preceded by solinger = 0) in the
  driver to tear down an RDMA connection abruptly.  This does what's
  intended without releasing the socket's fd reference.

- Close the socket in ibcore when the iWARP iw_cm_id is destroyed.  This
  works for all kinds of sockets: clients that initiate connections,
  listeners, and sockets accepted off of listeners.

Reviewed by: Steve Wise @ Open Grid Computing, hselasky@
MFC after: 3 days
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D9796

7 years agoAdd prototype for sbuf_putbuf()
scottl [Tue, 28 Feb 2017 19:01:59 +0000 (19:01 +0000)]
Add prototype for sbuf_putbuf()

Sponsored by: Netflix

7 years agoLocal APIC: add support for extended LVT entries found in AMD processors
avg [Tue, 28 Feb 2017 18:48:12 +0000 (18:48 +0000)]
Local APIC: add support for extended LVT entries found in AMD processors

The extended LVT entries can be used to configure interrupt delivery
for various events that are internal to a processor and can use this
feature.

All current processors that support the feature have four of such entries.
The entries are all masked upon the processor reset, but it's possible
that firmware may use some of them.

BIOS and Kernel Developer's Guides for some processor models do not assign
any particular names to the extended LVTs, while other BKDGs provide names
and suggested usage for them.
However, there is no fixed mapping between the LVTs and the processor
events in any processor model that supports the feature.  Any entry can be
assigned to any event.  The assignment is done by programming an offset
of an entry into configuration bits corresponding to an event.

This change does not expose the flexibility that the feature offers.
The change adds just a single method to configure a hardcoded extended LVT
entry to deliver APIC_CMC_INT.  The method is designed to be used with
Machine Check Error Thresholding mechanism on supported processor models.

For references please see BKDGs for families 10h - 16h and specifically
descriptions of APIC30, APIC400, APIC[530:500] registers.
For a description of the Error Thresholding mechanism see, for example,
BKDG for family 10h, section 2.12.1.6.
http://developer.amd.com/resources/developer-guides-manuals/

Thanks to jhb and kib for their suggestions.

Reviewed by: kib
Discussed with: jhb
MFC after: 5 weeks
Relnotes: maybe
Differential Revision: https://reviews.freebsd.org/D9612

7 years agoImplement sbuf_prf(), which takes an sbuf and outputs it
scottl [Tue, 28 Feb 2017 18:25:06 +0000 (18:25 +0000)]
Implement sbuf_prf(), which takes an sbuf and outputs it
to stdout in the non-kernel case and to the console+log
in the kernel case.  For the kernel case it hooks the
putbuf() machinery underneath printf(9) so that the buffer
is written completely atomically and without a copy into
another temporary buffer.  This is useful for fixing
compound console/log messages that become broken and
interleaved when multiple threads are competing for the
console.

Reviewed by: ken, imp
Sponsored by: Netflix

7 years agoProperly indent a default: label and avoid crashing when running
bz [Tue, 28 Feb 2017 18:10:03 +0000 (18:10 +0000)]
Properly indent a default: label and avoid crashing when running
under -v but cannot connect due to trying to print an int as %s [1].

Reported by: andrew [1]
MFC after: 3 days

7 years agoAdd SOC_ALTERA_* kernel options per each SoC and use it to
br [Tue, 28 Feb 2017 16:20:33 +0000 (16:20 +0000)]
Add SOC_ALTERA_* kernel options per each SoC and use it to
conditionally compile the code.

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

7 years agoallwinner: A31: Add ccung driver
manu [Tue, 28 Feb 2017 15:44:21 +0000 (15:44 +0000)]
allwinner: A31: Add ccung driver

This adds clocks support for the aw_ccung on the A31 SoC.
Newer DTS files require this.
All the clocks except two CSI are defined and exported on the clock domain.