]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoCreate a package for apm(8).
gjb [Thu, 21 Jan 2016 18:41:55 +0000 (18:41 +0000)]
Create a package for apm(8).

Sponsored by: The FreeBSD Foundation

8 years agoCreate a package for amd(8) and related tools.
gjb [Thu, 21 Jan 2016 18:19:33 +0000 (18:19 +0000)]
Create a package for amd(8) and related tools.
While here, fix accounting rc script installation.

Sponsored by: The FreeBSD Foundation

8 years agoFix an incorrect comment.
gjb [Thu, 21 Jan 2016 18:02:31 +0000 (18:02 +0000)]
Fix an incorrect comment.

Sponsored by: The FreeBSD Foundation

8 years agoCreate an acct package for accounting tools.
gjb [Thu, 21 Jan 2016 17:49:10 +0000 (17:49 +0000)]
Create an acct package for accounting tools.

Sponsored by: The FreeBSD Foundation

8 years agoCreate a rcmds package.
gjb [Thu, 21 Jan 2016 17:33:31 +0000 (17:33 +0000)]
Create a rcmds package.

Sponsored by: The FreeBSD Foundation

8 years agoInclude architecture-specific manuals in the runtime-manuals package.
gjb [Thu, 21 Jan 2016 16:50:16 +0000 (16:50 +0000)]
Include architecture-specific manuals in the runtime-manuals package.

Sponsored by: The FreeBSD Foundation

8 years agoAdd UCL file for release-manuals package, missed in previous commit.
gjb [Thu, 21 Jan 2016 16:38:58 +0000 (16:38 +0000)]
Add UCL file for release-manuals package, missed in previous commit.

Sponsored by: The FreeBSD Foundation

8 years agoSeparate manual pages into their own package.
gjb [Thu, 21 Jan 2016 16:36:33 +0000 (16:36 +0000)]
Separate manual pages into their own package.

Sponsored by: The FreeBSD Foundation

8 years agoMFH
gjb [Wed, 20 Jan 2016 17:08:01 +0000 (17:08 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoAdd a package for jail(8) and related utilities.
gjb [Wed, 20 Jan 2016 17:07:13 +0000 (17:07 +0000)]
Add a package for jail(8) and related utilities.

Sponsored by: The FreeBSD Foundation

8 years agoAdd some missing dependencies on pci_iov_if.h.
bdrewery [Wed, 20 Jan 2016 16:45:39 +0000 (16:45 +0000)]
Add some missing dependencies on pci_iov_if.h.

Sponsored by: EMC / Isilon Storage Division

8 years agoxen-netfront: add multiqueue support
royger [Wed, 20 Jan 2016 15:02:43 +0000 (15:02 +0000)]
xen-netfront: add multiqueue support

Add support for multiple TX and RX queue pairs. The default number of queues
is set to 4, but can be easily changed from the sysctl node hw.xn.num_queues.

Also heavily refactor netfront driver: break out a bunch of helper
functions and different structures. Use threads to handle TX and RX.
Remove some dead code and fix quite a few bugs as I go along.

Submitted by: Wei Liu <wei.liu2@citrix.com>
Reviewed by: royger
Sponsored by: Citrix Systems R&D
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D4193

8 years agoIntroduce initial driver for PMSU on Armada38x
zbb [Wed, 20 Jan 2016 14:49:16 +0000 (14:49 +0000)]
Introduce initial driver for PMSU on Armada38x

This is a stub for PMSU driver. Note that it cannot be used to set the
secondary core boot address during attach because drivers are attached
later than SI_SUB_CPU sysinit where cores are started.
Setting the boot address should be done manually in platform_mp_start_ap().

SMP is working fine with this commit and was enabled in Armada38x kernel
configuration file.

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

8 years agoOFW: Fix ofw_bus_string_list_to_array() function.
mmel [Wed, 20 Jan 2016 14:49:01 +0000 (14:49 +0000)]
OFW: Fix ofw_bus_string_list_to_array() function.
Originally committed version was unfinished and didn't work at all,
because I took it from the wrong WIP branch by mistake.

Approved by: kib (mentor)

8 years agoAdd initial support for SMP on Armada38x
zbb [Wed, 20 Jan 2016 14:45:54 +0000 (14:45 +0000)]
Add initial support for SMP on Armada38x

- Add file sys/arm/mv/armada38x/armada38x_mp.c
- Set mp_maxid and mp_ncpus based on FDT unless SCU register indicates
  only one core
- Boot CPU1 in platform_mp_start_ap()
- IPI range defined

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

8 years agoOpen window to bootROM memory on Armada38x to allow CPU1 to boot
zbb [Wed, 20 Jan 2016 14:30:17 +0000 (14:30 +0000)]
Open window to bootROM memory on Armada38x to allow CPU1 to boot

CPU1 is halted in bootROM code while it is waiting to be released.
Memory window to bootROM must be opened before booting the core.

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

8 years agoSupport watchdog depending on "mrvl,has-wdt" property
zbb [Wed, 20 Jan 2016 14:28:05 +0000 (14:28 +0000)]
Support watchdog depending on "mrvl,has-wdt" property

With this commit, watchdog is supported only in case of having
"mrvl,has-wdt" property or dedicated for watchdog compatibility field
("marvell,armada-380-wdt"). There is no need to modify dts files,
as "has-wdt" property already exists.

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4424

8 years agoAdd support for watchdog on Armada38x
zbb [Wed, 20 Jan 2016 14:23:57 +0000 (14:23 +0000)]
Add support for watchdog on Armada38x

A38X watchdog support was implemented in sys/arm/mv/timer.c driver.
It required following modifications:
- add "marvell,armada-380-wdt" compatibility, which supports only watchdog
- correct and enhance definitions related to timer control register
- unmask reset capability in RSTOUTn_MASK register
- use dedicated watchdog timer on A38X instead of second timer

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4423

8 years agoAdd support for I2C on Armada38x
zbb [Wed, 20 Jan 2016 14:21:06 +0000 (14:21 +0000)]
Add support for I2C on Armada38x

Extend driver's compatible strings' table
and enable I2C compilation in kernconf.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Jan Dabros <jsd@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4422

8 years agoAdd a new RTC driver for Armada38x
zbb [Wed, 20 Jan 2016 14:18:49 +0000 (14:18 +0000)]
Add a new RTC driver for Armada38x

New driver registers RTC as system clock. New RTC resolution is 1 sec.
Settime and gettime functions were implemented.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Jan Dabros <jsd@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4421

8 years agoCorrect MV_DDR_CADR_BASE definiton in mvwin.h
zbb [Wed, 20 Jan 2016 14:16:13 +0000 (14:16 +0000)]
Correct MV_DDR_CADR_BASE definiton in mvwin.h

SOC_MV_ARMADAXP ifdef was enhanced with SOC_MV_ARMADA38X,
correcting MV_DDR_CADR_BASE definition. It fixes PCIe hangs issue.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4380

8 years agoChange DTS entry of PCIe controller for Armada38x
zbb [Wed, 20 Jan 2016 14:14:30 +0000 (14:14 +0000)]
Change DTS entry of PCIe controller for Armada38x

Invalid (in FreeBSD) definition of PCI controller was
replaced with another one, working in FreeBSD environment.

PCI controller's entry had to move from its parent node
so as to be recognized properly by FBSD.

PCI was enabled in kernel configuration file.

Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4379

8 years agoImprove definitions of CPU/PCIe windows for Armada38x
zbb [Wed, 20 Jan 2016 14:10:00 +0000 (14:10 +0000)]
Improve definitions of CPU/PCIe windows for Armada38x

Enhance existing ARMADAXP defines and introduce new MV_WIN_PCIE_
definitions.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4378

8 years agoFix invalid root link detection in mv_pci driver
zbb [Wed, 20 Jan 2016 14:05:21 +0000 (14:05 +0000)]
Fix invalid root link detection in mv_pci driver

mv_pci driver omitted slot 0, which can be valid device on Armada38x.
New mechanism detects if device is root link, basing on vendor's
and device's IDs.
It is restricted to Armada38x; on other machines, behaviour remains
the same.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4377

8 years agoEnhance remap capabilities for Armada38x
zbb [Wed, 20 Jan 2016 14:02:36 +0000 (14:02 +0000)]
Enhance remap capabilities for Armada38x

Add conditions corresponding to Armada38x-based SoCs,
enhancing their remap capabilities.
This is required for PCIe to work properly.

Reviewed by:    andrew
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4376

8 years agoEnable USB in kernconf of Armada38x
zbb [Wed, 20 Jan 2016 14:00:32 +0000 (14:00 +0000)]
Enable USB in kernconf of Armada38x

With this commit, USB 2.0 works fine on Armada38x platforms.

Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4375

8 years agoImprove attachment of the ehci_mv driver
zbb [Wed, 20 Jan 2016 13:58:07 +0000 (13:58 +0000)]
Improve attachment of the ehci_mv driver

Driver was modified to ensure it attaches properly to "marvell,orion-ehci"
node, which doesn't have error interrupt line defined. Neccessary
ofw_compat_data struct was added and probe procedure was altered.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4369

8 years agoEnable SCU unit for Armada38x
zbb [Wed, 20 Jan 2016 13:55:51 +0000 (13:55 +0000)]
Enable SCU unit for Armada38x

Valid SCU operation is necessary for SMP interoperability.
Initialization function armada38x_enable_scu() was added.

Reviewed by:    andrew, ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4220

8 years agoSet IO Sync Barrier flags for all Mbus devices on Armada38x
zbb [Wed, 20 Jan 2016 13:53:33 +0000 (13:53 +0000)]
Set IO Sync Barrier flags for all Mbus devices on Armada38x

IO Sync Barrier setting is required for I/O coherency.

Reviewed by:   andrew, ian, imp
Obtained from: Semihalf
Sponsored by:  Stormshield
Submitted by:  Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4219

8 years agoFix busy-detect when using DesignWare UART
zbb [Wed, 20 Jan 2016 13:51:14 +0000 (13:51 +0000)]
Fix busy-detect when using DesignWare UART

uart_dev_ns8250 now relies on compatible property instead of additional
'busy-detect' cell. All drivers with compatible = "snps,dw-apb-uart" have
busy detection turned on. DTS files of devices affected by the change
were modified and 'busy-detect' property was removed.

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4218

8 years agoAdd compatibility string for dw-apb-uart in ns8250 driver
zbb [Wed, 20 Jan 2016 13:47:44 +0000 (13:47 +0000)]
Add compatibility string for dw-apb-uart in ns8250 driver

This compatibility string is used in .dts file of Armada38x
and isrequired for driver attachment.

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4216

8 years agoFix GIC FDT interrupts decoding
zbb [Wed, 20 Jan 2016 13:45:35 +0000 (13:45 +0000)]
Fix GIC FDT interrupts decoding

Interrupt type in FDT was interpreted incorrectly.
Patch taken from freebsd-arm thread 'GIC - interrupts interpretation in
DTS/FDT':
https://lists.freebsd.org/pipermail/freebsd-arm/2015-August/012145.html

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

8 years agoUse GIC-specific decoding function in mv_common.c
zbb [Wed, 20 Jan 2016 13:42:54 +0000 (13:42 +0000)]
Use GIC-specific decoding function in mv_common.c

Add gic_decode_fdt function to fdt_pic_table, allowing to recognize GIC
interrupts on Armada38x. SOC_MV_ARMADA38X ifdef is required because A38X
is the only Marvell's platform in FreeBSD using GIC; lack of ifdef would
lead to linking errors on other platforms.

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Michal Stanek <mst@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4214

8 years agoAdd global mpcore timer node to Armada 38x DTS
zbb [Wed, 20 Jan 2016 13:40:54 +0000 (13:40 +0000)]
Add global mpcore timer node to Armada 38x DTS

Changes:
- global mpcore timer dts node added
- required by driver 'clock-frequency' property added

Reviewed by:    ian
Obtained from:  Semihalf
Sponsored by:   Stormshield
Submitted by:   Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4213

8 years agoDo not require strict compatibility on simplebus
zbb [Wed, 20 Jan 2016 13:35:06 +0000 (13:35 +0000)]
Do not require strict compatibility on simplebus

Strict compatibility requirement is a root of problems when simplebus'
node has two compatibility strings (i.e. on Armada38x). Removing this
requirement should not interfere with other platforms.

fdt_is_compatible_strict() and fdt_find_compatible() calls were changed
in fdt_common.c and mv_common.c.

Reviewed by:    ian, imp
Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision:  https://reviews.freebsd.org/D4602

8 years agoCorrect ranges in Armada38x dts
zbb [Wed, 20 Jan 2016 13:32:13 +0000 (13:32 +0000)]
Correct ranges in Armada38x dts

Ranges property of 'soc' node used two-cell addresses which resulted in
casting errors as simplebus resource allocation works with 32-bit u_long
variables. FDT ranges were simplified.

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

8 years agoIntroduce initial support for Marvell Armada38x
zbb [Wed, 20 Jan 2016 13:14:36 +0000 (13:14 +0000)]
Introduce initial support for Marvell Armada38x

This commit introduces initial support for Marvell Armada38x platform.
Changes:
- Add common DTS files for Armada38x SoCs and DTS file for A388-GP
- Add ARMADA38X kernel configuration
- Add option SOC_MV_ARMADA38X and set MV_PCI_PORTS
- Add list of files to compile
- Implement get_tclk(), get_sar_value(), cpu_reset() functions
- Add CPU ID and SoC numbers
- Correct ifdefs in arm/mv/timer.c

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

8 years agoWelcome miwi back to the portmgr team
culot [Wed, 20 Jan 2016 12:19:34 +0000 (12:19 +0000)]
Welcome miwi back to the portmgr team

8 years agoCorrect assertions in r294362, foobared when separating style fixes
marius [Wed, 20 Jan 2016 12:10:14 +0000 (12:10 +0000)]
Correct assertions in r294362, foobared when separating style fixes
from functional changes before commit.

8 years agoMark gpio as "optional" in files.mv and edit Marvell's kernconfs
zbb [Wed, 20 Jan 2016 11:57:11 +0000 (11:57 +0000)]
Mark gpio as "optional" in files.mv and edit Marvell's kernconfs

Including arm/mv/gpio.c now depends on 'gpio' device. 'device gpio' was
added to all kernconf files of Marvell boards, except ARMADAXP (dummy
mv_gpio_res definition was removed) and ARMADA38X (not supported yet).

This commit allows to use generic files.mv on A38X.

Reviewed by:    andrew
Obtained from: Semihalf
Sponsored by: Stormshield
Submitted by: Bartosz Szczepanek <bsz@semihalf.com>
Differential revision: https://reviews.freebsd.org/D4372

8 years agoRevert r294267 to avoid using experimental VFS_AIO in ARM64's GENERIC
zbb [Wed, 20 Jan 2016 11:34:22 +0000 (11:34 +0000)]
Revert r294267 to avoid using experimental VFS_AIO in ARM64's GENERIC

Remove VFS_AIO from the ARM64's GENERIC as it can be used
as a loadable module.

8 years agoFix rte refcount leak in ip6_forward().
melifaro [Wed, 20 Jan 2016 11:25:30 +0000 (11:25 +0000)]
Fix rte refcount leak in ip6_forward().

Reviewed by: ae
MFC after: 2 weeks
Sponsored by: Yandex LLC

8 years agoAdding info about myself to committers-src.xml
wma [Wed, 20 Jan 2016 11:15:54 +0000 (11:15 +0000)]
Adding info about myself to committers-src.xml

Approved by:           cognet (mentor)
Differential revision: https://reviews.freebsd.org/D5001

8 years agoMFH
gjb [Wed, 20 Jan 2016 09:50:54 +0000 (09:50 +0000)]
MFH

Sponsored by: The FreeBSD Foundation

8 years agoMFV (r285035): fix props (no content changes)
des [Wed, 20 Jan 2016 09:14:37 +0000 (09:14 +0000)]
MFV (r285035): fix props (no content changes)

8 years agoDo not call callbacks for dl_iterate_phdr(3) with the rtld bind and
kib [Wed, 20 Jan 2016 07:21:33 +0000 (07:21 +0000)]
Do not call callbacks for dl_iterate_phdr(3) with the rtld bind and
phdr locks locked.  This allows to call rtld services from the
callback, which is only reasonable for dlopen(path, RTLD_NOLOAD) to
test existence of the library in the image, and for dlsym().  The
later might still be not quite safe, due to the lazy resolution of
filters.

To allow dropping the locks around iteration in dl_iterate_phdr(3), we
insert markers to track current position between relocks.  The global
objects list is converted to tailq and all iterators skip markers,
globallist_next() and globallist_curr() helpers are added.

Reported and tested by: davide
Reviewed by: kan
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

8 years agosfxge: refresh version to note matching version of out-of-tree driver
arybchik [Wed, 20 Jan 2016 06:56:18 +0000 (06:56 +0000)]
sfxge: refresh version to note matching version of out-of-tree driver

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days

8 years agosfxge: cleanup: support __out_bcount_part[_opt] PREfast annotations
arybchik [Wed, 20 Jan 2016 06:50:30 +0000 (06:50 +0000)]
sfxge: cleanup: support __out_bcount_part[_opt] PREfast annotations

New annotation coming into use in the common code. Support its use by
adding null macro definitions for non-Windows platforms.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
X-MFC with:     r293901

8 years agomkdep: Fix -include not being added for .depend tracking.
bdrewery [Wed, 20 Jan 2016 01:40:18 +0000 (01:40 +0000)]
mkdep: Fix -include not being added for .depend tracking.

This fixes incremental build of OpenSSH after the recent upgrade.

For example, in secure/lib/libssh, -include ssh_namespace.h is used on
all files.  This is not tracked in the .depend file though due to
MKDEP_CFLAGS not including it.  The ssh example was broken in r291941
when not using FAST_DEPEND due to the .depend bug.  FAST_DEPEND was not
affected by this because it generates dependencies at compile time and
thus sees the -include.

This ugly make syntax could be simpler for bmake by using :tW but
fmake-compatible syntax is used since this needs to be MFC'd all the way
to stable/9.

Also add a temporary hack to workaround existing checkouts building
incrementally with a .depend file not having these headers.

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

8 years agoUpdate for API changes in OpenSSH 6.8p1.
jhb [Wed, 20 Jan 2016 00:26:50 +0000 (00:26 +0000)]
Update for API changes in OpenSSH 6.8p1.

First, the authfd API now uses a direct file descriptor for the control
socket instead of a more abstract AuthenticationConnection structure.
Second, the functions now consistently return an error value.

Reviewed by: bdrewery

8 years agoInitialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.
jhb [Wed, 20 Jan 2016 00:14:34 +0000 (00:14 +0000)]
Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.

If a driver's Linux mmap callback passed vm_page_prot through unchanged,
then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
value 0 is to the mapping.  On x86, VM_MEMATTR_DEFAULT is the PAT value
for write-back (WB) which is 6, while 0 maps to the PAT value for
uncacheable (UC).  Thus, any mmap request that did not explicitly set
page_prot was tried to map memory as UC triggering the warning in
sg_pager_getpages().

Tested by: np
Reported by: Krishnamraju Eraparaju @ Chelsio
MFC after: 3 days
Sponsored by: Chelsio Communications

8 years agoList source files (foo.c) instead of object files in SRCS.
jhb [Wed, 20 Jan 2016 00:03:28 +0000 (00:03 +0000)]
List source files (foo.c) instead of object files in SRCS.

Reviewed by: bdrewery

8 years agoRevert a printf change from r294307.
jhibbits [Tue, 19 Jan 2016 23:35:12 +0000 (23:35 +0000)]
Revert a printf change from r294307.

Caused build failures with MPC85XX.

Pointy-hat to: jhibbits

8 years agoFix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
marius [Tue, 19 Jan 2016 23:34:27 +0000 (23:34 +0000)]
Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
to actually wait until the TX FIFOs of UARTs have be drained before
returning. This is done by bringing the equivalent of the TS_BUSY flag
found in the previous implementation back in an ABI-preserving way.
Reported and tested by: Patrick Powell

Most likely, drivers for USB-serial-adapters likewise incorporating
TX FIFOs as well as other terminal devices that buffer output in some
form should also provide implementations of tsw_busy.

MFC after: 3 days

8 years agoFAST_DEPEND: Fix improperly depending all .So objects on all headers.
bdrewery [Tue, 19 Jan 2016 23:28:18 +0000 (23:28 +0000)]
FAST_DEPEND: Fix improperly depending all .So objects on all headers.

This was a regression in r290629, which was revealed partly in r294360.
Once 'make depend' has ran it will generate all headers already.  Thus
even with FAST_DEPEND lacking proper dependencies before building, it
will not have any missing headers.  Once objects are compiled the depend
files will be generated with proper dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r294352.
bdrewery [Tue, 19 Jan 2016 23:25:25 +0000 (23:25 +0000)]
Revert r294352.

Further research showed it was the wrong fix and revealed a bigger
problem with the goal of skipping 'make depend'.

8 years agoQuell harmless CID about unchecked return value in nvlist_get_guids.
asomers [Tue, 19 Jan 2016 23:16:24 +0000 (23:16 +0000)]
Quell harmless CID about unchecked return value in nvlist_get_guids.

The return value doesn't need to be checked, because nvlist_get_guid's
callers check the returned values of the guids.

Coverity CID: 1341869
MFC after: 1 week
X-MFC-With: 292066
Sponsored by: Spectra Logic Corp

8 years agoAllow specifying an alternative LD_LIBRARY_PATH for the ldd(1) lookup.
bdrewery [Tue, 19 Jan 2016 22:42:16 +0000 (22:42 +0000)]
Allow specifying an alternative LD_LIBRARY_PATH for the ldd(1) lookup.

This is needed to be able to run check-links.sh against a "sysrooted"
binary while ensuring that the ldd(1) call done on the host uses the
host libc.  It is not possible to set LD_LIBRARY_PATH before calling
check-links.sh as then the "sysrooted" libc would be incorrectly used.

A LD_PRELOAD=libc.so is used to ldd(1) as it needs to use the host libc
to run.  ldd(1) is a simple wrapper around execve(2) and dlopen(2) with
env LD_TRACE_LOADED_OBJECTS set.  Due to the dlopen(2) restriction on
shared library tracing ldd(1) is still required for this lookup.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd some documentation.
bdrewery [Tue, 19 Jan 2016 22:42:13 +0000 (22:42 +0000)]
Add some documentation.

Sponsored by: EMC / Isilon Storage Division

8 years agoValidate that the file exists rather than obscure 'Not an elf file' error.
bdrewery [Tue, 19 Jan 2016 22:42:10 +0000 (22:42 +0000)]
Validate that the file exists rather than obscure 'Not an elf file' error.

Sponsored by: EMC / Isilon Storage Division

8 years agobsd.subdir.mk: Allow easier modification of [STANDALONE_]SUBDIR_TARGETS.
bdrewery [Tue, 19 Jan 2016 22:42:07 +0000 (22:42 +0000)]
bsd.subdir.mk: Allow easier modification of [STANDALONE_]SUBDIR_TARGETS.

This reworks r289254 and removes ALL_SUBDIR_TARGETS.

Because there is an include guard in this file there is no need for
LOCAL_ or ?= on SUBDIR_TARGETS or STANDALONE_SUBDIR_TARGETS.  These can
just be set via src.conf.  By the time bsd.subdir.mk is included it will
just append the values to the existing value and work fine.  This allows
a consistent way to append to these variables without introducing a
LOCAL_ var for STANDALONE_SUBDIR_TARGETS or renaming the historical
SUBDIR_TARGETS.

Sponsored by: EMC / Isilon Storage Division

8 years agoinstallconfig is PARALLEL_SUBDIR safe.
bdrewery [Tue, 19 Jan 2016 22:42:04 +0000 (22:42 +0000)]
installconfig is PARALLEL_SUBDIR safe.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Add header dependency missed in r290629.
bdrewery [Tue, 19 Jan 2016 22:42:01 +0000 (22:42 +0000)]
FAST_DEPEND: Add header dependency missed in r290629.

Sponsored by: EMC / Isilon Storage Division

8 years agoFAST_DEPEND: Still use if filemon is not used.
bdrewery [Tue, 19 Jan 2016 22:41:58 +0000 (22:41 +0000)]
FAST_DEPEND: Still use if filemon is not used.

If filemon is used then there is no need to generate dependency files during
compilation as the .meta files will achieve the same result.

This is a temporary solution until FAST_DEPEND is default.  Once that is
default there will be an option to disable dependency generation entirely
as it is only useful if an incremental build is planned, thus META_MODE+filemon
can enable that option to short-circuit all FAST_DEPEND-related logic.

Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Ensure bmake does not use filemon if it is not loaded.
bdrewery [Tue, 19 Jan 2016 22:41:55 +0000 (22:41 +0000)]
META_MODE: Ensure bmake does not use filemon if it is not loaded.

Sponsored by: EMC / Isilon Storage Division

8 years agoDefine .MAKE.MODE to normal to avoid the need for :U later.
bdrewery [Tue, 19 Jan 2016 22:41:44 +0000 (22:41 +0000)]
Define .MAKE.MODE to normal to avoid the need for :U later.

Sponsored by: EMC / Isilon Storage Division

8 years agosh: Simplify some code related to positional parameters.
jilles [Tue, 19 Jan 2016 22:41:26 +0000 (22:41 +0000)]
sh: Simplify some code related to positional parameters.

8 years agoFix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.
asomers [Tue, 19 Jan 2016 22:07:39 +0000 (22:07 +0000)]
Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.

The bad_truncate test sets the uimmutable flag to produce an error in
truncate, but that flag isn't supported by ZFS.  If /tmp is on a ZFS
filesystem, the test will fail.  Change it to use readonly permissions and
an unpriveleged user instead.

Reviewed by: jilles
MFC after: 1 week
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4862

8 years agoVarious cleanups to the main function for AIO kernel processes:
jhb [Tue, 19 Jan 2016 21:37:51 +0000 (21:37 +0000)]
Various cleanups to the main function for AIO kernel processes:

- Pull the vmspace logic out into helper functions and reduce duplication.
  Operations on the vmspace are all isolated to vm_map.c, but it now exports
  a new 'vmspace_switch_aio' for use by AIO kernel processes.
- When an AIO kernel process wants to exit, break out of the main loop and
  perform cleanup after the loop end.  This reduces a lot of indentation and
  allows cleanup to more closely mirror setup actions before the loop starts.
- Convert a DIAGNOSTIC to KASSERT().
- Replace mycp with more typical 'p'.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4990

8 years agoDon't create a dedicated session for each AIO kernel process.
jhb [Tue, 19 Jan 2016 20:46:30 +0000 (20:46 +0000)]
Don't create a dedicated session for each AIO kernel process.

This code dates back to the initial AIO support and the commit log does
not explain why it is needed.  However, I cannot find anything in the
AIO code or the various file methods (fo_read/fo_write) that would change
behavior due to using a private session instead of proc0's session.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4988

8 years agoUpgrade to OpenSSH 6.9p1.
des [Tue, 19 Jan 2016 18:55:44 +0000 (18:55 +0000)]
Upgrade to OpenSSH 6.9p1.

8 years agoRe-add HPN configuration options as deprecated options to avoid breaking
des [Tue, 19 Jan 2016 18:38:17 +0000 (18:38 +0000)]
Re-add HPN configuration options as deprecated options to avoid breaking
existing configurations that use them.  Note that there is no functional
difference between OpenSSH with HPN and OpenSSH without HPN.

8 years agobegone, foul autoprops!
des [Tue, 19 Jan 2016 18:32:51 +0000 (18:32 +0000)]
begone, foul autoprops!

8 years agoUpgrade to OpenSSH 6.8p1.
des [Tue, 19 Jan 2016 18:28:23 +0000 (18:28 +0000)]
Upgrade to OpenSSH 6.8p1.

8 years agoRemove local override for .cpp.o and .cpp.po rules
emaste [Tue, 19 Jan 2016 17:40:29 +0000 (17:40 +0000)]
Remove local override for .cpp.o and .cpp.po rules

The local build rule used to set -fvisibility=hidden and -fPIC, in
addition to -fexceptions and -D defines that had no effect.

With -fvisibility=hidden and -fPIC in STATIC_CXXFLAGS the standard
bsd.lib.mk rules are suitable for libgcc_s's C++ source.

PR: 206381
Sponsored by: The FreeBSD Foundation

8 years agoNow that we have local modifications in configure.ac and configure, run
des [Tue, 19 Jan 2016 17:20:07 +0000 (17:20 +0000)]
Now that we have local modifications in configure.ac and configure, run
autoheader and autoconf to avoid having to patch configure manually.

8 years agoDisallow zvol-backed ZFS pools
asomers [Tue, 19 Jan 2016 17:00:25 +0000 (17:00 +0000)]
Disallow zvol-backed ZFS pools

Using zvols as backing devices for ZFS pools is fraught with panics and
deadlocks. For example, attempting to online a missing device in the
presence of a zvol can cause a panic when vdev_geom tastes the zvol.  Better
to completely disable vdev_geom from ever opening a zvol. The solution
relies on setting a thread-local variable during vdev_geom_open, and
returning EOPNOTSUPP during zvol_open if that thread-local variable is set.

Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent
was to prevent a recursive mutex acquisition panic. However, the new check
for the thread-local variable also fixes that problem.

Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this
function was set to panic. But it can occur that a device disappears during
tasting, and it causes no problems to ignore this departure.

Reviewed by: delphij
MFC after: 1 week
Relnotes: yes
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4986

8 years agoUpgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
des [Tue, 19 Jan 2016 16:18:26 +0000 (16:18 +0000)]
Upgrade to OpenSSH 6.7p1, retaining libwrap support (which has been removed
upstream) and a number of security fixes which we had already backported.

MFC after: 1 week

8 years agoAdd optimizing LRO wrapper:
hselasky [Tue, 19 Jan 2016 15:33:28 +0000 (15:33 +0000)]
Add optimizing LRO wrapper:

- Add optimizing LRO wrapper which pre-sorts all incoming packets
  according to the hash type and flowid. This prevents exhaustion of
  the LRO entries due to too many connections at the same time.
  Testing using a larger number of higher bandwidth TCP connections
  showed that the incoming ACK packet aggregation rate increased from
  ~1.3:1 to almost 3:1. Another test showed that for a number of TCP
  connections greater than 16 per hardware receive ring, where 8 TCP
  connections was the LRO active entry limit, there was a significant
  improvement in throughput due to being able to fully aggregate more
  than 8 TCP stream. For very few very high bandwidth TCP streams, the
  optimizing LRO wrapper will add CPU usage instead of reducing CPU
  usage. This is expected. Network drivers which want to use the
  optimizing LRO wrapper needs to call "tcp_lro_queue_mbuf()" instead
  of "tcp_lro_rx()" and "tcp_lro_flush_all()" instead of
  "tcp_lro_flush()". Further the LRO control structure must be
  initialized using "tcp_lro_init_args()" passing a non-zero number
  into the "lro_mbufs" argument.

- Make LRO statistics 64-bit. Previously 32-bit integers were used for
  statistics which can be prone to wrap-around. Fix this while at it
  and update all SYSCTL's which expose LRO statistics.

- Ensure all data is freed when destroying a LRO control structures,
  especially leftover LRO entries.

- Reduce number of memory allocations needed when setting up a LRO
  control structure by precomputing the total amount of memory needed.

- Add own memory allocation counter for LRO.

- Bump the FreeBSD version to force recompilation of all KLDs due to
  change of the LRO control structure size.

Sponsored by: Mellanox Technologies
Reviewed by: gallatin, sbruno, rrs, gnn, transport
Tested by: Netflix
Differential Revision: https://reviews.freebsd.org/D4914

8 years agoTest for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH
bapt [Tue, 19 Jan 2016 15:02:37 +0000 (15:02 +0000)]
Test for /etc/ssl/cert.pem existence to avoid masking SSL_CA_CERT_PATH

Prior to this patch, unless SSL_CA_CERT_FILE is set in the environment,
libfetch will set the CA file to "/usr/local/etc/cert.pem" if it exists,
and to "/etc/ssl/cert.pem" otherwise. This has the consequence of
masking SSL_CA_CERT_PATH, because OpenSSL will ignore the CA path if a CA
file is set but fails to load (see X509_STORE_load_locations()).

While here, fall back to OpenSSL defaults if neither SSL_CA_CERT_FILE nor
SSL_CA_CERT_PATH are set in the environment, and if neither of the
libfetch default CA files exists.

PR: 193871
Submitted by: John W. O'Brien <john@saltant.com>
Approved by: des
MFC after: 1 week

8 years agoAs previously threatened, remove the HPN patch from OpenSSH.
des [Tue, 19 Jan 2016 14:38:20 +0000 (14:38 +0000)]
As previously threatened, remove the HPN patch from OpenSSH.

8 years agoUse 'svn list -R' instead of find, and recognize comments in shell scripts
des [Tue, 19 Jan 2016 14:25:22 +0000 (14:25 +0000)]
Use 'svn list -R' instead of find, and recognize comments in shell scripts
and {ssh,sshd}_config.

8 years agoRecognize *roff comments.
des [Tue, 19 Jan 2016 13:15:57 +0000 (13:15 +0000)]
Recognize *roff comments.

8 years agoAdd "vidcontrol -i active", to print out active vty number,
trasz [Tue, 19 Jan 2016 13:09:20 +0000 (13:09 +0000)]
Add "vidcontrol -i active", to print out active vty number,
to be used with eg "vidcontrol -s".

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

8 years agoUpdate the pre- and post-merge scripts to work correctly after the recent
des [Tue, 19 Jan 2016 12:38:53 +0000 (12:38 +0000)]
Update the pre- and post-merge scripts to work correctly after the recent
cleanup.  A round-trip (./freebsd-pre-merge.sh ; ./freebsd-post-merge.sh)
now results in an unchanged working copy.

8 years agoFix an issue where the network adapter could be left in down state
hselasky [Tue, 19 Jan 2016 10:24:47 +0000 (10:24 +0000)]
Fix an issue where the network adapter could be left in down state
after changing the HW LRO sysctl when previously in up state.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4941

8 years agoAdd clarifying comment about CQE zipping.
hselasky [Tue, 19 Jan 2016 10:19:33 +0000 (10:19 +0000)]
Add clarifying comment about CQE zipping.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4940

8 years agoDeclare local variables at top of function.
hselasky [Tue, 19 Jan 2016 10:17:24 +0000 (10:17 +0000)]
Declare local variables at top of function.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4939

8 years agoAllow RX and TX pause frames to be set through ifconfig.
hselasky [Tue, 19 Jan 2016 10:10:02 +0000 (10:10 +0000)]
Allow RX and TX pause frames to be set through ifconfig.

Reviewed by: gnn
Sponsored by: Mellanox Technologies
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D4817

8 years agoAdjust i386 comment to match amd64 one after r294311.
kib [Tue, 19 Jan 2016 08:09:09 +0000 (08:09 +0000)]
Adjust i386 comment to match amd64 one after r294311.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoUse ANSI definitions. Wrap long line.
kib [Tue, 19 Jan 2016 08:08:08 +0000 (08:08 +0000)]
Use ANSI definitions.  Wrap long line.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoClear whole XMM register file instead of only XMM0. Also clear x87
kib [Tue, 19 Jan 2016 08:04:02 +0000 (08:04 +0000)]
Clear whole XMM register file instead of only XMM0.  Also clear x87
registers.  This brings amd64 on par with i386, providing consistent
initial FPU state.

Note that we do not clear any extended state, at least because kernel
does not understand extended state structure and consequences of zero
overwrite after fninit()/fpusave().

Submitted by: joss.upton@yahoo.com
PR: 206370
MFC after: 2 weeks

8 years agosfxge: improve error handling in ef10_ev_rx()
arybchik [Tue, 19 Jan 2016 06:07:39 +0000 (06:07 +0000)]
sfxge: improve error handling in ef10_ev_rx()

Ensure that checksum flags and L3/L4 fields are ignored
if lower level errors are reported in the event.

Remove checks for CRC0_ERR (bad iSCSI header CRC) and
CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
are not used by any existing code.

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

8 years agosfxge: select whether to read current or backup partition in Medford A/B scheme
arybchik [Tue, 19 Jan 2016 06:03:44 +0000 (06:03 +0000)]
sfxge: select whether to read current or backup partition in Medford A/B scheme

The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes.  This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

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

8 years agoRemove local override for .cpp.So rule
emaste [Tue, 19 Jan 2016 03:54:38 +0000 (03:54 +0000)]
Remove local override for .cpp.So rule

The standard bsd.lib.mk rule is suitable for libgcc_s's C++ source.

The local rule had the following non-functional argument differences
or additions:

1. -DSHARED (rather than -DPIC from bsd.lib.mk)

   The C++ sources don't have an #ifdef for either one.

2. -fexceptions

   This is enabled by default for C++ so does not need to be set
   explicitly.

3. -D__GLIBC__=3

   Not used by LLVM libunwind.

4. -DElfW=__ElfN

   LLVM libunwind provides its own definition.

PR: 206381
Differential Revision: The FreeBSD Foundation

8 years agoHide most of the PTE initialization and management.
jhibbits [Tue, 19 Jan 2016 03:07:25 +0000 (03:07 +0000)]
Hide most of the PTE initialization and management.

By confining the page table management to a handful of functions it'll be
easier to modify the page table scheme without affecting other functions.
This will be necessary when 64-bit support is added, and page tables become
much larger.

8 years agoAdd vrefl(), a locked variant of vref(9).
markj [Mon, 18 Jan 2016 22:21:46 +0000 (22:21 +0000)]
Add vrefl(), a locked variant of vref(9).

This API has no in-tree consumers at the moment but is useful to at least
one out-of-tree consumer, and naturally complements existing vnode refcount
functions (vholdl(9), vdropl(9)).

Obtained from: kib (sys/ portion)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4947
Differential Revision: https://reviews.freebsd.org/D4953

8 years agoImport misc.c,v 1.46 from OpenBSD (by espie@)
bapt [Mon, 18 Jan 2016 22:12:07 +0000 (22:12 +0000)]
Import misc.c,v 1.46 from OpenBSD (by espie@)

Yet another missed ferror call

8 years agoUpdate elftc version to 3272M, imported in r292120
emaste [Mon, 18 Jan 2016 21:53:39 +0000 (21:53 +0000)]
Update elftc version to 3272M, imported in r292120

8 years agoRestore ABI variants now that ldconfig groks -soft. In addition, as a
imp [Mon, 18 Jan 2016 21:40:20 +0000 (21:40 +0000)]
Restore ABI variants now that ldconfig groks -soft. In addition, as a
transition mechanism, if we don't have /usr/libsoft, assume that soft
float ABI binaries are the default, so treat them as default binaries.
When we've fully transitioned, it will make no sense to do this stat,
and it will be removed.