]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoReflect error indication according to POSIX and what those functions
Andrey A. Chernov [Sun, 5 Jun 2016 15:46:14 +0000 (15:46 +0000)]
Reflect error indication according to POSIX and what those functions
currently do.

8 years agoFix build with external gcc
Baptiste Daroussin [Sun, 5 Jun 2016 11:56:03 +0000 (11:56 +0000)]
Fix build with external gcc

Completly disable some extra optimisation for very recent gcc.
They would require some updated in the runtime which we do not have yet

8 years agoFix 4-byte overflow in ipv6_writemask.
Alexander V. Chernikov [Sun, 5 Jun 2016 10:33:53 +0000 (10:33 +0000)]
Fix 4-byte overflow in ipv6_writemask.

This bug could cause some IPv6 table prefix delete requests to fail.

Obtained from: Yandex LLC

8 years agoEnsure old gcc does not accidently get the attributes it does not know about
Baptiste Daroussin [Sun, 5 Jun 2016 09:38:48 +0000 (09:38 +0000)]
Ensure old gcc does not accidently get the attributes it does not know about

8 years agoRemove duplicated semicolons.
Edward Tomasz Napierala [Sun, 5 Jun 2016 08:51:56 +0000 (08:51 +0000)]
Remove duplicated semicolons.

MFC after: 1 month

8 years agoReport negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"
Edward Tomasz Napierala [Sun, 5 Jun 2016 08:48:37 +0000 (08:48 +0000)]
Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"
and "ctladm islist -v" outputs.

MFC after: 1 month

8 years ago[bwn] Add missing firmware release calls.
Adrian Chadd [Sun, 5 Jun 2016 07:56:28 +0000 (07:56 +0000)]
[bwn] Add missing firmware release calls.

This trips me up whenever I'm fooling around with partially supported
NICs that fail to fully attach or initialise - the firmware gets loaded
and references, but something fails - and the firmware references
aren't cleaned up.

8 years ago[bwn] Enable PHY-LP 5GHz support for the one NIC I have tested it on so far.
Adrian Chadd [Sun, 5 Jun 2016 07:55:21 +0000 (07:55 +0000)]
[bwn] Enable PHY-LP 5GHz support for the one NIC I have tested it on so far.

After perusing the PHY-LP code (don't ask why; honest) I discovered that
it /has/ 5GHz support - but it's not ever used.  I found one NIC - a
BCM4312 w/ pci id 0x4315 - which advertised dual-band PHY-LP support.

Turns out it works.

Whilst here, move up the support bit logging code so I can use it
to debug this.

Tested:

* BCM4312 (pci id 0x4315); 5GHz STA operation

8 years ago[bwn] complain usefully if a PHY-N PHY is detected with no support is compiled in.
Adrian Chadd [Sun, 5 Jun 2016 07:51:36 +0000 (07:51 +0000)]
[bwn] complain usefully if a PHY-N PHY is detected with no support is compiled in.

Log something other than "error 6" if the attach fails because the
GPL PHY-N code isn't included.

8 years agosfxge(4): allow firmware to auto-configure event queues on Medford
Andrew Rybchenko [Sun, 5 Jun 2016 06:37:54 +0000 (06:37 +0000)]
sfxge(4): allow firmware to auto-configure event queues on Medford

On Medford, licenses are required to enable RX and event cut through and to
disable RX batching. To avoid the need for the driver to make decisions based on
the licensing state, the MC_CMD_INIT_EVQ has been extended to allow us to leave
the decision to the firmware. If the adapter is licensed for low-latency use,
the firmware will choose the optimal settings for latency, otherwise it will use
the best settings for throughput.

For Huntington we still need to choose the settings ourselves.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6717

8 years ago[ath_hal] add AR9462 (jupiter) RX gain / XLNA programming.
Adrian Chadd [Sun, 5 Jun 2016 05:55:27 +0000 (05:55 +0000)]
[ath_hal] add AR9462 (jupiter) RX gain / XLNA programming.

This seems to make 5G work better.

It doesn't fix powersave handling though, that still sees the PHY get
stuck during initial calibration and everything goes pear shaped.
I'll look into that later.

Tested:

* QCAFN222 NIC, STA mode, 5GHz

Obtained from: Linux ath9k

8 years ago[ath_hal] Add Jupiter 2.1 (AR9462 mac 640.3) support.
Adrian Chadd [Sun, 5 Jun 2016 02:17:51 +0000 (02:17 +0000)]
[ath_hal] Add Jupiter 2.1 (AR9462 mac 640.3) support.

Turns out I wasn't even initialising or programming a lot of stuff
for the AR9462 2.1 chip.  Oops.

This mostly gets it working. powersave scan results in some pretty
hilarious NFcal hangs and I don't see beacons reliably.
There are still some xlna gain tables missing that ath9k has; I'll
follow up with some fixes and then see if the QCAFN222 NIC I have
tests this path.

Tested:

* QCAFN222 NIC, STA mode, 2GHz and 5GHz

8 years ago[ath_hal] teach the reset path(s) about Jupiter 2.1.
Adrian Chadd [Sun, 5 Jun 2016 02:16:16 +0000 (02:16 +0000)]
[ath_hal] teach the reset path(s) about Jupiter 2.1.

This was just .. not programming in things, and thus large chunks
of the radio wouldn't work.  Notably, 5GHz didn't work.

8 years ago[ath_hal] convert the MCI code over to work on Jupiter 2.1.
Adrian Chadd [Sun, 5 Jun 2016 02:15:29 +0000 (02:15 +0000)]
[ath_hal] convert the MCI code over to work on Jupiter 2.1.

(Note: jupiter 1.0 was emulation / test silicon, and was never released
in production.  So, yes, AR_SREV_JUPITER() would really be fine.)

8 years ago[acpi] graphics drivers want access to acpi lid handle
Adrian Chadd [Sun, 5 Jun 2016 02:02:51 +0000 (02:02 +0000)]
[acpi] graphics drivers want access to acpi lid handle

the graphics drivers can benefit from access to the lid handle for querying and getting notifications

Submitted by: kmacy
Differential Revision: https://reviews.freebsd.org/D6643

8 years agoAdd blacklist support to rlogind
Kurt Lidl [Sun, 5 Jun 2016 01:42:58 +0000 (01:42 +0000)]
Add blacklist support to rlogind

Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6593

8 years ago[ath_hal] Make the AR9462 2.0 initvals from ath9k compile.
Adrian Chadd [Sun, 5 Jun 2016 01:42:37 +0000 (01:42 +0000)]
[ath_hal] Make the AR9462 2.0 initvals from ath9k compile.

The (upcoming) semi-working AR9462 2.1 support uses the 2.0 initvals
where appropriate, and those need to at least compile under freebsd.

8 years agoCorrect path for blacklistd.conf in OptionalObsoleteFiles.inc
Kurt Lidl [Sun, 5 Jun 2016 01:40:08 +0000 (01:40 +0000)]
Correct path for blacklistd.conf in OptionalObsoleteFiles.inc

Fix typo made when adding the blacklistd.conf file to OptionalObsoleteFiles.inc

Submitted by: Herbert J. Skuhra ( herbert at mailbox.org )
Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6715

8 years agoFix build after r301404.
Bryan Drewery [Sat, 4 Jun 2016 23:34:51 +0000 (23:34 +0000)]
Fix build after r301404.

X-MFC-With: r301404
MFC after: 1 week

8 years agoDocument getent(1)'s ability to enumerate netgroup members.
Mark Johnston [Sat, 4 Jun 2016 21:34:06 +0000 (21:34 +0000)]
Document getent(1)'s ability to enumerate netgroup members.

MFC after: 3 days

8 years agoFix markup.
Konstantin Belousov [Sat, 4 Jun 2016 20:20:14 +0000 (20:20 +0000)]
Fix markup.

Sponsored by: The FreeBSD Foundation

8 years agobhnd(4): support IPX OTP NVRAM/SPROM data source
Landon J. Fuller [Sat, 4 Jun 2016 19:58:01 +0000 (19:58 +0000)]
bhnd(4): support IPX OTP NVRAM/SPROM data source

Add support for fetching SPROM data from OTP on chipsets with an
IPX OTP controller (including the BCM43225).

This integrates the NVRAM data source into the chipc_caps capability
structure, and adds a sprom_offset field that can be used with OTP
to locate the SPROM image data (found within the general use
region, H/W subregion).

This also removes one of two duplicate parse error messages reported by
both the bhnd_sprom driver and the underlying SPROM parsing API.

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

8 years agoSwitch mips/sentry5 to bhnd(4), and unify with mips/broadcom
Landon J. Fuller [Sat, 4 Jun 2016 19:53:47 +0000 (19:53 +0000)]
Switch mips/sentry5 to bhnd(4), and unify with mips/broadcom

Now that bhnd(4) provides feature parity with the previous siba/mips
implementation, we can switch sentry5 over and begin lifting common
support code out for use across bhnd(4) embedded targets.

Changes:

- Fixed enumeration of siba(4) per-core address maps, required for
  discovery of memory mapped chipc flash region on siba(4) devices.
- Simplified bhnd kernel configuration (dropped 'bhndbus' option).
- Replaced files.broadcom's direct file references with their
  corresponding standard kernel options.
- Lifted out common bcma/siba nexus support, inheriting from the new
  generic bhnd_nexus driver.
- Dropped now-unused sentry5 siba code.
- Re-integrated BCM into the universe build now that it actually compiles.

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

8 years agobhnd(4): Add support for chipc-attached flash
Landon J. Fuller [Sat, 4 Jun 2016 19:39:05 +0000 (19:39 +0000)]
bhnd(4): Add support for chipc-attached flash

This adds support for serial (via SPI) and parallel (via CFI) flash
as found on BCM47xx/BCM53xx SoCs.

Submitted by:   Michael Zhilin <mizhka@gmail.com>
Approved by:    adrian (mentor)
Differential Revision:  https://reviews.freebsd.org/D6250

8 years agoFix several MIPS/BCM-blocking bugs in bhnd(4) chipc
Landon J. Fuller [Sat, 4 Jun 2016 19:31:06 +0000 (19:31 +0000)]
Fix several MIPS/BCM-blocking bugs in bhnd(4) chipc

- Correct IRQ lines for UART (to fix IRQ lookup in future)
- Check device unit in resource assignment during chipc_add_child
- If chipc hint->size is RM_MAX_END, resource end should be same as window end
- Clear reference from resource list entry to resource in case of resource release
- Add CHIPC_GET_CAPS implementation
- Correct chipc flash constants (to be unshifted)
- Default implementation of get_attach_type should iterate over device tree
- Add default implementation for BHND_CHIPC_GET_CAPS usable by chipc grandchildren

Submitted by: Michael Zhilin <mizhka@gmail.com>
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6584

8 years agoUpdate my e-mail address (and fix related typo in siba.4)
Landon J. Fuller [Sat, 4 Jun 2016 19:00:11 +0000 (19:00 +0000)]
Update my e-mail address (and fix related typo in siba.4)

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

8 years agoDon't test for INKERNEL to check whether we're in kernel space.
Ed Schouten [Sat, 4 Jun 2016 18:57:00 +0000 (18:57 +0000)]
Don't test for INKERNEL to check whether we're in kernel space.

It turns out that <machine/param.h> actually defines a macro under this
name, even when we're not in kernelspace. This causes us to suppress
some macro definitions that are used by userspace apps.

PR: 210026
Reported by: jbeich@
MFC after: 2 weeks

8 years agoSupport all architectures by just using sysent.
Bryan Drewery [Sat, 4 Jun 2016 17:39:42 +0000 (17:39 +0000)]
Support all architectures by just using sysent.

PowerPC64 has two different ABIs, neither of which is elf64_freebsd_sysvec.
Using sysent and freebsd32_sysent achieves the same effect.

X-MFC-With: r301130
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoFix incorrect logic in r301394.
Bryan Drewery [Sat, 4 Jun 2016 17:38:17 +0000 (17:38 +0000)]
Fix incorrect logic in r301394.

Reported by: Mark Millard

8 years agoDIRDEPS_BUILD: Update GCC dependencies.
Bryan Drewery [Sat, 4 Jun 2016 17:37:25 +0000 (17:37 +0000)]
DIRDEPS_BUILD: Update GCC dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r301287: Pass external compiler metadata when used.
Bryan Drewery [Sat, 4 Jun 2016 17:17:10 +0000 (17:17 +0000)]
Follow-up r301287: Pass external compiler metadata when used.

This fixes WITH_SYSTEM_COMPILER, WITHOUT_CROSS_COMPILER, external compiler, to
pass the external compiler metadata rather than the ${CC} metadata.  On
a build host that has clang as CC it was passing the clang metadata rather than
GCC metadata during the build.

8 years agoFix typo preventing pw {user,group}next -C from working as expected
Baptiste Daroussin [Sat, 4 Jun 2016 16:31:33 +0000 (16:31 +0000)]
Fix typo preventing pw {user,group}next -C from working as expected

Reported by: Mike Selnet via forums.freebsd.org
MFC after: 3 days

8 years agoImport libucl snapshot 20160604
Baptiste Daroussin [Sat, 4 Jun 2016 14:57:25 +0000 (14:57 +0000)]
Import libucl snapshot 20160604

It replaces xxhash with mumhash
It fixes issues with msgpack on non x86

8 years agoUpdate libucl to 20160604 snapshot
Baptiste Daroussin [Sat, 4 Jun 2016 14:50:12 +0000 (14:50 +0000)]
Update libucl to 20160604 snapshot

8 years agosfxge(4): always be ready to receive batched events
Andrew Rybchenko [Sat, 4 Jun 2016 09:20:46 +0000 (09:20 +0000)]
sfxge(4): always be ready to receive batched events

When the low-latency firmware variant is running, it is reported as not
being capable of batching RX events, but it can still do so if the
FORCE_EV_MERGING flag is set on an RXQ.  Therefore we need to handle
batched RX events even if the capability isn't set.

If this bug is fixed in the firmware such that the capability is set
even when running the low-latency firmware variant, it will almost
always be reported so I don't think we lose much by removing the check.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6705

8 years agosfxge(4): add helper to compute timer quantum
Andrew Rybchenko [Sat, 4 Jun 2016 09:17:45 +0000 (09:17 +0000)]
sfxge(4): add helper to compute timer quantum

This also adjusts the timer values used to match the Linux net
driver implementation:
a) non-zero time intervals should result in at least one quantum
b) timer load/reload values are only zero biased for Falcon/Siena

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6704

8 years ago[ath] remove now unused parameters.
Adrian Chadd [Sat, 4 Jun 2016 08:56:30 +0000 (08:56 +0000)]
[ath] remove now unused parameters.

These will move to being part of the driver btcoex stuff I'm working
on, since the HAL doesn't know what to do with them.

8 years agoUse the UEFI event timer to update the time on arm and arm64. The current
Andrew Turner [Sat, 4 Jun 2016 08:47:45 +0000 (08:47 +0000)]
Use the UEFI event timer to update the time on arm and arm64. The current
code uses the GetTime function from the Runtime Service, however this has
been shown to not return a useable time on many arm64 UEFI implementations.

Reviewed by: jhb, smh
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D6709

8 years ago[ath_hal] add STOMP_AUDIO for AR9462/QCA9565.
Adrian Chadd [Sat, 4 Jun 2016 07:29:10 +0000 (07:29 +0000)]
[ath_hal] add STOMP_AUDIO for AR9462/QCA9565.

Obtained from: Linux ath9k

8 years ago[ath_hal] add placeholders for AUDIO stomp for Kite/Kiwi.
Adrian Chadd [Sat, 4 Jun 2016 07:28:36 +0000 (07:28 +0000)]
[ath_hal] add placeholders for AUDIO stomp for Kite/Kiwi.

It just stomps all; which is enough for some testing.

8 years ago[ath_hal] add BTCOEX_STOMP_AUDIO; delete unused methods.
Adrian Chadd [Sat, 4 Jun 2016 07:28:09 +0000 (07:28 +0000)]
[ath_hal] add BTCOEX_STOMP_AUDIO; delete unused methods.

8 years ago[run] fix TSF locking in RX radiotap.
Adrian Chadd [Sat, 4 Jun 2016 07:18:39 +0000 (07:18 +0000)]
[run] fix TSF locking in RX radiotap.

Submitted by: Imre Vadasz <imre@vdsz.com>

8 years agoioat(4): Always log capabilities on attach
Conrad Meyer [Sat, 4 Jun 2016 04:14:06 +0000 (04:14 +0000)]
ioat(4): Always log capabilities on attach

Different, relatively recent Intel Xeon hardware support radically different
features.  E.g., BDX support CRC32 while BDX-DE does not.

Reviewed by: rpokala (spiritually)
Sponsored by: EMC / Isilon Storage Division

8 years agoioat(4): Export the number of available channels
Conrad Meyer [Sat, 4 Jun 2016 03:54:30 +0000 (03:54 +0000)]
ioat(4): Export the number of available channels

Sponsored by: EMC / Isilon Storage Division

8 years agoioat(4): Make channel indices unsigned
Conrad Meyer [Sat, 4 Jun 2016 03:52:19 +0000 (03:52 +0000)]
ioat(4): Make channel indices unsigned

Sponsored by: EMC / Isilon Storage Division

8 years agoEnable daily_ntpd_leapfile_enable by default. Otherwise an expired
Cy Schubert [Sat, 4 Jun 2016 01:01:46 +0000 (01:01 +0000)]
Enable daily_ntpd_leapfile_enable by default. Otherwise an expired
leapfile will be ignored and ntpd will behave as if it has no
leapfile.

While here, remove an extraneous blank line.

Suggested by: ache
MFC after: 1 week

8 years agoWhen negotiating NTB_SB01BASE_LOCKUP workaround, don't try to limit the
Alexander Motin [Sat, 4 Jun 2016 00:18:59 +0000 (00:18 +0000)]
When negotiating NTB_SB01BASE_LOCKUP workaround, don't try to limit the
BAR size to 1MB.  According to Xeon v3 specifications and my tests, that
size register is write-once and so not writeable after BIOS written it.

Instead of that, make the code work with BAR of any sufficient size,
properly calculating offset within its base.  It also simplifies the code.

Discussed with: cem
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

8 years agoWhen negotiating MSIX parameters, give other head time to see our
Alexander Motin [Sat, 4 Jun 2016 00:08:37 +0000 (00:08 +0000)]
When negotiating MSIX parameters, give other head time to see our
NTB_MSIX_RECEIVED status, before making upper layers overwrite it.

This is not completely perfect, but now it works better then before.

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

8 years agolibiberty: prevent integer overflow.
Pedro F. Giffuni [Fri, 3 Jun 2016 21:37:24 +0000 (21:37 +0000)]
libiberty: prevent integer overflow.

Take care of very old bug leading to heap-buffer overflow by
processing certain file headers via bfd binary.

PR: 200888
Obtained from: OpenBSD
MFC after: 2 weeks

8 years agoWITH_META_MODE: Avoid "building" .depend if there is nothing to do.
Bryan Drewery [Fri, 3 Jun 2016 21:35:19 +0000 (21:35 +0000)]
WITH_META_MODE: Avoid "building" .depend if there is nothing to do.

This avoids 'Building /path/.depend' when it will not actually produce a
file.

Sponsored by: EMC / Isilon Storage Division

8 years agoMFV r300961:
Pedro F. Giffuni [Fri, 3 Jun 2016 21:23:11 +0000 (21:23 +0000)]
MFV r300961:
one-true-awk: replace 0 with NULL for pointers

Also remove a redundant semicolon.

8 years agotegra124: use roundup/rounddown macros from <sys/param.h>.
Pedro F. Giffuni [Fri, 3 Jun 2016 21:11:34 +0000 (21:11 +0000)]
tegra124: use roundup/rounddown macros from <sys/param.h>.

8 years agoWITHOUT_CROSS_COMPILER: Fix installworld.
Bryan Drewery [Fri, 3 Jun 2016 20:49:49 +0000 (20:49 +0000)]
WITHOUT_CROSS_COMPILER: Fix installworld.

Since no WORLDTMP/usr/bin/cc is created, cc cannot be found
during installworld time since /usr/bin is not in the PATH.
Pass along the known compiler metadata to allow installworld
to work.  The same fix was used for WITH_SYSTEM_COMPILER.

A better route would be to store a cookie in buildworld
containing this compiler metadata and then using that
at install time, rather than rerunning cc.

Reported by: Mark Millard
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_CCACHE_BUILD + WITH_META_MODE: Ignore ccache changes.
Bryan Drewery [Fri, 3 Jun 2016 19:25:45 +0000 (19:25 +0000)]
WITH_CCACHE_BUILD + WITH_META_MODE: Ignore ccache changes.

Ccache will not affect the output of the objects, so just ignore it for
meta mode handling.  This avoids having everything rebuild if ccache is
updated.

Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Don't expect meta files for side-effect generated files.
Bryan Drewery [Fri, 3 Jun 2016 19:25:41 +0000 (19:25 +0000)]
WITH_META_MODE: Don't expect meta files for side-effect generated files.

The first file in these lists will generate everything else so only
it should be getting a .meta file.  With bmake's missing=yes meta
feature these would otherwise cause a rebuild without the
.NOMETA hint.

Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r301079.
Bryan Drewery [Fri, 3 Jun 2016 19:25:36 +0000 (19:25 +0000)]
Revert r301079.

This breaks cross-building with WITH_META_MODE since it will rebuild
'build-tools' during the 'everything' phase.

A more proper fix is coming to bmake to implicitly require .META unless
.NOMETA (and other restrictions) are in place.

8 years agoDIRDEPS_BUILD: Connect new directories and update dependencies.
Bryan Drewery [Fri, 3 Jun 2016 19:25:30 +0000 (19:25 +0000)]
DIRDEPS_BUILD: Connect new directories and update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse proper interface for FDT parsing and memory mapping in CESA
Zbigniew Bodek [Fri, 3 Jun 2016 18:54:16 +0000 (18:54 +0000)]
Use proper interface for FDT parsing and memory mapping in CESA

Improvements after r301220.
Bus space methods are not called so simple pmap_mapdev will suffice.
Use OF_getencprop to get buffer with already converted endianess.

Pointed out by: ian
Submitted by:   Michal Stanek <mst@semihalf.com>
Obtained from:  Semihalf

8 years agoUse nitems() macro instead of re-inventing it
Zbigniew Bodek [Fri, 3 Jun 2016 18:52:57 +0000 (18:52 +0000)]
Use nitems() macro instead of re-inventing it

Fixed after r301221.

Pointed out by: oshogbo
Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf

8 years agoOne of the already implemented options in release/Makefile is NOSRC. When
Renato Botelho [Fri, 3 Jun 2016 18:37:56 +0000 (18:37 +0000)]
One of the already implemented options in release/Makefile is NOSRC. When
it's defined, installation image is shipped without source distribution
(src.txz)

Add the hability of defining NOSRC in release.conf and pass it to
'make release' argument

Approved by: gjb
Sponsored by: Rubicon Communications (Netgate)
Differential Revision: https://reviews.freebsd.org/D6710

8 years agoTrim some spaces to record correct commit message for the r301278.
Konstantin Belousov [Fri, 3 Jun 2016 18:23:45 +0000 (18:23 +0000)]
Trim some spaces to record correct commit message for the r301278.

Reduce number of iterations used for calibrating ICR read loop.  The
new number of iteration still gives the same ICR latency as before,
tested on Intel SandyBridge and Haswell machines, and on AMD.  But it
significantly reduces the unneeded pause on boot in some VMs, from ~10
secs to less then 1 sec.  It was reported to occur in bhyve on AMD
host.

Reported and tested by: avg
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agodiff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
Konstantin Belousov [Fri, 3 Jun 2016 18:05:18 +0000 (18:05 +0000)]
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
index d8bda77..bb15df0 100644
--- a/sys/x86/x86/local_apic.c
+++ b/sys/x86/x86/local_apic.c
@@ -511,7 +511,7 @@ native_lapic_init(vm_paddr_t addr)
  }

 #ifdef SMP
-#define LOOPS 1000000
+#define LOOPS 100000
  /*
   * Calibrate the busy loop waiting for IPI ack in xAPIC mode.
   * lapic_ipi_wait_mult contains the number of iterations which

8 years agoFor clang, move the definition of FREEBSD_CC_VERSION into its own header
Dimitry Andric [Fri, 3 Jun 2016 16:17:36 +0000 (16:17 +0000)]
For clang, move the definition of FREEBSD_CC_VERSION into its own header
file, lib/clang/freebsd_cc_version.h, instead of reusing Version.inc.
The header is only included from one .cpp file in the clang tree.

This minimizes the number of .cpp files that need to be rebuilt if the
version is bumped.

Discussed with: bdrewery

8 years agonxge(4): Remove useless self-assignment.
Pedro F. Giffuni [Fri, 3 Jun 2016 15:33:21 +0000 (15:33 +0000)]
nxge(4): Remove useless self-assignment.

Apparently the original implementation brought a self-assignment
to work around some bogus lint issue that is not relevant anymore.

CID: 1347070

8 years agozfs: set VROOT / VV_ROOT consistently and in a single place
Andriy Gapon [Fri, 3 Jun 2016 14:37:18 +0000 (14:37 +0000)]
zfs: set VROOT / VV_ROOT consistently and in a single place

This is a followup to r300131.

A filesystem's root vnode can be reached not only through VSF_ROOT, but
by other means as well.  For example, via a dot-dot lookup.
Also, a root vnode can get reclaimed and then re-created.  For these
reasons it was insufficient to clear VV_ROOT flag from a root vnode of a
snapshot mounted under .zfs in zfsctl_snapdir_lookup().

So, now we set the flag in zfs_znode_sa_init() only if a vnode
represent a root of a filesystem or a standalone snapshot.
That is, the flag is not set for snapshots mounted under .zfs.

MFC after: 2 weeks

8 years agoImprove errno documentation in pthread_create(3) and thr_new(2)
Eric van Gyzen [Fri, 3 Jun 2016 14:30:32 +0000 (14:30 +0000)]
Improve errno documentation in pthread_create(3) and thr_new(2)

Add some missing errno values to thr_new(2) and pthread_create(3).
In particular, EDEADLK was not documented in the latter.
While I'm here, improve some English and cross-references.

Reviewed by: kib
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D6663

8 years agozfs_root: fix a potential root vnode reference leak
Andriy Gapon [Fri, 3 Jun 2016 14:22:12 +0000 (14:22 +0000)]
zfs_root: fix a potential root vnode reference leak

It could happen in an unlikely case that we fail to lock the root vnode
with requested flags (which appear to never include LK_NOWAIT).

MFC after: 1 week

8 years agoopenssl: change SHLIB_VERSION_NUMBER to reflect the reality
Andriy Gapon [Fri, 3 Jun 2016 14:09:38 +0000 (14:09 +0000)]
openssl: change SHLIB_VERSION_NUMBER to reflect the reality

Some consumers actually use this definition.

We probably need some procedure to ensure that SHLIB_VERSION_NUMBER
is updated whenever we change the library version in
secure/lib/libssl/Makefile.

8 years agoIntroduce a per-VNET flag to enable/disable netisr prcessing on that VNET.
Bjoern A. Zeeb [Fri, 3 Jun 2016 13:57:10 +0000 (13:57 +0000)]
Introduce a per-VNET flag to enable/disable netisr prcessing on that VNET.
Add accessor functions to toggle the state per VNET.
The base system (vnet0) will always enable itself with the normal
registration. We will share the registered protocol handlers in all
VNETs minimising duplication and management.
Upon disabling netisr processing for a VNET drain the netisr queue from
packets for that VNET.

Update netisr consumers to (de)register on a per-VNET start/teardown using
VNET_SYS(UN)INIT functionality.

The change should be transparent for non-VIMAGE kernels.

Reviewed by: gnn (, hiren)
Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6691

8 years agoxen-blkback: fix error path on failed attach
Roger Pau Monné [Fri, 3 Jun 2016 11:39:35 +0000 (11:39 +0000)]
xen-blkback: fix error path on failed attach

The current error path in case of failure during attach/initialization is
not correct and leaves blkback in a stuck state. This is due to blkback
waiting for blkfront to switch to state XenbusStateClosed, but if blkfront
never attached (because the guest is not even started) it cannot possibly
make it to that state.

Instead just wait for the frontend to be in a state different than
XenbusStateConnected in order to proceed with the shutdown. Also, it is
wrong to call xbb_detach directly because it destroys the lock which can
still be used by xbb_frontend_changed.

Sponsored by: Citrix Systems R&D

8 years agoblkback: add support for hotplug scripts
Roger Pau Monné [Fri, 3 Jun 2016 11:38:52 +0000 (11:38 +0000)]
blkback: add support for hotplug scripts

Hotplug scripts are needed in order to use fancy disk configurations in xl,
like iSCSI disks. The job of hotplug scripts is to locally attach the disk
and present it to blkback as a block device or a regular file.

This change introduces a new xenstore node in the blkback hierarchy, called
"physical-device-path". This is a straigh replacement for the "params" node,
which was used before.

Hotplug scripts will need to read the "params" node, perform whatever
actions are necessary and then write the "physical-device-path" node. The
hotplug script is also in charge of detaching the disk once the domain has
been shutdown.

Sponsored by: Citrix Systems R&D

8 years agoDefine irq variable only in the block where used.
Svatopluk Kraus [Fri, 3 Jun 2016 11:18:30 +0000 (11:18 +0000)]
Define irq variable only in the block where used.

8 years agoPostpone allocation of IRQ resource to the time when interrupt
Svatopluk Kraus [Fri, 3 Jun 2016 11:05:55 +0000 (11:05 +0000)]
Postpone allocation of IRQ resource to the time when interrupt
controller devices are attached. This has already been done for
bus_setup_intr().

There was no doubt that if someone wants to setup an interrupt,
corresponding interrupt controller device must already be attached.
However, the same must be valid for allocation of an interrupt resource
unless the allocation is done blindly, without any information that
such interrupt even exists. While it was done this blind way before,
it won't be possible after next INTRNG change.

8 years agoAdd the GICv3 ITS intrng driver. As the interface to the interrupt
Andrew Turner [Fri, 3 Jun 2016 10:28:06 +0000 (10:28 +0000)]
Add the GICv3 ITS intrng driver. As the interface to the interrupt
framework has significantly changed the driver has moved to a new file.
While it shares some code with the existing driver this has been modified
to work better with the intrng framework.

This has been tested on the ThunderX servers in the netperf cluster and has
been used to boot them for other testing, including DTrace and hwpmc.

With this we can use intrng on all supported arm64 platforms I was able to
test on. It is expected we will move to intrng soon, and disable the old
arm64 interrupt framework.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6437

8 years agoAdd an interface to handle interrupt controllers that have a contiguous
Andrew Turner [Fri, 3 Jun 2016 10:13:18 +0000 (10:13 +0000)]
Add an interface to handle interrupt controllers that have a contiguous
range of interrupts they pass to a second controller driver to handle.
The parent driver is expected to detect when one of these interrupts has
been triggered and call intr_child_irq_handler to pass the interrupt to
a child. The children controllers are then expected to manage the range
by allocating interrupts as needed.

This will initially be used by the ARM GICv3 driver, but is is expected to
be useful for other driver where this type of allocation applies.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6436

8 years agoUse insertion sort instead of bubble sort in TCP LRO.
Hans Petter Selasky [Fri, 3 Jun 2016 08:35:07 +0000 (08:35 +0000)]
Use insertion sort instead of bubble sort in TCP LRO.

Replacing the bubble sort with insertion sort gives an 80% reduction
in runtime on average, with randomized keys, for small partitions.

If the keys are pre-sorted, insertion sort runs in linear time, and
even if the keys are reversed, insertion sort is faster than bubble
sort, although not by much.

Update comment describing "tcp_lro_sort()" while at it.

Differential Revision: https://reviews.freebsd.org/D6619
Sponsored by: Mellanox Technologies
Tested by: Netflix
Suggested by: Pieter de Goeje <pieter@degoeje.nl>
Reviewed by: ed, gallatin, gnn, transport

8 years agoChase NTP update.
Xin LI [Fri, 3 Jun 2016 08:19:47 +0000 (08:19 +0000)]
Chase NTP update.

8 years agoMFV r301238:
Xin LI [Fri, 3 Jun 2016 08:00:22 +0000 (08:00 +0000)]
MFV r301238:

ntp 4.2.8p8.

Security: CVE-2016-4957, CVE-2016-4953, CVE-2016-4954
Security: CVE-2016-4955, CVE-2016-4956
Security: FreeBSD-SA-16:24.ntp
With hat: so

8 years agoGet struct sctp_net_route in-sync with struct route again.
Michael Tuexen [Fri, 3 Jun 2016 07:43:04 +0000 (07:43 +0000)]
Get struct sctp_net_route in-sync with struct route again.

8 years agoStore the peers vtag in host byte order in the cookie, since all
Michael Tuexen [Fri, 3 Jun 2016 07:24:41 +0000 (07:24 +0000)]
Store the peers vtag in host byte order in the cookie, since all
consumers expect it that way.
This fixes the vtag when sending en ERROR chunk.

MFC after: 1 week

8 years agoAdd blacklist support to fingerd
Kurt Lidl [Fri, 3 Jun 2016 07:00:28 +0000 (07:00 +0000)]
Add blacklist support to fingerd

Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5916

8 years agoAdd blacklist support to rshd
Kurt Lidl [Fri, 3 Jun 2016 06:58:20 +0000 (06:58 +0000)]
Add blacklist support to rshd

Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6594

8 years agoAdd blacklist support to ftpd
Kurt Lidl [Fri, 3 Jun 2016 06:24:03 +0000 (06:24 +0000)]
Add blacklist support to ftpd

Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6703

8 years agoAdd blacklistd.conf manpage
Kurt Lidl [Fri, 3 Jun 2016 06:15:52 +0000 (06:15 +0000)]
Add blacklistd.conf manpage

Install the blacklistd.conf man page, missed in the original commit.

Submitted by: Herbert J. Skuhra ( herbert at mailbox.org )
Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6702

8 years agoVendor import of ntp-4.2.8p8.
Xin LI [Fri, 3 Jun 2016 05:55:24 +0000 (05:55 +0000)]
Vendor import of ntp-4.2.8p8.

8 years agosfxge(4): support EVQ timer workaround via MCDI
Andrew Rybchenko [Fri, 3 Jun 2016 05:27:34 +0000 (05:27 +0000)]
sfxge(4): support EVQ timer workaround via MCDI

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/6675

8 years ago[drm] fix up hex_dump_to_buffer to not overflow linebuf.
Adrian Chadd [Fri, 3 Jun 2016 05:01:35 +0000 (05:01 +0000)]
[drm] fix up hex_dump_to_buffer to not overflow linebuf.

That check wasn't enough to handle appending a two byte character
following it.

This prevented my T400 (Intel Core 2 Duo P8400) from attaching;
it would panic from a stack overflow detection.

8 years agodhclient(1): correct obvious mismatch in get_char().
Pedro F. Giffuni [Fri, 3 Jun 2016 03:40:39 +0000 (03:40 +0000)]
dhclient(1): correct obvious mismatch in get_char().

Correct switch between current and previous line buffers when
encountering a carriage return in the input.

CID: 1305719
Obtained from: OpenBSD (CVS rev. 1.30)
MFC after: 3 days

8 years agoUpdate to ALPHA2 in preparation of a new set of snapshot builds.
Glen Barber [Fri, 3 Jun 2016 00:06:24 +0000 (00:06 +0000)]
Update to ALPHA2 in preparation of a new set of snapshot builds.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

8 years agoFix up the Infiniband code to handle the new arpresolve.
George V. Neville-Neil [Thu, 2 Jun 2016 20:53:43 +0000 (20:53 +0000)]
Fix up the Infiniband code to handle the new arpresolve.

8 years agoRemove libstdc++ again.
Bryan Drewery [Thu, 2 Jun 2016 20:31:02 +0000 (20:31 +0000)]
Remove libstdc++ again.

This was mis-merged in r298107 which missed r289389.

8 years agoPull in r271548 from upstream llvm trunk (by me):
Dimitry Andric [Thu, 2 Jun 2016 19:54:38 +0000 (19:54 +0000)]
Pull in r271548 from upstream llvm trunk (by me):

  Only attempt to detect AVG if SSE2 is available

  Summary:
  In PR29973 Sanjay Patel reported an assertion failure when a certain
  loop was optimized, for a target without SSE2 support.  It turned out
  this was because of the AVG pattern detection introduced in rL253952.

  Prevent the assertion failure by bailing out early in
  `detectAVGPattern()`, if the target does not support SSE2.

  Also add a minimized test case.

  Reviewers: congh, eli.friedman, spatel

  Subscribers: emaste, llvm-commits

  Differential Revision: http://reviews.llvm.org/D20905

This should fix assertion failures ("Requires at least SSE2!") when
building the games/0ad port with CPUTYPE=pentium3.

Reported by: madpilot

8 years agoAdd basic blacklist build support
Kurt Lidl [Thu, 2 Jun 2016 19:06:04 +0000 (19:06 +0000)]
Add basic blacklist build support

Reviewed by: rpaulo
Approved by: rpaulo
Relnotes: YES
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5913

8 years agoAdd support for CESA on Armada38x
Zbigniew Bodek [Thu, 2 Jun 2016 18:41:33 +0000 (18:41 +0000)]
Add support for CESA on Armada38x

Changes:
- added new SoC ID in CESA attach
- allowed crypto driver IDs other than 0
- added CESA nodes to Armada38x .dts files
- enabled required devices in kernconf

Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6220

8 years agoAdd HMAC-SHA256 support in CESA
Zbigniew Bodek [Thu, 2 Jun 2016 18:39:33 +0000 (18:39 +0000)]
Add HMAC-SHA256 support in CESA

Only HMAC-SHA256 is added as it is the only SHA-2 variant supported by
cryptodev. It is not possible to register hardware support for other
algorithms in the family including regular non-keyed SHA256.

Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6219

8 years agoTruncate HMAC output only if requested by the client
Zbigniew Bodek [Thu, 2 Jun 2016 18:37:50 +0000 (18:37 +0000)]
Truncate HMAC output only if requested by the client

The output of HMAC was previously truncated to 12 bytes. This was only
correct in case of one particular crypto client - the new version of IPSEC.
Fix by taking into account the cri_mlen field in cryptoini session request
filled in by the client.

Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6218

8 years agoSplit CESA memory resource into TDMA and CESA regs
Zbigniew Bodek [Thu, 2 Jun 2016 18:35:35 +0000 (18:35 +0000)]
Split CESA memory resource into TDMA and CESA regs

TDMA and CESA registers are placed in different ranges of memory. Split
memory resource in DTS to reflect that. This change is needed to support
multiple CESA nodes as otherwise the ranges of different nodes would
overlap.

In consequence, CESA_WRITE and CESA_READ macros have been split depending
on which range of registers is accessed. Offsets for CESA registers have
been modified as the base address has changed.

Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6217

8 years agoConfigure CPU window to second CESA SRAM
Zbigniew Bodek [Thu, 2 Jun 2016 18:33:26 +0000 (18:33 +0000)]
Configure CPU window to second CESA SRAM

Check if there is a second CESA SRAM node in FDT and add a CPU window
for it. Define A38X specific macro for setting device attribute for
each node.

Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6216

8 years agoMap CESA SRAM memory in driver attach for Armada38x
Zbigniew Bodek [Thu, 2 Jun 2016 18:31:36 +0000 (18:31 +0000)]
Map CESA SRAM memory in driver attach for Armada38x

On other platforms with CESA accelerator the SRAM memory is mapped in
early init before driver is attached. This method only works correctly
with mappings no smaller than L1 section size (1MB). There may be more
SRAM blocks and they may have smaller sizes than 1MB as is the case
for Armada38x. Instead, map SRAM memory with bus_space_map() in CESA
driver attach. Note that we can no longer assume that VA == PA for the
SRAM.

Submitted by: Michal Stanek <mst@semihalf.com
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D6215

8 years agoFixup path in NetBSD supplied documentation for FreeBSD
Kurt Lidl [Thu, 2 Jun 2016 18:25:32 +0000 (18:25 +0000)]
Fixup path in NetBSD supplied documentation for FreeBSD

NetBSD installs the blacklist-helper script in /libexec, and
it goes into /usr/libexec on FreeBSD.  Update the docs to
match FreeBSD's installation location.

Reviewed by: rpaulo
Approved by: rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6592