]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMake iscsictl and iscsid build if MK_ISCSI == yes
ngie [Sat, 17 Oct 2015 21:11:42 +0000 (21:11 +0000)]
Make iscsictl and iscsid build if MK_ISCSI == yes

MFC after: 1 month
X-MFC with: r289452

8 years agoDocument bitset(9)
cem [Sat, 17 Oct 2015 19:55:58 +0000 (19:55 +0000)]
Document bitset(9)

8 years agoReplace build_section_pagetable with build_l1_block_pagetable as it takes
andrew [Sat, 17 Oct 2015 19:52:17 +0000 (19:52 +0000)]
Replace build_section_pagetable with build_l1_block_pagetable as it takes
an extra argument to specify the number of 1GiB pages to map. This should
be a nop as we are only mapping a single page, but when we move to use an
extra level of page tables we will be able to map a second block, e.g. if
the kernel was loaded over a 1GiB boundary.

8 years agoOnly use -fstack-protector-strong with supported compilers
ngie [Sat, 17 Oct 2015 19:48:17 +0000 (19:48 +0000)]
Only use -fstack-protector-strong with supported compilers

This includes clang 3.5.0+, gcc 4.2.1, gcc 4.8.4+

This allows me to do subdirectory makes again after setting
MAKESYSPATH on 10.2-RELEASE as it comes with clang 3.4.1.

As a sidenote: this isn't technically correct for all vintages
of gcc 4.2.1, but will be correct when gcc is rebuilt/reinstalled
after r286074, so this version check should be good enough.

X-MFC with: r288669
Differential Revision: https://reviews.freebsd.org/D3924
Reviewed by: emaste, pfg

8 years agoRemove unneeded MK_CTF=no when MK_CDDL=no.
bdrewery [Sat, 17 Oct 2015 18:59:14 +0000 (18:59 +0000)]
Remove unneeded MK_CTF=no when MK_CDDL=no.

This has been handled since r228158 made MK_CTF dependent on MK_CDDL
in share/mk/bsd.opts.mk.

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

8 years agoFix wrong PATH being set for world 'includes' stage after r289438.
bdrewery [Sat, 17 Oct 2015 18:22:18 +0000 (18:22 +0000)]
Fix wrong PATH being set for world 'includes' stage after r289438.

The 'includes' target is currently a pseudo target in bsd.subdir.mk that
does 'cd ${.CURDIR} && ${MAKE} buildincludes && ${MAKE} installincludes',
versus all over targets that just recurse.

In Makefile.inc1 the older duplicated bsd.subdir.mk logic for calling
'includes' was being executed in each subdir directly, meaning 'cd lib && make
includes' became 'cd lib && make buildincludes && make installincludes'.  Now
that the bsd.subdir.mk logic is used it is calling 'make buildincludes && make
installincludes' from the top-level which pulls in the PATH=<default path>
from /Makefile.

The sub-make logic for 'includes' in bsd.subdir.mk was attempted to be removed
in r289282 but turned out to be wrong.  I have a working version now but
it is not yet ready for commit.  So for now in Makefile.inc1 split out
'includes' to 'buildincludes' and 'installincludes' which will avoid the
problem.

MFC after: 2 weeks
X-MFC-With: r289438
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove several compat functions from pre-fib era.
melifaro [Sat, 17 Oct 2015 17:26:44 +0000 (17:26 +0000)]
Remove several compat functions from pre-fib era.

8 years agoRework the 'make -n -n' feature such that '-n' recurses and '-N' does not.
bdrewery [Sat, 17 Oct 2015 16:42:54 +0000 (16:42 +0000)]
Rework the 'make -n -n' feature such that '-n' recurses and '-N' does not.

Bmake has a documented feature of '-N' to skip executing commands which is
specifically intended for debugging top-level builds and not recursing into
sub-directories.  This matches the older 'make -n' behavior we added which made
'-n -n' the recursing target and '-n' a non-recursing target.

Removing the '-n -n' feature allows the build to work as documented in
the bmake manpage with '-n' and '-N'.  The older '-n -n' feature was also
not documented anywhere that I could see.

Note that the ${_+_} var is still needed as currently bmake incorrectly
executes '+' commands when '-N' is specified.

The '-n' and '-n -n' features were broken for several reasons prior to this.
r251748 made '_+_' never expand with '-n -n' which resulted in many
sub-directories not being visited until fixed 2 years later in r288391, and
many targets were given .MAKE over the past few years which resulted in
non-sub-make commands, such as rm and ln and mtree, to be executed.

This should also allow removing some indirection hacks in bsd.subdir.mk and
other cases of .USE that have a .MAKE by using '+'.

Sponsored by: EMC / Isilon Storage Division
Discussed on: arch@ (mostly silence)

8 years agoRemove write-only variable.
trasz [Sat, 17 Oct 2015 16:05:42 +0000 (16:05 +0000)]
Remove write-only variable.

Submitted by: Dominic Marks
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoConditionalize the META_MODE tool handling on MK_META_MODE.
bdrewery [Sat, 17 Oct 2015 15:50:52 +0000 (15:50 +0000)]
Conditionalize the META_MODE tool handling on MK_META_MODE.

It was not being used outside of META_MODE but this should make it more clear
that it is only for META_MODE.

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't page-align the physical address when calling PHYS_TO_VM_PAGE().
jah [Sat, 17 Oct 2015 14:58:55 +0000 (14:58 +0000)]
Don't page-align the physical address when calling PHYS_TO_VM_PAGE().

M    busdma_bounce.c

8 years agodrm/i915: Reduce diff with Linux 3.8
dumbbell [Sat, 17 Oct 2015 14:48:39 +0000 (14:48 +0000)]
drm/i915: Reduce diff with Linux 3.8

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

MFC after: 2 months

8 years agoRename build_block_pagetable to build_l2_block_pagetable in preperation
andrew [Sat, 17 Oct 2015 14:07:47 +0000 (14:07 +0000)]
Rename build_block_pagetable to build_l2_block_pagetable in preperation
for adding support for 4 levels of page tables.

Obtained from: Patrick Wildt <patrick@bitrig.org>

8 years agoAdd checks for kernel VA accesses to the copyin(9) and related
kib [Sat, 17 Oct 2015 13:20:42 +0000 (13:20 +0000)]
Add checks for kernel VA accesses to the copyin(9) and related
functions on arm64.

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D3907

8 years agoAdd -w flag to iscsictl(8) utility, to make it wait for successfull
trasz [Sat, 17 Oct 2015 13:06:52 +0000 (13:06 +0000)]
Add -w flag to iscsictl(8) utility, to make it wait for successfull
session establishment.  Scripting is kind of hard without it.

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

8 years agoAdd iscsictl(8) and iscsid(8) to rescue(8). The point is to make it
trasz [Sat, 17 Oct 2015 13:00:34 +0000 (13:00 +0000)]
Add iscsictl(8) and iscsid(8) to rescue(8).  The point is to make it
easier to build md_root images from rescue(8), to use with iSCSI boot.

The change increases the size of rescue by 62kB, from 8728kB to 8790kB.

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

8 years agoInstall share/zoneinfo in a deterministic way by sorting the results from find
ngie [Sat, 17 Oct 2015 09:26:16 +0000 (09:26 +0000)]
Install share/zoneinfo in a deterministic way by sorting the results from find

This helps produce deterministic METALOG output

PR: 200674
Submitted by: Fabian Keil <fk@fabiankeil.de>
Reviewed by: emaste
MFC after: 1 week
Obtained from: ElectroBSD

8 years agoSet dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
ngie [Sat, 17 Oct 2015 09:07:53 +0000 (09:07 +0000)]
Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
descriptor to avoid trashing valid file descriptors that access dev->fd at a
later point in time

PR: 192671
Submitted by: Scott Ferris <scott.ferris@isilon.com>
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoReplace /dev/acd0 with /dev/cd1
ngie [Sat, 17 Oct 2015 08:51:10 +0000 (08:51 +0000)]
Replace /dev/acd0 with /dev/cd1

atapicd(4) has been removed since r249083, and if a system has more than one
optical drive, it will likely be /dev/cd1

Update mount.conf(8) to reflect the change in behavior

MFC after: never
Sponsored by: EMC / Isilon Storage Division

8 years agoIntegrate tools/regression/acltools into the FreeBSD test suite as tests/sys/acl
ngie [Sat, 17 Oct 2015 08:39:37 +0000 (08:39 +0000)]
Integrate tools/regression/acltools into the FreeBSD test suite as tests/sys/acl

- Make the requirements more complete for the testcases
- Detect prerequisites so the tests won't fail (zfs.ko is loaded, zpool(1)
  is available, ACL support is enabled with UFS, etc).
- Work with temporary files/directories/mountpoints that work with atf/kyua
- Limit the testcases to work on temporary filesystems to reduce tainting the
  test host

MFC after: 2 weeks
Reviewed by: trasz (earlier version)
Differential Revision: https://reviews.freebsd.org/D3810

8 years agoFix ZFS ABI compat shims for `zfs receive` after r289362.
mav [Sat, 17 Oct 2015 07:32:46 +0000 (07:32 +0000)]
Fix ZFS ABI compat shims for `zfs receive` after r289362.

Difference appeared much less drammatic then seemed originally.

8 years agoFor 'buildenvvars' show any .exported variables as well to cover recent
bdrewery [Sat, 17 Oct 2015 05:57:29 +0000 (05:57 +0000)]
For 'buildenvvars' show any .exported variables as well to cover recent
exporting of OSRELDATE and VERSION.  These already do export to 'buildenv'
fine.

Sponsored by: EMC / Isilon Storage Division

8 years agoAlways export VERSION to the environment to avoid looking it up again in
bdrewery [Sat, 17 Oct 2015 05:55:45 +0000 (05:55 +0000)]
Always export VERSION to the environment to avoid looking it up again in
sub-makes.

Some of the world phases that used plain '${MAKE} -f Makefile.inc1' were not
passing this variable along which caused them to look it up again.  By
using bmake's .export we can remove it from all of the other environment
lines.

Add a comment about the usage for VERSION for ctfmerge.

Sponsored by: EMC / Isilon Storage Division

8 years agoDo as r289391 did for share/mk and make installing to a non-existent directory
bdrewery [Sat, 17 Oct 2015 05:49:07 +0000 (05:49 +0000)]
Do as r289391 did for share/mk and make installing to a non-existent directory
an error.

Most of these do a 'mkdir -p' or 'install -d' before installing, but add
the trailing / here for consistency with the userland install.

MFC after: 2 weeks
X-MFC-With: r289391
Sponsored by: EMC / Isilon Storage Division

8 years agoIntegrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
ngie [Sat, 17 Oct 2015 04:32:21 +0000 (04:32 +0000)]
Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
test suite as tests/sys/posixshm

Some other highlights:
- Convert the testcases over to ATF
- Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use
  mkstemp to generate temporary paths for non-SHM_ANON shm objects.

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

8 years agoExport OSRELDATE so sub-makes don't look it up again.
bdrewery [Sat, 17 Oct 2015 04:03:53 +0000 (04:03 +0000)]
Export OSRELDATE so sub-makes don't look it up again.

We pass BOOTSTRAPPING=${OSRELDATE} to some of the sub-makes.  Rather than
chase every ${MAKE} invokation, just export it as bmake lets us.

Sponsored by: EMC / Isilon Storage Division

8 years agoRework the world subdir build targets to use the standard SUBDIR_PARALLEL mechanism.
bdrewery [Sat, 17 Oct 2015 03:51:50 +0000 (03:51 +0000)]
Rework the world subdir build targets to use the standard SUBDIR_PARALLEL mechanism.

Back in r30113, the 'par-*' targets were added to parallelize portions of
the build in a very similar fashion as the SUBDIR_PARALLEL feature used in
r263778.  Calling a target without 'par-' (for 'parallel') resulted in the
standard bsd.subdir.mk handling without parallelization.  Given we have
SUBDIR_PARALLEL now there is no reason to duplicate the handling here.

In build logs this will result in the ${dir}.${target}__D targets now showing
as the normal ${target}_subdir_${dir} targets.

I audited all of the uses of Makefile.inc1 and Makefile's targets that use
bsd.subdir.mk and found that all but 'all' and 'install' were fine to use
as always parallel.
  - For 'install' (from installworld -j) the ordering of lib/ and libexec/
    before the rest of the system (described in r289433), and etc/ being last
    (described in r289435), is all that matters.  So now a .WAIT is added in
    the proper places when invoking any 'install*' target.  A parallel
    installworld does work and took 46% of the time a non-parallel
    install would take on my system with -j15 to ZFS.
  - For 'all' I left the default handling for this to not run in parallel.  A
    'par-all' target is still used by the 'everything' stage of buildworld
    to continue building in parallel as it already has been.  This works
    because most of the dependencies are handled by the early bootstrap
    phases as well as 'libraries' and 'includes' phases.  This lets
    all of the SUBDIR build in parallel fine, such as bin/ and lib/.  This
    will not work if the user invokes 'all' though as we have dependencies
    spread all over the system with no way to depend between them (except
    for the dirdeps feature in the META_MODE build).  Calling 'make all'
    from the top-level is still useful at least when using SUBDIR_OVERRIDE.

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

8 years agoUnify posixshm.c and shm_test.c
ngie [Sat, 17 Oct 2015 03:13:22 +0000 (03:13 +0000)]
Unify posixshm.c and shm_test.c

Convert both testcases over to ATF

Don't use hardcoded paths to /tmp; use mkstemp to generate
temporary paths for non-SHM_ANON created shm objects.

8 years agoFix adding manpages installed by LOCAL_DIRS to whatis file.
bdrewery [Fri, 16 Oct 2015 23:53:37 +0000 (23:53 +0000)]
Fix adding manpages installed by LOCAL_DIRS to whatis file.

The ordering of 'etc' in the install has a long history dating back to the
first time it was realized it needed to be "last" in r4486.  That commit
still left it before LOCAL_DIRS though.  By having it before LOCAL_DIRS
any manpages they install were not being added to the whatis database in the
install image.  They would likely show up in the file after a periodic
rebuild of the file though.

Currently the whatis file is built by an 'afterinstall' hook in etc/Makefile
that calls share/man's 'makedb' target.

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

8 years agoRemove lockf as an ITOOL.
bdrewery [Fri, 16 Oct 2015 22:41:31 +0000 (22:41 +0000)]
Remove lockf as an ITOOL.

It was added in r152006 to handle serializing access of info/dir when
installing INFO files.  We no longer support INFO files since r276551
though.

Sponsored by: EMC / Isilon Storage Division

8 years agoCorrect a bitrotted comment about installworld order requirements.
bdrewery [Fri, 16 Oct 2015 21:09:15 +0000 (21:09 +0000)]
Correct a bitrotted comment about installworld order requirements.

The case of make(1) using a new /bin/sh issue was fixed in r173219 when ITOOLS
was introduced.

There are still issues with mid-install errors leaving a system unusable that
are currently non-trivial to solve.  The safest ordering requires installing
rtld, libc and libthr (in that order) before anything else.  We don't do that
now though.  Much improvement is needed here still.

Discussed with: kip and kan (rtld/library ordering)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoTweak the guard more to suggest 'all' if SUBDIR_OVERRIDE is specified. In that
bdrewery [Fri, 16 Oct 2015 20:59:03 +0000 (20:59 +0000)]
Tweak the guard more to suggest 'all' if SUBDIR_OVERRIDE is specified.  In that
case 'all' does make sense.

MFC after: 2 weeks
X-MFC-With: r289411
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove .MAKE from targets that do more than just run sub-makes, such as
bdrewery [Fri, 16 Oct 2015 20:23:04 +0000 (20:23 +0000)]
Remove .MAKE from targets that do more than just run sub-makes, such as
calling rm or mtree.

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

8 years agoRevert an extra hunk that crept into the last commit.
scottl [Fri, 16 Oct 2015 20:18:12 +0000 (20:18 +0000)]
Revert an extra hunk that crept into the last commit.

Submitted by: emax
Obtained from: Netflix, Inc.
MFC after: 3 days

8 years agoRemove _FreeBSD_version check for something that was only an issue with
scottl [Fri, 16 Oct 2015 17:56:43 +0000 (17:56 +0000)]
Remove _FreeBSD_version check for something that was only an issue with
9-CURRENT.

Obtained from:  Netlfix, Inc
MFC after:      3 days

8 years agoAdd support for ARM EABI.
jkim [Fri, 16 Oct 2015 17:50:36 +0000 (17:50 +0000)]
Add support for ARM EABI.

MFC after: 1 week

8 years agonewfs_msdos: prefer snprintf to sprintf
emaste [Fri, 16 Oct 2015 15:19:36 +0000 (15:19 +0000)]
newfs_msdos: prefer snprintf to sprintf

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

8 years agoIf falloc_caps() failed, cleanup needs to be performed. This is a bug
kib [Fri, 16 Oct 2015 14:55:39 +0000 (14:55 +0000)]
If falloc_caps() failed, cleanup needs to be performed.  This is a bug
in r289026.

Sponsored by: The FreeBSD Foundation

8 years agoMFV r289310:
mav [Fri, 16 Oct 2015 14:45:21 +0000 (14:45 +0000)]
MFV r289310:
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f

This is only a partial merge of respective ZFS infrastructure changes.
At this moment FreeBSD kernel has no those crypto algorithms, so the
parts of the code to enable them are commented out.  When they are
implemented, it will be trivial to plug them in.

8 years agoAdd default leap-seconds file. This should help ntp networks get the
cy [Fri, 16 Oct 2015 14:04:16 +0000 (14:04 +0000)]
Add default leap-seconds file. This should help ntp networks get the
leap second date correct

Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
ftp://tycho.usno.navy.mil/pub/ntp/.

Suggested by: dwmalone
Reviewed by: roberto, dwmalone, delphij
Approved by: roberto
MFC after: 1 week

8 years agoUse fopen()'s newfangled "e" flag instead of explicit fcntl() calls.
des [Fri, 16 Oct 2015 12:53:22 +0000 (12:53 +0000)]
Use fopen()'s newfangled "e" flag instead of explicit fcntl() calls.

PR: 199801
Submitted by: Jukka Ukkonen <jau@iki.fi>
MFC after: 1 week

8 years agoFix two bugs in HTTPS tunnelling:
des [Fri, 16 Oct 2015 12:21:44 +0000 (12:21 +0000)]
Fix two bugs in HTTPS tunnelling:
 - If the proxy returns a non-200 result, set the error code accordingly
   so the caller / user gets a somewhat meaningful error message.
 - Consume and discard any HTTP response header following the result line.

PR: 194483
Tested by: Fabian Keil <fk@fabiankeil.de>
MFC after: 1 week

8 years agoUse the right variable name.
ed [Fri, 16 Oct 2015 10:26:15 +0000 (10:26 +0000)]
Use the right variable name.

MACHINE_CPUARCH expands to aarch64 for arm64, whereas MACHINE always
corresponds to the directory name under sys/ that contains the sources
for that architecture.

8 years agoBump version and add notice about incompatibility introduced by resumable
mav [Fri, 16 Oct 2015 08:57:11 +0000 (08:57 +0000)]
Bump version and add notice about incompatibility introduced by resumable
send/receive support in ZFS.

8 years agoTweak the default target to not suggest 'all' since it really doesn't do
bdrewery [Fri, 16 Oct 2015 05:59:59 +0000 (05:59 +0000)]
Tweak the default target to not suggest 'all' since it really doesn't do
anything useful for most users.

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

8 years agoAvoid warning race with creating 'ldscripts' directory during build.
bdrewery [Fri, 16 Oct 2015 05:54:41 +0000 (05:54 +0000)]
Avoid warning race with creating 'ldscripts' directory during build.

In r204548 the 'rm -f ldscripts' was added likely due to reading the
conditional as 'else it is a file'.  That seems unlikely though and
the more likely case is just that the directory hasn't been created yet.

Because this races with ,ssother scripts, use 'mkdir -p' which is a minimal
modification vs upstream to avoid the warning of 'File exists' if another
script creates it first.  This could replace the 'test -d' as well but
then it's more unneeded change to the upstream script.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd entries for moved test symbols for r289355 and r289330.
bdrewery [Fri, 16 Oct 2015 05:13:21 +0000 (05:13 +0000)]
Add entries for moved test symbols for r289355 and r289330.

This list is likely not complete.

Sponsored by: EMC / Isilon Storage Division

8 years agoSimilar to r289355, /usr/tests is within the base system so put the symbols
bdrewery [Fri, 16 Oct 2015 05:06:43 +0000 (05:06 +0000)]
Similar to r289355, /usr/tests is within the base system so put the symbols
into /usr/lib/debug.

This covers some missing files:
  /usr/tests/libexec/rtld-elf/.debug
  /usr/tests/libexec/rtld-elf/.debug/libpythagoras.so.0.debug
  /usr/tests/lib/libc/tls/.debug
  /usr/tests/lib/libc/tls/.debug/libh_tls_dynamic.so.1.debug
  /usr/tests/lib/libc/tls/.debug/h_tls_dlopen.so.debug
  /usr/tests/lib/libthr/dlopen/.debug
  /usr/tests/lib/libthr/dlopen/.debug/h_pthread_dlopen.so.1.debug
  /usr/tests/lib/libxo/.debug
  /usr/tests/lib/libxo/.debug/libenc_test.so.debug

Sponsored by: EMC / Isilon Storage Division

8 years agoFix delete-old and check-old-files not removing old debug symbols.
bdrewery [Fri, 16 Oct 2015 04:07:27 +0000 (04:07 +0000)]
Fix delete-old and check-old-files not removing old debug symbols.

This was handled for libraries in r256842 but for some reason was missed
for files (bsd.prog.mk).

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

8 years agoDo not relocate extents to make them contiguous if the underlying drive can do
imp [Fri, 16 Oct 2015 03:06:02 +0000 (03:06 +0000)]
Do not relocate extents to make them contiguous if the underlying drive can do
deletions. Ability to do deletions is a strong indication that this
optimization will not help performance. It will only generate extra write
traffic. These devices are typically flash based and have a limited number of
write cycles. In addition, making the file contiguous in LBA space doesn't
improve the access times from flash devices because they have no seek time.

Reviewed by: mckusick@

8 years agocxgbe(4): support for the kernel RSS option.
np [Fri, 16 Oct 2015 01:19:55 +0000 (01:19 +0000)]
cxgbe(4): support for the kernel RSS option.

You need PCBGROUP and RSS in the kernel config to use this.

Relnotes: Yes
Sponsored by: Chelsio Communications

8 years agoFix a panic when destroying a lagg interface.
hrs [Fri, 16 Oct 2015 01:16:01 +0000 (01:16 +0000)]
Fix a panic when destroying a lagg interface.

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

8 years agoRename the /usr/share/doc/legal files to driver.LICENSE to work around
bdrewery [Fri, 16 Oct 2015 00:38:05 +0000 (00:38 +0000)]
Rename the /usr/share/doc/legal files to driver.LICENSE to work around
bug of installing 'realtek' and 'intel_iwn' as files rather then as
a 'LICENSE' file in their directories.

Also add obsolete entries for the older names and names that existed in head
for a period of time.

Suggested by: jmg
X-MFC-With: r289391
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoSort new entry intel_iwn.
bdrewery [Thu, 15 Oct 2015 23:49:05 +0000 (23:49 +0000)]
Sort new entry intel_iwn.

Submitted by: ngie
MFC after: 3 weeks
X-MFC-With: r289391
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV ab760a0c: Add split BAR support for Haswell
cem [Thu, 15 Oct 2015 23:46:07 +0000 (23:46 +0000)]
NTB: MFV ab760a0c: Add split BAR support for Haswell

On the Haswell platform, a split BAR option to allow creation of 2 32bit
BARs (4 and 5) from the 64bit BAR 4. Adding support for this new option.

Authored by: Dave Jiang
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Add variable number MW, DB CB support code
cem [Thu, 15 Oct 2015 23:45:43 +0000 (23:45 +0000)]
NTB: Add variable number MW, DB CB support code

This is a follow-up to r289208: "Xeon Errata Workaround."

Add logic to support a variable number of memory windows and doorbell
callbacks.  This was added to the Linux driver in the "Xeon Errata
Workaround" commit, but I skipped it because it didn't look neccessary
at the time.  It is needed for future Haswell split-BAR support, so
bring it in now.

A new tunable was added for if_ntb, 'hw.ntb.max_num_clients'.  By
default, it is set to zero -- infer the number of clients from the
number of memory windows available from the hardware.  Any other
positive value can specify a different number of clients, limited by the
number of doorbell callbacks available (4 under MSI-X, or 15 (Xeon) or
34 (SoC) under legacy INTx).

Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing /usr/share/doc/legal/realtek/ for share/doc/legal/realtek,
bdrewery [Thu, 15 Oct 2015 23:45:00 +0000 (23:45 +0000)]
Add missing /usr/share/doc/legal/realtek/ for share/doc/legal/realtek,
exposed by r289391.

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

8 years agoAdd missing directory for /usr/share/doc/legal/intel_iwn/ used by
bdrewery [Thu, 15 Oct 2015 23:41:47 +0000 (23:41 +0000)]
Add missing directory for /usr/share/doc/legal/intel_iwn/ used by
share/doc/legal/intel_iwn.  Exposed by r289391.

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

8 years agoAdd more SUBDIR_PARALLEL.
bdrewery [Thu, 15 Oct 2015 22:55:08 +0000 (22:55 +0000)]
Add more SUBDIR_PARALLEL.

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

8 years agoMake installing to a non-existent directory an error.
bdrewery [Thu, 15 Oct 2015 22:49:56 +0000 (22:49 +0000)]
Make installing to a non-existent directory an error.

Before this, if a file was installed to DESTDIR/some/dir and that directory
was missing due to not having ran 'make distrib-dirs' yet, the file would
be installed as 'some/dir'.  For something like bsd.incs.mk with INCLUDEDIR
being a sub-directory of /usr/include, this could result in all of the headers
being installed to a file rather than getting a directory of them.

Now it will error that the file/directory does not exist rather than hide
the issue.

Another option being discussed is to implement GNU's install -D flag which
would auto create any missing directories.

This is a mitigation of the problem.  The proper order to the build is to
run 'make distrib-dirs' first, but that can be forgotten if building from
a sub-directory after updating the source code to the latest revision.

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

8 years agoFix buildworld with clean objdir after r289351.
bdrewery [Thu, 15 Oct 2015 21:21:41 +0000 (21:21 +0000)]
Fix buildworld with clean objdir after r289351.

Sponsored by: EMC / Isilon Storage Division

8 years agolibstdc++ also snook in incorrectly in r267511, despite not being a real
bdrewery [Thu, 15 Oct 2015 20:49:20 +0000 (20:49 +0000)]
libstdc++ also snook in incorrectly in r267511, despite not being a real
subdir.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unneeded libg++ reference that came in with r267511 based on a removed
bdrewery [Thu, 15 Oct 2015 20:46:34 +0000 (20:46 +0000)]
Remove unneeded libg++ reference that came in with r267511 based on a removed
comment.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix another ++= parsed as '+=', missed in r289384.
bdrewery [Thu, 15 Oct 2015 20:40:23 +0000 (20:40 +0000)]
Fix another ++= parsed as '+=', missed in r289384.

Sponsored by: EMC / Isilon Storage Division

8 years agoLet the SUBDIR_DEPEND*c++ variables actually work rather than being parsed
bdrewery [Thu, 15 Oct 2015 20:27:15 +0000 (20:27 +0000)]
Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsed
as a +=.  These were safe due to a .WAIT very early on.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove empty directory c++filt leftover from r286332.
bdrewery [Thu, 15 Oct 2015 19:51:34 +0000 (19:51 +0000)]
Remove empty directory c++filt leftover from r286332.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove directories disconnected since r169718.
bdrewery [Thu, 15 Oct 2015 19:49:09 +0000 (19:49 +0000)]
Remove directories disconnected since r169718.

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

8 years agoMark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly.
bdrewery [Thu, 15 Oct 2015 19:13:53 +0000 (19:13 +0000)]
Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly.

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

8 years agoRevert r289302, invalid pages can be queued, e.g. by vfs_vmio_unwire().
kib [Thu, 15 Oct 2015 19:07:38 +0000 (19:07 +0000)]
Revert r289302, invalid pages can be queued, e.g. by vfs_vmio_unwire().

Found by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation

8 years agonewfs_msdos: move mkfs_msdos to separate file for later use in makefs
emaste [Thu, 15 Oct 2015 19:00:33 +0000 (19:00 +0000)]
newfs_msdos: move mkfs_msdos to separate file for later use in makefs

Sponsored by: The FreeBSD Foundation

8 years agoFix wrong use of .for; the iteration variable is not used in the loop.
bdrewery [Thu, 15 Oct 2015 18:55:43 +0000 (18:55 +0000)]
Fix wrong use of .for; the iteration variable is not used in the loop.

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

8 years agoRemove excess .else
bdrewery [Thu, 15 Oct 2015 18:53:26 +0000 (18:53 +0000)]
Remove excess .else

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

8 years agoProperly set the return value for casueword to 0 upon success.
ed [Thu, 15 Oct 2015 17:50:28 +0000 (17:50 +0000)]
Properly set the return value for casueword to 0 upon success.

While trying to get multithreading working for CloudABI on aarch64, I
noticed that compare-and-exchange operations in kernelspace would always
fail. It turns out that we don't properly set the return value to 0 when
the compare and exchange succeeds.

Approved by: andrew
Differential Revision: https://reviews.freebsd.org/D3899

8 years agoARM userspace accessors, e.g. {s,f}uword(9), copy{in,out}(9),
kib [Thu, 15 Oct 2015 17:40:39 +0000 (17:40 +0000)]
ARM userspace accessors, e.g. {s,f}uword(9), copy{in,out}(9),
casuword(9) and others, use LDRT and STRT instructions to access
memory with the privileges of userspace.  If the *RT instruction
faults on the kernel address, then additional checks must be done to
not confuse the VM system with invalid kernel-mode faults.

Put ARM on line with other FreeBSD architectures and disallow usermode
buffers which intersect with the kernel address space in advance,
before any accesses are performed.  In other words, vm_fault(9) is no
longer called when e.g. suword(9) stores to invalid (i.e. not
userspace) address.

Also, switch ARM to use fueword(9) and casueword(9).

Note: there is a pending patch in D3617, which adds the special
processing for faults from LDRT and STRT.  The addition of the
processing is useful for potential other uses of the instructions and
for completeness, but standard userspace accessors are better served
by not allowing such faults beforehand.

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3816
MFC after: 2 weeks

8 years agonewfs_msdos: rework option parsing to match NetBSD
emaste [Thu, 15 Oct 2015 16:19:00 +0000 (16:19 +0000)]
newfs_msdos: rework option parsing to match NetBSD

NetBSD split newfs_msdos in two so that they can reuse the file system
creation part in makefs. This change is a step on the path of bringing
that support to FreeBSD.

Reviewed by: kib, pfg
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3905

8 years agoMFV r289312: 2605 want to resume interrupted zfs send
mav [Thu, 15 Oct 2015 08:47:32 +0000 (08:47 +0000)]
MFV r289312: 2605 want to resume interrupted zfs send

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8

For more info, see:
 - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive
 - video https://www.youtube.com/watch?v=iY44jPMvxog
 - manpage changes (for zfs resume -s and zfs send -t)
 - upcoming talk at the OpenZFS Developer Summit

The TL;DR is:
Use "zfs receive -s" to save the partially received state on failure.
On failure, get the receive token with "zfs get receive_resume_token <fs>"
Resume the send with "zfs send -t <token_value>"

Relnotes: yes

8 years agoConsider top-level targets to be .PHONY as bmake won't build them
bdrewery [Thu, 15 Oct 2015 05:32:56 +0000 (05:32 +0000)]
Consider top-level targets to be .PHONY as bmake won't build them
otherwise if a file with the same name is found in the directory.

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

8 years agoAdd temporary workaround for .MAKE being applied to _worldtmp, since r251750.
bdrewery [Thu, 15 Oct 2015 05:26:11 +0000 (05:26 +0000)]
Add temporary workaround for .MAKE being applied to _worldtmp, since r251750.

This was causing files to be removed from the objdir when -n was used.
_worldtmp makes no sub-make calls.

A more comprehensive solution is coming involving fine-grained '+' where
appropriate.

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

8 years agoAdd support for the BCM57765 card reader.
adrian [Thu, 15 Oct 2015 04:22:56 +0000 (04:22 +0000)]
Add support for the BCM57765 card reader.

This patch adds support for the BCM57765[2] card reader function included in
Broadcom's BCM57766 ethernet/sd3.0 controller. This controller is commonly
found in laptops and Apple hardware (MBP, iMac, etc).

The BCM57765 chipset is almost fully compatible with the SD3.0 spec, but
does not support deriving a frequency below 781KHz from its default base
clock via the standard SD3.0-configured 10-bit clock divisor.

If such a divisor is set, card identification (which requires a 400KHz
clock frequency) will time out[1].

As a work-around, I've made use of an undocumented device-specific clock
control register to switch the controller to a 63MHz clock source when
targeting clock speeds below 781KHz; the clock source is likewise switched
back to the 200MHz clock when targeting speeds greater than 781KHz.

Additionally, this patch fixes a small sdhci_pci bug; the
sdhci_pci_softc->quirks flag was not copied to the sdhci_slot, resulting in
`quirk` behavior not being applied by sdhci.c.

[1] A number of Linux/FreeBSD users have noted that bringing up the chipsets'
associated ethernet interface will allow SD cards to enumerate (slowly).
This is a controller implementation side-effect triggered by the ethernet
driver's reading of the hardware statistics registers.

[2] This may also fix card detection when using the BCM57785 chipset, but I
don't have access to the BCM57785 chipset and can't verify.

I actually snagged some BCM57785 hardware recently (2012 Retina MacBook Pro)
and can confirm that this also fixes card enumeration with the BCM57785
chipset; with the patch, I can boot off of the internal sdcard reader.

PR: kern/203385
Submitted by: Landon Fuller <landon@landonf.org>

8 years ago/usr/tests is part of the base system (for *.debug files)
emaste [Thu, 15 Oct 2015 02:52:30 +0000 (02:52 +0000)]
/usr/tests is part of the base system (for *.debug files)

Sponsored by: The FreeBSD Foundation

8 years ago2nd try, after r289319:
bz [Thu, 15 Oct 2015 01:51:10 +0000 (01:51 +0000)]
2nd try, after r289319:

HWPMC depends on pmu.c even if device pmu is not specified.
Would be great if we could just automatically enabled "device pmu"
if we try to compile in HWPMC.

Also several old kernel cnfigurations seem to have HWPMC enabled but are
pre-FDT and thus fail.  So make pmu.c depend on fdt in case of hwpmc as
well.

MFC after: 2 weeks
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D3877

8 years agoAdd debug file extension to freebsd-update(8) after r288176
emaste [Thu, 15 Oct 2015 01:48:52 +0000 (01:48 +0000)]
Add debug file extension to freebsd-update(8) after r288176

Reviewed by: delphij
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3784

8 years agoCreate /usr/tests *.debug file directory hierarchy
emaste [Thu, 15 Oct 2015 01:46:55 +0000 (01:46 +0000)]
Create /usr/tests *.debug file directory hierarchy

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

8 years agoHopefully also unbreak VIMAGE kernels replacing the &V_... with
bz [Thu, 15 Oct 2015 01:44:32 +0000 (01:44 +0000)]
Hopefully also unbreak VIMAGE kernels replacing the &V_... with
&VNET_NAME(...).
Everything else is just a whitespace wrapping change.

8 years agomkimg: support fat16b partitions (MBR type 06h)
emaste [Thu, 15 Oct 2015 01:09:14 +0000 (01:09 +0000)]
mkimg: support fat16b partitions (MBR type 06h)

Reviewed by: marcel
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3894

8 years agoNTB: MFV 1db97f25: Pull out platform detection logic
cem [Wed, 14 Oct 2015 23:48:16 +0000 (23:48 +0000)]
NTB: MFV 1db97f25: Pull out platform detection logic

Pull out read of PPD and platform detection logic to new functions,
ntb_detect_xeon(), ntb_detect_soc().  No functional change -- mostly
this is just shuffling the code to more closely match the Linux driver.
Linux commit log:

To simplify some of the platform detection code. Move the platform
detection to a function to be called earlier.

Authored by: Dave Jiang
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Abstract doorbell register access
cem [Wed, 14 Oct 2015 23:48:03 +0000 (23:48 +0000)]
NTB: Abstract doorbell register access

The doorbell registers (and associated mask) are 16-bit on Xeon but
64-bit on SoC.  Abstract IO access to doorbell registers with
'db_ioread' and 'db_iowrite' (names and idea borrowed from the dual
BSD/GPL Linux driver).

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: MFV 3cc5ba19: Add alignment check to meet hardware requirement
cem [Wed, 14 Oct 2015 23:47:52 +0000 (23:47 +0000)]
if_ntb: MFV 3cc5ba19: Add alignment check to meet hardware requirement

Original Linux commit log:

The NTB translate register must have the value to be BAR size aligned.
This alignment check make sure that the DMA memory allocated has the
proper alignment. Another requirement for NTB to function properly with
memory window BAR size greater or equal to 4M is to use the CMA feature
in 3.16 kernel with the appropriate CONFIG_CMA_ALIGNMENT and
CONFIG_CMA_SIZE_MBYTES set.

Authored by: Dave Jiang
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV a1413cfb: correct the spread of queues over mw's
cem [Wed, 14 Oct 2015 23:47:35 +0000 (23:47 +0000)]
NTB: MFV a1413cfb: correct the spread of queues over mw's

The detection of an uneven number of queues on the given memory windows
was not correct.  The mw_num is zero based and the mod should be
division to spread them evenly over the mw's.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Remap MSI-X messages over available slots
cem [Wed, 14 Oct 2015 23:47:23 +0000 (23:47 +0000)]
NTB: Remap MSI-X messages over available slots

Remap MSI-X messages over available slots rather than falling back to
legacy INTx when fewer MSI-X slots are available than were requested.

N.B. the Linux driver does *not* do this.

To aid in testing, a tunable 'hw.ntb.force_remap_mode' has been added.
It defaults to off (0).  When the tunable is enabled and sufficient
slots were available, the driver restricts the number of slots by one
and remaps the MSI-X messages over the remaining slots.

In case this is actually not okay (as I don't yet have access to this
hardware to test), a tunable 'hw.ntb.prefer_intx_to_remap' has been
added.  It defaults to off (0).  When the tunable is enabled and fewer
slots are available than requested, fall back to legacy INTx mode rather
than attempting to remap MSI-X messages.

Suggested by: jhb
Reviewed by: jhb (earlier version)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Reserve link event doorbell callback on Xeon
cem [Wed, 14 Oct 2015 23:47:08 +0000 (23:47 +0000)]
NTB: Reserve link event doorbell callback on Xeon

Consumers that registered on this bit would never see a callback and it
is likely a mistake.

This does not affect if_ntb, which limits itself to a single doorbell
callback.

8 years agoNTB: MFV 53a788a7: Split ntb_setup_interrupts() into SOC, Xeon, and legacy routines
cem [Wed, 14 Oct 2015 23:46:15 +0000 (23:46 +0000)]
NTB: MFV 53a788a7: Split ntb_setup_interrupts() into SOC, Xeon, and legacy routines

The names don't line up 100% with Linux.  Our routines are named
ntb_setup_interrupts, ntb_setup_xeon_msix, ntb_setup_soc_msix, and
ntb_setup_legacy_interrupt.  Linux SNB = FreeBSD Xeon; Linux BWD =
FreeBSD SOC.  Original Linux commit log:

This is an cleanup effort to make ntb_setup_msix() more readable - use
ntb_setup_bwd_msix() to init MSI-Xs on BWD hardware and
ntb_setup_snb_msix() - on SNB hardware.

Function ntb_setup_snb_msix() also initializes MSI-Xs the way it should
has been done - looping pci_enable_msix() until success or failure.

Authored by: Alexander Gordeev
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Cleanup style
cem [Wed, 14 Oct 2015 23:45:35 +0000 (23:45 +0000)]
if_ntb: Cleanup style

8 years agoNTB: MFV 403c63cb: client event cleanup
cem [Wed, 14 Oct 2015 23:44:42 +0000 (23:44 +0000)]
NTB: MFV 403c63cb: client event cleanup

Provide a better event interface between the client and transport.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoiw_cxgbe: use correct RFC number.
np [Wed, 14 Oct 2015 23:29:19 +0000 (23:29 +0000)]
iw_cxgbe: use correct RFC number.

8 years agoDeprecate MD5 checksum generation in favor of SHA512.
gjb [Wed, 14 Oct 2015 22:33:11 +0000 (22:33 +0000)]
Deprecate MD5 checksum generation in favor of SHA512.

This was discussed during the 10.2-RELEASE cycle, however
since we were nearing the end of the cycle, we decided to
defer this change until after 10.2-RELEASE.

Reminded by: so (delphij), jmg
MFC after: 5 days
Sponsored by: The FreeBSD Foundation

8 years agoAdd Ubiquiti EdgeRouter Lite (ERL) kernel config file
emaste [Wed, 14 Oct 2015 21:10:05 +0000 (21:10 +0000)]
Add Ubiquiti EdgeRouter Lite (ERL) kernel config file

The ERL is a fairly cheap (~$100 USD) and readily available dual core
MIPS64 device so it makes a useful MIPS reference platform.

This is based in part on the kernel config generated by the mkerlimage
script from http://rtfm.net/FreeBSD/ERL/.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3884

8 years agoAdd missing targets to PHONY_NOTMAIN.
bdrewery [Wed, 14 Oct 2015 20:38:51 +0000 (20:38 +0000)]
Add missing targets to PHONY_NOTMAIN.

- buildconfig, installconfig (missed in r289085)
- files (missed in r241298)

Sponsored by: EMC / Isilon Storage Division

8 years agoRecurse on 'buildconfig' and 'installconfig'. Remove the 'config' pseudo target.
bdrewery [Wed, 14 Oct 2015 20:30:32 +0000 (20:30 +0000)]
Recurse on 'buildconfig' and 'installconfig'.  Remove the 'config' pseudo target.

The 'config' target isn't really needed right now so just remove it to avoid
any clashes with config(8) building.  It's also likely misspelled and should
be 'configs' if we decide to add it back.  This was just a convenience
target recently added.

Sponsored by: EMC / Isilon Storage Division

8 years agoRe-indent the ALL_SUBDIR_TARGETS list
bdrewery [Wed, 14 Oct 2015 20:28:15 +0000 (20:28 +0000)]
Re-indent the ALL_SUBDIR_TARGETS list