]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoRename a couple files to not conflict with ZFS filenames
jhibbits [Wed, 1 Nov 2017 03:09:16 +0000 (03:09 +0000)]
Rename a couple files to not conflict with ZFS filenames

Now a kernel can be built with both ZFS and DPAA compiled in.

6 years agoAdd Guest State (GS) bit to MSR bits
jhibbits [Wed, 1 Nov 2017 02:54:48 +0000 (02:54 +0000)]
Add Guest State (GS) bit to MSR bits

For completeness only.  It will be used by a hypervisor if/when one is written.
While here, sort the MSR bits into the proper categories.

6 years agoFix debug interrupts on 64-bit Book-E
jhibbits [Wed, 1 Nov 2017 02:40:15 +0000 (02:40 +0000)]
Fix debug interrupts on 64-bit Book-E

Use a WORD_SIZE macro to define the correct offset to the second word
needed.  This corrects the offset calculation in 64-bit builds.

6 years agoRemove 'adding_user.7'
eadler [Wed, 1 Nov 2017 01:22:33 +0000 (01:22 +0000)]
Remove 'adding_user.7'

Not to be confused with adduser.
Not to be confused with useful information.

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

6 years agoRemove a singleton in the DPAA driver, to allow multiple fman instances
jhibbits [Wed, 1 Nov 2017 00:46:48 +0000 (00:46 +0000)]
Remove a singleton in the DPAA driver, to allow multiple fman instances

Some devices (P5040, P4080) have multiple frame managers in their DPAA
subsystems.  This was prevented by use of a softc singleton in the DPAA
driver.  Since if_dtsec(4) has moved to be a child of fman, it can access
the fman device data via the parent object.

6 years agoAdd the amazon-ssm-agent package to EC2 AMI builds. This makes it
cperciva [Wed, 1 Nov 2017 00:33:54 +0000 (00:33 +0000)]
Add the amazon-ssm-agent package to EC2 AMI builds.  This makes it
immediately available on instances which are running without internet
access (or which can't rely on firstboot_pkgs to install it for some
other reason).

Note that this agent is not enabled by default; to enable it, add
amazon_ssm_agent_enable="YES" to /etc/rc.conf, e.g., by placing the lines
>>/etc/rc.conf
amazon_ssm_agent_enable="YES"
into the EC2 user-data.  In addition to being enabled, the agent requires
keys to be provided via IAM Roles; users are encouraged to be very careful
in using this functionality due to the inherent vulnerability in the idea
of providing credentials via a service accessible to any process which can
open an HTTP connection.

Requested by: Amazon
No objection from: re@
Relnotes: FreeBSD/EC2 AMIs now include the Amazon EC2 Systems Manager
(SSM) Agent.

6 years agoxdev: Follow-up r325087: Need to build lib/clang before lld.
bdrewery [Tue, 31 Oct 2017 23:48:57 +0000 (23:48 +0000)]
xdev: Follow-up r325087: Need to build lib/clang before lld.

LLD needs headers generated by the full libllvm.

X-MFC-With: r325087
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agoRegenerate etc/devd/usb.conf
avos [Tue, 31 Oct 2017 23:33:24 +0000 (23:33 +0000)]
Regenerate etc/devd/usb.conf

Reminded by: hselasky

6 years agoAllocate the ITS translation table with a 64k page alignment. This is the
andrew [Tue, 31 Oct 2017 23:17:17 +0000 (23:17 +0000)]
Allocate the ITS translation table with a 64k page alignment. This is the
largest alignment the ITS can require.

This fixes a bug with the ARM Architecture Envelope Model (AEM) where it
only allows 64k pages so will fail to attach the ITS device when this table
is not sufficiently aligned.

Sponsored by: DARPA, AFRL

6 years agoAs with r325242 use mp_maxid when iterating over CPUs in the GICv3 driver.
andrew [Tue, 31 Oct 2017 22:12:14 +0000 (22:12 +0000)]
As with r325242 use mp_maxid when iterating over CPUs in the GICv3 driver.

Sponsored by: DARPA, AFRL

6 years agokernel-toolchain: Fix improper build order after r325244.
bdrewery [Tue, 31 Oct 2017 21:51:33 +0000 (21:51 +0000)]
kernel-toolchain: Fix improper build order after r325244.

Due to removing some targets that the previous .ORDER: ${WMAKE_TGTS}
set, it was no longer being respected; _build_tools was coming
immediately.

Pointyhat to: bdrewery
X-MFC-with: r325244
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agoloader ptblread() is broken with >512B sectors
tsoome [Tue, 31 Oct 2017 20:29:31 +0000 (20:29 +0000)]
loader ptblread() is broken with >512B sectors

The loader strategy() function is assuming 512B blocks, so we need to adjust
ptblread() for other sector sizes.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12847

6 years agoDisconnect libpathconv tests since they require external perl and do not work with...
bdrewery [Tue, 31 Oct 2017 19:52:30 +0000 (19:52 +0000)]
Disconnect libpathconv tests since they require external perl and do not work with kyua.

This reverts r325192 and is due to libpathconv being connected in r325186.

Reported by: ngie
Sponsored by: Dell EMC Isilon

6 years agoUse -j hw.ncpu for build/install.
bdrewery [Tue, 31 Oct 2017 19:26:07 +0000 (19:26 +0000)]
Use -j hw.ncpu for build/install.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agoPreserve TSO checksum flags
shurd [Tue, 31 Oct 2017 19:03:35 +0000 (19:03 +0000)]
Preserve TSO checksum flags

r323941 incorrectly disabled TSO flags based on MTU.

Reported by: Yuri Pankov <yuripv@gmx.com>
Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12880

6 years agokernel-toolchain: Skip world _obj and _cleanobj phases.
bdrewery [Tue, 31 Oct 2017 19:02:14 +0000 (19:02 +0000)]
kernel-toolchain: Skip world _obj and _cleanobj phases.

There's no good reason to treewalk the entire tree removing old OBJDIRS
and creating new ones when 'includes', 'libraries', and 'everything' are
all skipped.  The only shared directory in the existing toolchain target
and world is build-tools.  So handle cleaning in it directly if needed
only for the directories it wants to build.

The extra _obj/_cleanobj walks came in the initial kernel-toolchain
addition in r128189.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agobuild-tools: De-special-case the gcc tools build.
bdrewery [Tue, 31 Oct 2017 19:02:05 +0000 (19:02 +0000)]
build-tools: De-special-case the gcc tools build.

It merely wanted to use 'all' rather than 'build-tools' so just
add a build-tools target to the Makefile.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agoUse mp_maxid when iterating over CPUs as we may have sparse id allocations.
andrew [Tue, 31 Oct 2017 18:22:21 +0000 (18:22 +0000)]
Use mp_maxid when iterating over CPUs as we may have sparse id allocations.

Sponsored by: DARPA, AFRL

6 years agoFix PR221990 - Assertion at iflib.c:1947
shurd [Tue, 31 Oct 2017 17:50:42 +0000 (17:50 +0000)]
Fix PR221990 - Assertion at iflib.c:1947

ifl_pidx and ifl_credits are going out of sync in _iflib_fl_refill() as they
use different update log.  Use the same update logic for both, and add a
final call to isc_rxd_refill() to handle early exits from the loop.

PR: 221990
Reported by: pho
Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12798

6 years agoFollow-up r297998: Remove redundant TOOLS_PREFIX in XMAKE.
bdrewery [Tue, 31 Oct 2017 17:16:46 +0000 (17:16 +0000)]
Follow-up r297998: Remove redundant TOOLS_PREFIX in XMAKE.

Sponsored by: Dell EMC Isilon

6 years agoRework counting of hardware statistics in ENA driver
mw [Tue, 31 Oct 2017 16:31:23 +0000 (16:31 +0000)]
Rework counting of hardware statistics in ENA driver

Do not read all statistics from the device, instead count them in the
driver except from RX drops - they are received directly from the NIC
in the AENQ descriptor.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Reviewed by: imp
Obtained from: Semihalf
Sponsored by: Amazon.com, Inc.
Differential Revision: https://reviews.freebsd.org/D12852

6 years agoUpdate ena-com HAL to v1.1.4.3 and update driver accordingly
mw [Tue, 31 Oct 2017 12:41:07 +0000 (12:41 +0000)]
Update ena-com HAL to v1.1.4.3 and update driver accordingly

The newest ena-com HAL supports LLQv2 and introduces
API changes. In order not to break the driver compilation
it was updated/fixed in a following way:

* Change version of the driver to 0.8.0
* Provide reset cause when triggering reset of the device
* Reset device after attach fails
* In the reset task free management irq after calling ena_down. Admin
  queue can still be used before ena_down is called, or when it is
  being handled
* Do not reset device if ena_reset_task fails
* Move call of the ena_com_dev_reset to the ena_down() routine - it
  should be called only if interface was up
* Use different function for checking empty space on the sq ring
  (ena-com API change)
* Fix typo on ENA_TX_CLEANUP_THRESHOLD
* Change checking for EPERM with EOPNOTSUPP - change in the ena-com API
* Minor style fixes

Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Amazon.com, Inc.
               Semihalf
Sponsored by: Amazon.com, Inc.
Differential Revision: https://reviews.freebsd.org/D12143

6 years agoUpdate ena-com HAL to newest version
mw [Tue, 31 Oct 2017 12:20:48 +0000 (12:20 +0000)]
Update ena-com HAL to newest version

The newest ena-com HAL supports LLQv2 and introduces numerous API changes.

Obtained from: Amazon.com, Inc.

6 years ago[i2c/clock] add support for EPSON RTC-8583
mizhka [Tue, 31 Oct 2017 12:15:00 +0000 (12:15 +0000)]
[i2c/clock] add support for EPSON RTC-8583

RTC-8583 is time-of-day clock used in some SOHO routers. This clock has
only 2 bits for year values, but thanks to user SRAM it's possible to save
year value and keep it up to date via driver code.

Tested on Planex_MZK-W300NAG (SoC is RT2880)

Submitted by: Hiroki Mori <yamori83@yahoo.co.jp>
Differential Revision: https://reviews.freebsd.org/D12833

6 years agoSet the return address for stack entry points to zero.
tijl [Tue, 31 Oct 2017 11:51:34 +0000 (11:51 +0000)]
Set the return address for stack entry points to zero.

Stack unwinders treat zero as a stop condition.  The value on the stack can
be non-zero because thread stacks may be arbitrary memory provided via
pthread_attr_setstack(3) or may be recycled from previous threads.

Reference:
https://lists.freebsd.org/pipermail/freebsd-current/2017-August/066855.html
https://lists.freebsd.org/pipermail/freebsd-current/2017-October/067254.html

Discussed with: kib
MFC after: 1 week

6 years ago[mips] Pin control configuration for MediaTek RT2880
mizhka [Tue, 31 Oct 2017 11:29:16 +0000 (11:29 +0000)]
[mips] Pin control configuration for MediaTek RT2880

RT2880 is MIPS4Kc SoC used in many SOHO routers. This commits adds GPIO pin
control configuration of RT2880.

Submitted by: Hiroki Mori <yamori83@yahoo.co.jp>
Reviewed by: mizhka, sgalabov
Differential Revision: https://reviews.freebsd.org/D12648

6 years agovdev_geom_close: close errored consumer even if vdev_reopening is set
avg [Tue, 31 Oct 2017 10:15:03 +0000 (10:15 +0000)]
vdev_geom_close: close errored consumer even if vdev_reopening is set

If vdev_geom_close doesn't close the consumer, then the subsequent call
to vdev_geom_open() would be just a NOP and would always return success.
Thus, at present vdev_reopen() would always succeed for vdev_geom devices
even if the underlying provider is in error state.
The problem was introduced as a result of an optimization in rS308055.

The most significant manifistation of the problem is that
zio_vdev_io_done() --> vdev_probe() --> SPA_ASYNC_PROBE -->
spa_async_probe() --> vdev_reopen()
chain of calls and events becomes a NOP as well.
This chain is invoked when zio_vdev_io_done() detects an "unexpected"
error from the lower level I/O.
Additionally, that call path may race with SPA_ASYNC_REMOVE path because
of the asynchronous nature of them both.  So, the SPA_ASYNC_PROBE may
erroneously mark a vdev as being healthy after SPA_ASYNC_REMOVE marked
it as removed.

Reviewed by: asomers, mav
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12731

6 years agogeom_slice: do not destroy softc until providers are gone
avg [Tue, 31 Oct 2017 10:10:13 +0000 (10:10 +0000)]
geom_slice: do not destroy softc until providers are gone

At present, g_slice_orphan and g_slice_spoiled destroy the softc
(struct g_slicer) even before calling g_wither_geom, so there can
be active and incoming io requests at that time and g_slice_start
can access the softc.

This commit changes the code to destroy the softc only after all
providers are closed.

While there, a couple of small cleanups.

Reported by: Ben RUBSON <ben.rubson@gmail.com>
Tested by: Ben RUBSON <ben.rubson@gmail.com>
Reviewed by: mav, smh (earlier version)
MFC after: 2 weeks
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D12809

6 years agoAdd myself as a new committer
yuri [Tue, 31 Oct 2017 07:47:57 +0000 (07:47 +0000)]
Add myself as a new committer

Reviewed by: tcberner
Approved by: tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D12845

6 years agoFix '\' in binary ascii table
eadler [Tue, 31 Oct 2017 06:43:37 +0000 (06:43 +0000)]
Fix '\' in binary ascii table

6 years agoAlso bump Dd
eadler [Tue, 31 Oct 2017 06:36:33 +0000 (06:36 +0000)]
Also bump Dd

6 years agoUpdate tuning(7) some more
eadler [Tue, 31 Oct 2017 06:35:17 +0000 (06:35 +0000)]
Update tuning(7) some more

At this point its unclear how much help tuning(7) is whatsoever
but leave it around in case someone decides to spend some time on
it.

6 years agoAdd `static` to `cap_setgrent` prototype in !WITH_CASPER case
ngie [Tue, 31 Oct 2017 04:02:50 +0000 (04:02 +0000)]
Add `static` to `cap_setgrent` prototype in !WITH_CASPER case

This unbreaks the default powerpc/sparc64 build configuration after r325062.

6 years agoAdd -c to the usage statements.
imp [Tue, 31 Oct 2017 03:39:36 +0000 (03:39 +0000)]
Add -c to the usage statements.

Submitted by: Maxim Konovalov

6 years agoMake DPAA work in 64-bit mode
jhibbits [Tue, 31 Oct 2017 02:53:50 +0000 (02:53 +0000)]
Make DPAA work in 64-bit mode

Rework the dTSEC and FMan drivers to be more like a full bus relationship,
so that dtsec can use bus_alloc_resource() instead of trying to handle the
offset from the dts.  This required taking some code from the sparc64 ebus
driver to allow subdividing the fman region for the dTSEC devices.

6 years agonative-xtools: Allow SYSTEM_COMPILER to be used after r325001.
bdrewery [Tue, 31 Oct 2017 02:52:36 +0000 (02:52 +0000)]
native-xtools: Allow SYSTEM_COMPILER to be used after r325001.

Now that a proper sysroot is used and a separate target list, it should
be safe to skip building the initial cross-compiler.

X-MFC-With: r325001
MFC after: 1 month
Sponsored by: Dell EMC Isilon

6 years agoFix build with nodevice netmap
shurd [Tue, 31 Oct 2017 02:49:28 +0000 (02:49 +0000)]
Fix build with nodevice netmap

iru_init() was declared and used outside the DEV_NETMAP
conditional blocks, but was implemented inside one. Move the
implementation out of the DEV_NETMAP block to allow building with
netmap disabled.

Reported by: Andrew Turner <andrew@fubar.geek.nz>
Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12842

6 years agoAdd a file to unbreak the build
jhibbits [Tue, 31 Oct 2017 02:36:11 +0000 (02:36 +0000)]
Add a file to unbreak the build

6 years agoRegenerate after r325180
bdrewery [Tue, 31 Oct 2017 02:29:30 +0000 (02:29 +0000)]
Regenerate after r325180

6 years agoThis check is not ready here yet.
bdrewery [Tue, 31 Oct 2017 02:25:47 +0000 (02:25 +0000)]
This check is not ready here yet.

Keeping for blame purposes, it will be enabled soon.

6 years agomakeman: Ensure MK_AUTO_OBJ is disabled in some lookups.
bdrewery [Tue, 31 Oct 2017 02:18:06 +0000 (02:18 +0000)]
makeman: Ensure MK_AUTO_OBJ is disabled in some lookups.

Sponsored by: Dell EMC Isilon

6 years agoAUTO_OBJ can work for crunchgen build-tools.
bdrewery [Tue, 31 Oct 2017 02:12:13 +0000 (02:12 +0000)]
AUTO_OBJ can work for crunchgen build-tools.

Sponsored by: Dell EMC Isilon

6 years agoDisable MK_AUTO_OBJ as a make argument like r325078.
bdrewery [Tue, 31 Oct 2017 02:12:09 +0000 (02:12 +0000)]
Disable MK_AUTO_OBJ as a make argument like r325078.

This avoids needlessly trying to enable it opportunistically.

Sponsored by: Dell EMC Isilon

6 years agocleanworld: No need to cleandir if MK_AUTO_OBJ is enabled.
bdrewery [Tue, 31 Oct 2017 01:45:14 +0000 (01:45 +0000)]
cleanworld: No need to cleandir if MK_AUTO_OBJ is enabled.

Sponsored by: Dell EMC Isilon

6 years agoFix installworld/distrib-dirs for pathconv after r325186.
bdrewery [Tue, 31 Oct 2017 01:43:36 +0000 (01:43 +0000)]
Fix installworld/distrib-dirs for pathconv after r325186.

Sponsored by: Dell EMC Isilon

6 years agoMove some objdir handling (OBJROOT/OBJTOP) out of DIRDEPS_BUILD-only files.
bdrewery [Tue, 31 Oct 2017 00:26:42 +0000 (00:26 +0000)]
Move some objdir handling (OBJROOT/OBJTOP) out of DIRDEPS_BUILD-only files.

Sponsored by: Dell EMC Isilon

6 years agoAdd RELOBJTOP and RELSRCTOP for relative paths.
bdrewery [Tue, 31 Oct 2017 00:07:41 +0000 (00:07 +0000)]
Add RELOBJTOP and RELSRCTOP for relative paths.

RELSRCTOP is likely not as useful since make will always be running from
inside of .OBJDIR and using something like ${.CURDIR}/${RELSRCTOP} is
not redundant for ${SRCTOP}.

Sponsored by: Dell EMC Isilon

6 years agoRename RELTOP since it will mean something else globally.
bdrewery [Tue, 31 Oct 2017 00:07:37 +0000 (00:07 +0000)]
Rename RELTOP since it will mean something else globally.

Sponsored by: Dell EMC Isilon

6 years agoDIRDEPS_BUILD: Update dependencies.
bdrewery [Tue, 31 Oct 2017 00:07:04 +0000 (00:07 +0000)]
DIRDEPS_BUILD: Update dependencies.

Sponsored by: Dell EMC Isilon

6 years agoDIRDEPS_BUILD: Connect new directories.
bdrewery [Tue, 31 Oct 2017 00:04:07 +0000 (00:04 +0000)]
DIRDEPS_BUILD: Connect new directories.

Sponsored by: Dell EMC Isilon

6 years agoConnect libpathconv, disconnected since import in r309035.
bdrewery [Tue, 31 Oct 2017 00:03:52 +0000 (00:03 +0000)]
Connect libpathconv, disconnected since import in r309035.

Sponsored by: Dell EMC Isilon

6 years agoProperly connect tests.
bdrewery [Tue, 31 Oct 2017 00:03:49 +0000 (00:03 +0000)]
Properly connect tests.

Sponsored by: Dell EMC Isilon

6 years agoProvide clang-rt for the clang toolchain as well.
bdrewery [Tue, 31 Oct 2017 00:03:46 +0000 (00:03 +0000)]
Provide clang-rt for the clang toolchain as well.

Sponsored by: Dell EMC Isilon

6 years agolibdevdctl tests require an external port.
bdrewery [Tue, 31 Oct 2017 00:03:43 +0000 (00:03 +0000)]
libdevdctl tests require an external port.

Sponsored by: Dell EMC Isilon

6 years agoChase r315223: Disconnect ipftest/ipresend
bdrewery [Tue, 31 Oct 2017 00:03:40 +0000 (00:03 +0000)]
Chase r315223: Disconnect ipftest/ipresend

Sponsored by: Dell EMC Isilon

6 years agoDIRDEPS_BUILD: libgcc now depends on MK_LLVM_LIBUNWIND
bdrewery [Tue, 31 Oct 2017 00:03:36 +0000 (00:03 +0000)]
DIRDEPS_BUILD: libgcc now depends on MK_LLVM_LIBUNWIND

The dependency on gnu/lib/libgcc or lib/libgcc* is determined
at 'make dirdeps' time.

Sponsored by: Dell EMC Isilon

6 years agoFollow-up r320149: Enable GPL_DTC if we're using GCC as the cross-compiler.
bdrewery [Tue, 31 Oct 2017 00:03:32 +0000 (00:03 +0000)]
Follow-up r320149: Enable GPL_DTC if we're using GCC as the cross-compiler.

This fixes object files landing in the source tree in gnu/usr.bin/dtc
for GCC platforms.

We cannot reliably detect if an external compiler is used here, and the
default YES option does include GCC_BOOTSTRAP which implies that GCC may
be used for the build.

The problem manifests when not using an external compiler, and the host
compiler is clang.  When a fresh build is done (no OBJDIR yet) the
'make obj' treewalk is done before 'make cross-tools', so
COMPILER_FEATURES at this point contains 'c++11' since the host compiler
was used for COMPILER_FEATURES.  Once cross-tools builds the GCC
bootstrap compiler and then descends into 'make everything',
COMPILER_FEATURES no longer contains 'c++11' and MK_GPL_DTC defaults to
enabled.  Now it builds in gnu/usr.bin/dtc without an OBJDIR preset and
drops files into the source tree.

The COMPILER_FEATURES check here is useful for knowing if we can *bootstrap*
C++11 things.  Indeed we do bootstrap dtc as a build tool so it is
useful for enabling the BSD dtc for the build, but we end up needing the
GPL dtc for installation anyway.

Reviewed by: manu, emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12817

6 years agoRun mm-mtree with whatever -j value the build is using.
bdrewery [Tue, 31 Oct 2017 00:03:29 +0000 (00:03 +0000)]
Run mm-mtree with whatever -j value the build is using.

Reviewed by: gjb
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12807

6 years agoThese values already set by src.libnames.mk.
bdrewery [Tue, 31 Oct 2017 00:03:25 +0000 (00:03 +0000)]
These values already set by src.libnames.mk.

MFC after: 2 weeks
Sponsored by: Dell EMC Isilon

6 years agoUse more clear SRCTOP here.
bdrewery [Tue, 31 Oct 2017 00:03:22 +0000 (00:03 +0000)]
Use more clear SRCTOP here.

Sponsored by: Dell EMC Isilon

6 years agoActually add zfs32/Makefile
imp [Mon, 30 Oct 2017 23:39:55 +0000 (23:39 +0000)]
Actually add zfs32/Makefile

6 years agoFor amd64, compile both zfs and zfs32 libraries.
imp [Mon, 30 Oct 2017 23:14:59 +0000 (23:14 +0000)]
For amd64, compile both zfs and zfs32 libraries.

We have a separate copy of zfs for userboot. However, we don't need it
if we compile both 32 and 64 bit ZFS libraries. Remove redunant copies
of zfs related .o files now that both versions are
available. Introduce ZFSSRC and use it everywhere.

Sponsored by: Netflix

6 years agoMinor cleanup
imp [Mon, 30 Oct 2017 23:14:53 +0000 (23:14 +0000)]
Minor cleanup

Remove ancient comment about words to maybe add to the builds as
softwords. We're not going to bring them in, so delete the noise.
Also, check to see if HAVE_PNP is defined rather than if its value is
true.

Sponsored by: Netflix

6 years agoWe don't need to build a special ficl for userboot.
imp [Mon, 30 Oct 2017 23:14:48 +0000 (23:14 +0000)]
We don't need to build a special ficl for userboot.

Prior to bringing efi into the system, amd64 systems were building
32-bit ficl only, while userboot required the 64-bit one. However,
with efi, we now build both. userboot can and should use the one we
build for the main tree (in fact, it has been for a while, though I
didn't check to see if that was an intentional change before, or an
accidental one in my cleanup). Eliminate the extra copy (and build
time) for userboot.

Sponsored by: Netflix

6 years agoRemove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honored
imp [Mon, 30 Oct 2017 23:14:44 +0000 (23:14 +0000)]
Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honored
correctly with the new Makefile.inc include order.

Sponsored by: Netflix

6 years agoUse defs.mk name and prefer bsd.init.mk
imp [Mon, 30 Oct 2017 23:14:37 +0000 (23:14 +0000)]
Use defs.mk name and prefer bsd.init.mk

Also need to make some small tweaks to the Makefiles to use += rather
than = due to small shift in include file order.

Sponsored by: Netflix

6 years agoUse defs.mk values for userboot
imp [Mon, 30 Oct 2017 23:14:22 +0000 (23:14 +0000)]
Use defs.mk values for userboot

Sponsored by: Netflix

6 years agobnxt: Add support for new phy_types and speeds
shurd [Mon, 30 Oct 2017 21:26:23 +0000 (21:26 +0000)]
bnxt: Add support for new phy_types and speeds

1) Add new phy_types and speeds from the latest firmware header.
2) Introduced a macro to avoid code duplication and improve readability for
   the invocation of ifmedia_add().

Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Reviewed by: shurd, sbruno
Approved by: sbruno (mentor)
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D12423

6 years agobnxt: HW_LRO Rx Pkt with > 32 fragments caused Crash (iflib)
shurd [Mon, 30 Oct 2017 21:20:33 +0000 (21:20 +0000)]
bnxt: HW_LRO Rx Pkt with > 32 fragments caused Crash (iflib)

Broadcom NIC with HW_LRO setting max_agg_segs >= 6 can generate Rx pkt with
64 (2^6) fragments, modify IFLIB_MAX_RX_SEGS to 64 to avoid memory
corruption / Crash.

Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Reviewed by: shurd, sbruno
Approved by: sbruno (mentor)
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D12774

6 years agoFix PR222744 - netmap errors with iflib em driver
shurd [Mon, 30 Oct 2017 21:14:31 +0000 (21:14 +0000)]
Fix PR222744 - netmap errors with iflib em driver

Fix error when refilling netmap buffers that resulted in the first
buffer of the successive passes through ifl_bus_addrs[] leaving the
first value unset (tmp_pidx started at 1, not zero after the first time
through the loop).

Leave the one unused buffer required by some NICs visible in the netmap
ring rather than hidden. There will always be a buffer in use by the
kernel now when an iflib driver is used via netmap.

Always get the netmap slot index via netmap_idx_n2k() to account for
nkr_hwofs in a consistent way.

Split shared functionality into new functions.
iru_init(): shared by _iflib_fl_refill() and netmap_fl_refill()
netmap_fl_refill(): shared by iflib_netmap_rxsync() and
iflib_netmap_rxq_init()

PR: 222744
Reported by: Shirkdog <mshirk@daemon-security.com>
Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12769

6 years agoAvoid enabling MSI-X if MSI-X is disabled globally
shurd [Mon, 30 Oct 2017 21:08:12 +0000 (21:08 +0000)]
Avoid enabling MSI-X if MSI-X is disabled globally

It was reported on the community call that with
hw.pci.enable_msix=0, iflib would enable MSI-X on the device and attempt
to use it, which caused issues. Test the sysctl explicitly and do not
enable MSI-X if it's disabled globally.

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12805

6 years agobthidd(8): Generate button release event after virtual T-axis button press
wulf [Mon, 30 Oct 2017 20:58:57 +0000 (20:58 +0000)]
bthidd(8): Generate button release event after virtual T-axis button press

Apply PR/213957 (r308165, Make sure the virtual T-axis buttons generate button
release event(s) for continuous tilting) to bluetooth mouse support.

Reviewed by: emax, gonzo
Approved by: gonzo (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12672

6 years agoFix native-xtools installion after r325082 and r325000 to be to /nxb-bin.
bdrewery [Mon, 30 Oct 2017 18:54:27 +0000 (18:54 +0000)]
Fix native-xtools installion after r325082 and r325000 to be to /nxb-bin.

- r325082 split native-xtools-install out of native-xtools.
- r325000 incorrectly changed the installation path from /nxb-bin to /.

Discussed with: imp at D12782

6 years agoAdd myself to committers-src.dot
arichardson [Mon, 30 Oct 2017 18:17:02 +0000 (18:17 +0000)]
Add myself to committers-src.dot

Reviewed by: jhb (mentor)
Approved by: jhb (mentor)

6 years agoppp(8): style(9) fix after r325157
eugen [Mon, 30 Oct 2017 15:19:28 +0000 (15:19 +0000)]
ppp(8): style(9) fix after r325157

Approved by: mav (mentor)

6 years agoFix ppp(8) to add RTF_HOST flag to created host route.
eugen [Mon, 30 Oct 2017 15:02:42 +0000 (15:02 +0000)]
Fix ppp(8) to add RTF_HOST flag to created host route.

Reported by: Mike Tancsa <mike@sentex.net>
Approved by: avg (mentor)
MFC After: 1 week

6 years agoSet a default hostname for virtual machine images.
gjb [Mon, 30 Oct 2017 13:54:54 +0000 (13:54 +0000)]
Set a default hostname for virtual machine images.

A recent bug in security/sudo causes segmentation faults when
the system is not configured with a hostname, which causes issues
with some virtual machine setups, notably Vagrant.  Set the default
hostname to the output of 'uname -o'.

Submitted by: Nicholas Fiorentini
Sponsored by: The FreeBSD Foundation

6 years agortwn_usb(4): add few USB IDs.
avos [Mon, 30 Oct 2017 08:57:08 +0000 (08:57 +0000)]
rtwn_usb(4): add few USB IDs.

Submitted by: wfpower@yandex.ru (via github).

6 years agoUse MAP_PRIVATE instead of obsolete MAP_COPY. No functional changes.
trasz [Mon, 30 Oct 2017 08:56:04 +0000 (08:56 +0000)]
Use MAP_PRIVATE instead of obsolete MAP_COPY.  No functional changes.

MFC after: 2 weeks

6 years agoRemove unnecessary C in .fwo file I accidentally made consistent
ngie [Mon, 30 Oct 2017 06:51:03 +0000 (06:51 +0000)]
Remove unnecessary C in .fwo file I accidentally made consistent

MFC after: 1 month
MFC with: r325122, r325124

6 years agoFix a bad copy-paste (8000C -> 8265) done in r325122
ngie [Mon, 30 Oct 2017 06:48:38 +0000 (06:48 +0000)]
Fix a bad copy-paste (8000C -> 8265) done in r325122

This fixes the clean rule for "device iwm8265fw".

MFC after: 1 month
MFC with: r325122

6 years agoReference iwm8265fw support in iwm(4) as well
ngie [Mon, 30 Oct 2017 06:43:40 +0000 (06:43 +0000)]
Reference iwm8265fw support in iwm(4) as well

This documentation update is similar to what was done in iwmfw(4) in r325121.

MFC after: 1 month
MFC with: r325121

6 years agoFill in the blanks for iwm8265fw(4) rules, missed in r324434
ngie [Mon, 30 Oct 2017 06:35:09 +0000 (06:35 +0000)]
Fill in the blanks for iwm8265fw(4) rules, missed in r324434

Now using "device iwmfw" or "device iwm8265fw" in one's kernel configuration
will potentially result in a working IWM8265 series wireless SoC.

This is an alternative to the fix that was made in r324470 for
`sys/modules/iwmfw`.

MFC after: 1 month

6 years agoiwmfw(4): update support info
ngie [Mon, 30 Oct 2017 06:06:37 +0000 (06:06 +0000)]
iwmfw(4): update support info

- Document iwm8265fw firmware knobs.
- Note that 8000 series cards are also covered by the iwmfw(4) firmware module
  set.

6 years agoUnbreak install
eadler [Mon, 30 Oct 2017 04:30:34 +0000 (04:30 +0000)]
Unbreak install

Reported by: cy

6 years agoUpdate DPAA SDK to SDK 2.0
jhibbits [Mon, 30 Oct 2017 03:41:04 +0000 (03:41 +0000)]
Update DPAA SDK to SDK 2.0

This adds some support for ARM as well as 64-bit.  64-bit on PowerPC is
currently not working, and ARM support has not been completed or tested on the
FreeBSD side.

As this was imported from a Linux tree, it includes some Linux-isms
(ioread/iowrite), so compile with the LinuxKPI for now.  This may change in the
future.

6 years agoSend IDLE IMMEDIATE for warm boot.
imp [Mon, 30 Oct 2017 03:25:22 +0000 (03:25 +0000)]
Send IDLE IMMEDIATE for warm boot.

We must send either an IDLE IMMEDIATE or a STANDBY IMMEDIATE to drives
on warm boot so their SMART and other volatile data is
persisted. However, for a warm boot we don't want to send STANDBY
IMMEDIATE to some spinning drives because they will spin down. If
there's a lot of these drives on the system, that can cause a
thundering herd problem at startup time (that in extreme cases causes
timeout in device discovery).

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12811

6 years agoReturn proper status from buildenv.
imp [Mon, 30 Oct 2017 03:12:38 +0000 (03:12 +0000)]
Return proper status from buildenv.

make buildenv BUILDENV_SHELL=<some command> more useful. Remove '||
true' from the command line so that errors are properly
returned. There appears to be no reason for it, and it dates back to
the original commit by ru@.

Sponsored by: Netflix

6 years agoFix parallel build issues and add MK_ZFS=no case
imp [Mon, 30 Oct 2017 03:12:34 +0000 (03:12 +0000)]
Fix parallel build issues and add MK_ZFS=no case

To ensure that I don't break the MK_ZFS=no case (currently working),
add that to the build, at least for i386 and amd64. Also, out of an
abundance of caution, clean single threaded, and then build in a
separate make. Otherwise, I hit a race where we build before objdir
has been created, which breaks at the moment.

Sponsored by: Netflix

6 years agoUse defs.mk defins in most MD code
imp [Mon, 30 Oct 2017 03:12:28 +0000 (03:12 +0000)]
Use defs.mk defins in most MD code

Use defines from defs.mk in most MD code (the biggest exception is
x86, which will be its own commit due to its size). Prefer including
bsd.init.mk over the variations (../Makefile.inc and src.opts.mk being
the two biggest ones).

Sponsored by: Netflix

6 years agoAdd Microchip 1-MBit SPI flash ID
jhibbits [Mon, 30 Oct 2017 02:31:08 +0000 (02:31 +0000)]
Add Microchip 1-MBit SPI flash ID

Used on the AmigaOne X5000.

6 years agoAdd P5010/P5010E for completeness
jhibbits [Mon, 30 Oct 2017 01:55:38 +0000 (01:55 +0000)]
Add P5010/P5010E for completeness

6 years agoRemove now bogus README
eadler [Mon, 30 Oct 2017 00:36:08 +0000 (00:36 +0000)]
Remove now bogus README

The SGML referenced was removed in r4719 of the doc repo.

6 years agoRevert removal of 9.x references in UPDATING
eadler [Sun, 29 Oct 2017 21:25:58 +0000 (21:25 +0000)]
Revert removal of 9.x references in UPDATING

Requested by: imp

6 years agorescue: say gbye to 'boot floppies' and moderize
eadler [Sun, 29 Oct 2017 21:21:39 +0000 (21:21 +0000)]
rescue: say gbye to 'boot floppies' and moderize

6 years agoImprove the performance of the hpet timer in bhyve guests by making the
ian [Sun, 29 Oct 2017 20:50:03 +0000 (20:50 +0000)]
Improve the performance of the hpet timer in bhyve guests by making the
timer frequency a power of two.  This changes the frequency from 10 to
16.7 MHz (2 ^ 24 HZ).  Using a power of two avoids roundoff errors when
doing arithmetic in sbintime_t units.

Testing shows this can fix erratic ntpd behavior in guests using the
hpet timer (which is the default for multicore guests).

Reported by: bsam@

6 years agoUpdate the updating URL in UPDATING
eadler [Sun, 29 Oct 2017 20:40:56 +0000 (20:40 +0000)]
Update the updating URL in UPDATING

Also remove references to 9.x

6 years agoCorrect the URLs for both READMEs for tracking src
eadler [Sun, 29 Oct 2017 20:29:31 +0000 (20:29 +0000)]
Correct the URLs for both READMEs for tracking src

Previously there were two different URLs in two
different READMEs, neither of which went anywhere.

6 years agoThe !! trick does not apply to all shells
eadler [Sun, 29 Oct 2017 20:20:51 +0000 (20:20 +0000)]
The !! trick does not apply to all shells

Requested by: emaste

6 years agoFix misleading comment.
mmel [Sun, 29 Oct 2017 14:26:37 +0000 (14:26 +0000)]
Fix misleading comment.
Not a functional change.

MFC after: 3 days