]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agodaemon(8): Add -t option to set process title
Conrad Meyer [Wed, 2 Mar 2016 19:10:39 +0000 (19:10 +0000)]
daemon(8): Add -t option to set process title

The default process title is taken from the argv[0] value (any
particular hardlink name).  Add a -t option to override the default.

PR: 205016
Submitted by: Yuri <yuri@rawbw.com>
No objection from: freebsd-current@
Sponsored by: EMC / Isilon Storage Division

8 years agoIf callout_stop_safe() noted that the callout is currently executing,
Konstantin Belousov [Wed, 2 Mar 2016 18:46:17 +0000 (18:46 +0000)]
If callout_stop_safe() noted that the callout is currently executing,
but next invocation is cancelled while migrating,
sleepq_check_timeout() needs to be informed that the callout is
stopped.  Otherwise the thread switches off CPU and never become
runnable, since running callout could have already raced with us,
while the migrating and cancelled callout could be one which is
expected to set TDP_TIMOFAIL flag for us.  This contradicts with the
expected behaviour of callout_stop() for other callers, which
e.g. decrement references from the callout callbacks.

Add a new flag CS_MIGRBLOCK requesting report of the situation as
'successfully stopped'.

Reviewed by: jhb (previous version)
Tested by: cognet, pho
PR: 200992
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D5221

8 years agoFix handling of DT_TEXTREL for an object with more than one read-only
Konstantin Belousov [Wed, 2 Mar 2016 16:36:24 +0000 (16:36 +0000)]
Fix handling of DT_TEXTREL for an object with more than one read-only
segment.  According to gABI spec, presence of the tag indicates that
dynamic linker must be prepared to handle relocations against any
read-only segment, not only the segment which we, somewhat arbitrary,
declared the text.

For each read-only segment, add write permission before relocs are
processed, and return to the mapping mode requested by the phdr, after
relocs are done.

Reported, tested, and reviewed by: emaste
PR: 207631
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAdd gem5 support, so we attach there as well.
Bjoern A. Zeeb [Wed, 2 Mar 2016 15:26:55 +0000 (15:26 +0000)]
Add gem5 support, so we attach there as well.

Fix the boundary limit to end at the end of the region and not one beyond (1).

Diagnosed by: andrew (1)
Reviewed by: andrew, br
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D5493

8 years agoForce re-routing PCI interrupts (this is for legacy INTx not MSI).
Bjoern A. Zeeb [Wed, 2 Mar 2016 15:20:42 +0000 (15:20 +0000)]
Force re-routing PCI interrupts (this is for legacy INTx not MSI).
Need this for gem5, but was not needed on real hadrware (yet) as it
was always MSI.

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

8 years agoThe cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S,
Andrew Turner [Wed, 2 Mar 2016 14:33:46 +0000 (14:33 +0000)]
The cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S,
only define it when building for ARMv5 or prior.

Sponsored by: ABT Systems Ltd

8 years agoSupport for Enhanced Allocation in PCI
Wojciech Macek [Wed, 2 Mar 2016 09:54:58 +0000 (09:54 +0000)]
Support for Enhanced Allocation in PCI

    On some platforms, BAR entries are hardcoded and must not be accessed
    using standard method. Add functionality to identify this situation
    and configure the bus based on Enhanced Allocation structure.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5242

8 years agoImprove ThunderX PEM driver to work on pass2 revision
Wojciech Macek [Wed, 2 Mar 2016 08:39:59 +0000 (08:39 +0000)]
Improve ThunderX PEM driver to work on pass2 revision

    Things changed:
    * do not allocate 4GB of SLI space, because it's the waste of
      system resources. Allocate only small portions when needed.
    * provide own implementation of activate_resource which performs
      address translation between PCI bus and host PA address space.
      This is temporary solution, should be replaced by bus_map_resource
      once implemented.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5294

8 years agohyperv/hn: Make # of rings configurable
Sepherosa Ziehau [Wed, 2 Mar 2016 05:24:55 +0000 (05:24 +0000)]
hyperv/hn: Make # of rings configurable

And since the host may not being able to allocate the # of rings
requested by us, save the # of rings allocated by the host in the
ring_inuse counters; use ring_inuse counters for run time operation.

This paves the way for the upcoming vRSS support.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoUse m_catpkt(9) to ensure that pkthdr fields are updated properly.
Mark Johnston [Wed, 2 Mar 2016 05:05:02 +0000 (05:05 +0000)]
Use m_catpkt(9) to ensure that pkthdr fields are updated properly.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoSet tres to NULL to avoid a double free if the m_pullup() below fails.
Mark Johnston [Wed, 2 Mar 2016 05:04:04 +0000 (05:04 +0000)]
Set tres to NULL to avoid a double free if the m_pullup() below fails.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoUse m_catpkt(9) to avoid a possible use-after-free in ieee80211_defrag().
Mark Johnston [Wed, 2 Mar 2016 05:01:58 +0000 (05:01 +0000)]
Use m_catpkt(9) to avoid a possible use-after-free in ieee80211_defrag().

m is not guaranteed to be valid after m_cat() returns. The effects of this
are most noticeable when INVARIANTS is enabled, since m's header length
field is given a value of 0xdeadc0de by the trash dtor.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoDocument m_catpkt(), and remove misinformation about m_cat(9).
Mark Johnston [Wed, 2 Mar 2016 04:58:51 +0000 (04:58 +0000)]
Document m_catpkt(), and remove misinformation about m_cat(9).

Since m_cat() may copy data from the second mbuf chain into the last mbuf
of the first chain, it may free the first mbuf of the second chain. Thus,
the second chain is not guaranteed to be valid after m_cat() returns.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoFix a typo that prevented pw(8) from setting a user's UID to 0.
Mark Johnston [Wed, 2 Mar 2016 04:56:36 +0000 (04:56 +0000)]
Fix a typo that prevented pw(8) from setting a user's UID to 0.

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

8 years agoRemove redundant NULL pointer comparison.
Cy Schubert [Wed, 2 Mar 2016 03:28:57 +0000 (03:28 +0000)]
Remove redundant NULL pointer comparison.

Reported  by: PVS-Studio (V595) in D5245
Differential Revision: D5245

8 years agoReplace some more default range checks with RMAN_IS_DEFAULT_RANGE().
Justin Hibbits [Wed, 2 Mar 2016 03:26:56 +0000 (03:26 +0000)]
Replace some more default range checks with RMAN_IS_DEFAULT_RANGE().

This is a follow-on to r295832.

8 years agohyperv/hn: Fix typo in comment
Sepherosa Ziehau [Wed, 2 Mar 2016 03:19:59 +0000 (03:19 +0000)]
hyperv/hn: Fix typo in comment

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Make read buffer per-channel
Sepherosa Ziehau [Wed, 2 Mar 2016 03:07:31 +0000 (03:07 +0000)]
hyperv/hn: Make read buffer per-channel

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reorganized by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoUse the m_extadd() function instead of deprecated MEXTADD().
Justin Hibbits [Wed, 2 Mar 2016 02:29:35 +0000 (02:29 +0000)]
Use the m_extadd() function instead of deprecated MEXTADD().

Suggested by: glebius

8 years agoRemove some debug printfs
Justin Hibbits [Wed, 2 Mar 2016 02:27:53 +0000 (02:27 +0000)]
Remove some debug printfs

8 years agohyperv/hn: Pass channel to hv_nv_on_receive_completion()
Sepherosa Ziehau [Wed, 2 Mar 2016 02:27:13 +0000 (02:27 +0000)]
hyperv/hn: Pass channel to hv_nv_on_receive_completion()

While I'm here, staticize this function.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Modified by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoFix regression in r296242 affecting several drivers. For EXT_NET_DRV,
Gleb Smirnoff [Wed, 2 Mar 2016 02:12:01 +0000 (02:12 +0000)]
Fix regression in r296242 affecting several drivers. For EXT_NET_DRV,
EXT_MOD_TYPE, EXT_DISPOSABLE types we should first execute the free
callback, then free the mbuf, otherwise we will derefernce memory that
was just freed.

Reported and tested: jhibbits

8 years agohyperv/chan: Factor out the vcpu setting
Sepherosa Ziehau [Wed, 2 Mar 2016 01:40:47 +0000 (01:40 +0000)]
hyperv/chan: Factor out the vcpu setting

And use it for cpu0 assignment; it does not sound right to assume that
cpu0 maps to vcpu0.  And this factored out function will be exposed to
drivers, if driver specific CPU binding is needed, e.g. hn(4).

Move default cpu select after saving channel offer message. This makes
sure that all useful information of the channel has been setup.

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

8 years agohyperv/chan: Function renaming; no functional change
Sepherosa Ziehau [Wed, 2 Mar 2016 01:33:30 +0000 (01:33 +0000)]
hyperv/chan: Function renaming; no functional change

The renamed function create a sysctl tree for channel, and many
non-statistics nodes exists, so don't claim it only adds sysctl
nodes for statistics.

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

8 years agohyperv/chan: Add sysctl node to check whether monitor is allocated or not
Sepherosa Ziehau [Wed, 2 Mar 2016 01:26:05 +0000 (01:26 +0000)]
hyperv/chan: Add sysctl node to check whether monitor is allocated or not

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

8 years agoFix 2 bugs in the mpc85xx local bus controller driver.
Justin Hibbits [Wed, 2 Mar 2016 00:18:05 +0000 (00:18 +0000)]
Fix 2 bugs in the mpc85xx local bus controller driver.

1) Include opt_platform.h to get QORIQ_DPAA.  Otherwise the definition of
OCP85XX_TGTIF_LBC is incorrect.
2) The child resources are already allocated, just activate them, instead of
incorrectly remapping the memory regions (resource lists for lbc consist of the
virtual address of the child's resources, not the physical address).

Sponsored by: Alex Perez/Inertial Computing

8 years agoRemove filemon->lock wrappers.
Bryan Drewery [Wed, 2 Mar 2016 00:13:13 +0000 (00:13 +0000)]
Remove filemon->lock wrappers.

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

8 years agoCorrect a comment.
Bryan Drewery [Tue, 1 Mar 2016 23:58:53 +0000 (23:58 +0000)]
Correct a comment.

8 years agoAdd support for Allwinner A31/A31s EHCI controller and USB PHY.
Jared McNeill [Tue, 1 Mar 2016 22:54:30 +0000 (22:54 +0000)]
Add support for Allwinner A31/A31s EHCI controller and USB PHY.

Reviewed by: andrew, Emmanuel Vadot <manu@bidouilliste.com>
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D5467

8 years agoUse SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.
John Baldwin [Tue, 1 Mar 2016 22:51:44 +0000 (22:51 +0000)]
Use SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.

Reviewed by: kib
MFC after: 1 month
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D5516

8 years agoCCACHE_BUILD+META_MODE: Lookup and canonicalize the default CCACHE_DIR.
Bryan Drewery [Tue, 1 Mar 2016 22:25:54 +0000 (22:25 +0000)]
CCACHE_BUILD+META_MODE: Lookup and canonicalize the default CCACHE_DIR.

This is done to prevent not having CCACHE_DIR causing meta mode with filemon to
see stat changes in the ccache dir and cause rebuilds.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Fix mapper files building during dirdeps.
Bryan Drewery [Tue, 1 Mar 2016 22:25:49 +0000 (22:25 +0000)]
DIRDEPS_BUILD: Fix mapper files building during dirdeps.

Sponsored by: EMC / Isilon Storage Division

8 years ago- update portsnap(8) to direct users to pkg-version
Jason Helfman [Tue, 1 Mar 2016 22:13:20 +0000 (22:13 +0000)]
- update portsnap(8) to direct users to pkg-version

PR: 202971
Submitted by: adamw@FreeBSD.org
Reviewed by: bdrewery@
Approved by: wblock@
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5429

8 years agoMerge OpenSSL 1.0.2g.
Jung-uk Kim [Tue, 1 Mar 2016 22:08:28 +0000 (22:08 +0000)]
Merge OpenSSL 1.0.2g.

Relnotes: yes

8 years agombtowc(3): set errno to EILSEQ if an incomplete character is passed.
Pedro F. Giffuni [Tue, 1 Mar 2016 19:15:34 +0000 (19:15 +0000)]
mbtowc(3): set errno to EILSEQ if an incomplete character is passed.

According to POSIX, The mbtowc() function shall fail if:
[EILSEQ] An invalid character sequence is detected.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D5496

Obtained from: OpenBSD (Ingo Schwarze)
MFC after: 1 month

8 years agoRefactor the AIO subsystem to permit file-type-specific handling and
John Baldwin [Tue, 1 Mar 2016 18:12:14 +0000 (18:12 +0000)]
Refactor the AIO subsystem to permit file-type-specific handling and
improve cancellation robustness.

Introduce a new file operation, fo_aio_queue, which is responsible for
queueing and completing an asynchronous I/O request for a given file.
The AIO subystem now exports library of routines to manipulate AIO
requests as well as the ability to run a handler function in the
"default" pool of AIO daemons to service a request.

A default implementation for file types which do not include an
fo_aio_queue method queues requests to the "default" pool invoking the
fo_read or fo_write methods as before.

The AIO subsystem permits file types to install a private "cancel"
routine when a request is queued to permit safe dequeueing and cleanup
of cancelled requests.

Sockets now use their own pool of AIO daemons and service per-socket
requests in FIFO order.  Socket requests will not block indefinitely
permitting timely cancellation of all requests.

Due to the now-tight coupling of the AIO subsystem with file types,
the AIO subsystem is now a standard part of all kernels.  The VFS_AIO
kernel option and aio.ko module are gone.

Many file types may block indefinitely in their fo_read or fo_write
callbacks resulting in a hung AIO daemon.  This can result in hung
user processes (when processes attempt to cancel all outstanding
requests during exit) or a hung system.  To protect against this, AIO
requests are only permitted for known "safe" files by default.  AIO
requests for all file types can be enabled by setting the new
vfs.aio.enable_usafe sysctl to a non-zero value.  The AIO tests have
been updated to skip operations on unsafe file types if the sysctl is
zero.

Currently, AIO requests on sockets and raw disks are considered safe
and are enabled by default.  aio_mlock() is also enabled by default.

Reviewed by: cem, jilles
Discussed with: kib (earlier version)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5289

8 years agoImport OpenSSL 1.0.2g.
Jung-uk Kim [Tue, 1 Mar 2016 17:57:01 +0000 (17:57 +0000)]
Import OpenSSL 1.0.2g.

8 years agoRemove taskqueue_enqueue_fast().
John Baldwin [Tue, 1 Mar 2016 17:47:32 +0000 (17:47 +0000)]
Remove taskqueue_enqueue_fast().

taskqueue_enqueue() was changed to support both fast and non-fast
taskqueues 10 years ago in r154167.  It has been a compat shim ever
since.  It's time for the compat shim to go.

Submitted by: Howard Su <howard0su@gmail.com>
Reviewed by: sephe
Differential Revision: https://reviews.freebsd.org/D5131

8 years agoRestore configuration for RISC-V.
Ruslan Bukin [Tue, 1 Mar 2016 17:43:06 +0000 (17:43 +0000)]
Restore configuration for RISC-V.

8 years agoOFW_GPIOBUS: Add utility functions for easier handling of OFW GPIO pins.
Michal Meloun [Tue, 1 Mar 2016 16:10:15 +0000 (16:10 +0000)]
OFW_GPIOBUS: Add utility functions for easier handling of OFW GPIO pins.

Reviewed by: ian, loos (paritaly)

8 years agoAdd two comments explaining the fine points of the hash
Konstantin Belousov [Tue, 1 Mar 2016 15:21:01 +0000 (15:21 +0000)]
Add two comments explaining the fine points of the hash
implementation.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D5490

8 years agoRegenerate src.conf.5 after r296193 and r296264
Ed Maste [Tue, 1 Mar 2016 14:30:35 +0000 (14:30 +0000)]
Regenerate src.conf.5 after r296193 and r296264

8 years agoGet memory ranges from FDT if no EFI API is available on ARM64
Wojciech Macek [Tue, 1 Mar 2016 12:50:24 +0000 (12:50 +0000)]
Get memory ranges from FDT if no EFI API is available on ARM64

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           andrew, wma
Differential revision: https://reviews.freebsd.org/D5408

8 years agoMake the memory size returned from fdt_get_mem_regions a 64-bit type. This
Andrew Turner [Tue, 1 Mar 2016 11:39:07 +0000 (11:39 +0000)]
Make the memory size returned from fdt_get_mem_regions a 64-bit type. This
is the physical memory size so may be larger than a u_long can hold, e.g.
on ARM with LPAE we could see an address space of up to 40 bits. On ARM
u_long is only 32 bits so the memory size will be truncated, possibly to
zero.

Reported by: bz
Sponsored by: ABT Systems Ltd

8 years agoFix section numbers for autofs(5), kbdcontrol(1), vidcontrol(1), quota(1),
Edward Tomasz Napierala [Tue, 1 Mar 2016 11:36:10 +0000 (11:36 +0000)]
Fix section numbers for autofs(5), kbdcontrol(1), vidcontrol(1), quota(1),
and telnet(1) in the right place.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoConnect pmc.haswellxeon(3) to the build; looks like it was missed in r279829.
Edward Tomasz Napierala [Tue, 1 Mar 2016 11:34:44 +0000 (11:34 +0000)]
Connect pmc.haswellxeon(3) to the build; looks like it was missed in r279829.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove an alternative way for dealing with root interrupt controller
Svatopluk Kraus [Tue, 1 Mar 2016 11:27:58 +0000 (11:27 +0000)]
Remove an alternative way for dealing with root interrupt controller
which is not complete. Likely, it was forgotten and not removed before
committing.

8 years agoMark other parts of interrupt framework as INTR_SOLO option specific.
Svatopluk Kraus [Tue, 1 Mar 2016 10:57:29 +0000 (10:57 +0000)]
Mark other parts of interrupt framework as INTR_SOLO option specific.

Note that isrc_arg member of struct intr_irqsrc is used only for
INTR_SOLO and IPI filter. This should be remembered if IPI filters
and their arguments will be stored on another place.

This option could be unusable very soon, if interrupt controllers
implementations will not be implemented considering it.

8 years agoStop setting the memory size in the arm EFI and FDT code, we don't use it.
Andrew Turner [Tue, 1 Mar 2016 09:51:36 +0000 (09:51 +0000)]
Stop setting the memory size in the arm EFI and FDT code, we don't use it.

Sponsored by: ABT Systems Ltd

8 years agoMake the fdt_get_mem_regions memsize argument optional. It's only used in
Andrew Turner [Tue, 1 Mar 2016 09:45:27 +0000 (09:45 +0000)]
Make the fdt_get_mem_regions memsize argument optional. It's only used in
by a few callers.

Sponsored by: ABT Systems Ltd

8 years agoEnable SRE_EL2 on ARM64
Wojciech Macek [Tue, 1 Mar 2016 08:15:00 +0000 (08:15 +0000)]
Enable SRE_EL2 on ARM64

Enable system register access for EL2. Alpine-V2 is
the first device requiring this to be enabled.
It is also in-sync with Linux initialization code,
and compatible with Alpine-V2 uboot requirements.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           wma
Differential revision: https://reviews.freebsd.org/D5394

8 years agoAdd uart 8250 device to GENERIC arm64 configuration
Wojciech Macek [Tue, 1 Mar 2016 07:06:36 +0000 (07:06 +0000)]
Add uart 8250 device to GENERIC arm64 configuration

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           zbb, wma
Differential revision: https://reviews.freebsd.org/D5406

8 years agonet80211: eliminate copy-paste nearby ieee80211_check_rxseq()
Andriy Voskoboinyk [Tue, 1 Mar 2016 06:47:21 +0000 (06:47 +0000)]
net80211: eliminate copy-paste nearby ieee80211_check_rxseq()

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

8 years agohyperv/channel: Nuke useless stack variable
Sepherosa Ziehau [Tue, 1 Mar 2016 05:15:26 +0000 (05:15 +0000)]
hyperv/channel: Nuke useless stack variable

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

8 years agohyperv/hn: Set hash per-packet-info for each packet transmission
Sepherosa Ziehau [Tue, 1 Mar 2016 04:59:18 +0000 (04:59 +0000)]
hyperv/hn: Set hash per-packet-info for each packet transmission

So that the host could dispatch the TX done back to this TX ring's
owner channel

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

8 years agoAdd another compatibility check for QorIQ GPIO driver.
Justin Hibbits [Tue, 1 Mar 2016 03:41:48 +0000 (03:41 +0000)]
Add another compatibility check for QorIQ GPIO driver.

Some MPC85xx GPIO controllers are compatible with QorIQ.

It may make more sense in the future to rename this and mpc85xx_gpio.c, as
mpc85xx_gpio.c appears to only be compatible with a few mpc85xx SoCs.  All other
MPC85xx SoCs use the same controller as QorIQ.

8 years agoCorrect the memory rman ranges to be to BUS_SPACE_MAXADDR
Justin Hibbits [Tue, 1 Mar 2016 02:59:06 +0000 (02:59 +0000)]
Correct the memory rman ranges to be to BUS_SPACE_MAXADDR

Summary:
As part of the migration of rman_res_t to be typed to uintmax_t, memory ranges
must be clamped appropriately for the bus, to prevent completely bogus addresses
from being used.

This is extracted from D4544.

Reviewed By: cem
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5134

8 years agocxgbe(4): Update T5 and T4 firmwares to 1.15.28.0.
Navdeep Parhar [Tue, 1 Mar 2016 02:36:50 +0000 (02:36 +0000)]
cxgbe(4): Update T5 and T4 firmwares to 1.15.28.0.

These firmwares were obtained from the beta "Chelsio T5/T4 Unified Wire
v2.12.0.2 for Linux" release.  Changes since last release are listed in the
"Release Notes" accompanying the beta release and are copy-pasted here as well.

The plan is to have only GA'd firmwares in any -STABLE FreeBSD branch so I'll
MFC this (after 2 months) only if it ends up in a GA release.

================================================================================
================================================================================

22.1. T5 Firmware
+++++++++++++++++++++++++++++++++

Version : 1.15.28.0
Date    : 02/29/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where the default ingress
   queue was ignored.
 - Fixed an issue where adapter failed to load fw by adjusting DRAM frequency.
 - Fixed an issue in watchdog which was causing VM bring-up failure after
   reboot.
 - Fixed 40G link failures with some switches when auto-negotiation enabled.
 - Fixed to improve on link bring-up time.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where bogus d3hot bits were set causing traffic stall.
 - Fixed an issue where sometimes adapter was not seen after reboot.
 - Fixed an issue where iWARP was crashing in conjunction with traffic
   management.
 - Fixed an issue where link failed to come up after removing twinax cable and
   inserting optical module.

OFLD
 - Fixed a potential iSCSI data corruption issue by disabling RxFragEn flag.

FOiSCSI
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP was not been provisioned yet and driver tried to
   use given inerface.

ENHANCEMENTS
------------

BASE:
 - Added new interface to program DCA settings in SGE contexts; allow 32-byte
   IQE size
 - Added PTP interface fw_ptp_ts to support PTP Frequeny and Offset adjustment.
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

OFLD:
 - WR opcode is returned to host in cqe error response.

================================================================================
================================================================================

22.2. T4 Firmware
+++++++++++++++++

Version : 1.15.28.0
Date    : 02/29/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where default ingress queue
   was ignored.
 - Fixed an issue in watchdog which was causing VM bring-up failure after
   reboot.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where iWARP was crashing in conjunction with traffic
   management.

FOiSCSI:
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP had not been provisioned yet and driver tried to
   use given inerface.

ENHANCEMENTS
------------

BASE:
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

================================================================================

Obtained from: Chelsio Communications
MFC after: 2 months
Sponsored by: Chelsio Communications

8 years agoAdd VM_MEMATTR_CACHEABLE support for AIM, for parity with Book-E.
Justin Hibbits [Tue, 1 Mar 2016 00:50:39 +0000 (00:50 +0000)]
Add VM_MEMATTR_CACHEABLE support for AIM, for parity with Book-E.

Not used right now, but may be in the future anyway.

8 years agoRemove UMA_ZONE_REFCNT feature, now unused.
Gleb Smirnoff [Tue, 1 Mar 2016 00:33:32 +0000 (00:33 +0000)]
Remove UMA_ZONE_REFCNT feature, now unused.

Blessed by: jeff

8 years agoNew way to manage reference counting of mbuf external storage.
Gleb Smirnoff [Tue, 1 Mar 2016 00:17:14 +0000 (00:17 +0000)]
New way to manage reference counting of mbuf external storage.

The m_ext.ext_cnt pointer becomes a union. It can now hold the refcount
value itself. To tell that m_ext.ext_flags flag EXT_FLAG_EMBREF is used.
The first mbuf to attach a cluster stores the refcount. The further mbufs
to reference the cluster point at refcount in the first mbuf. The first
mbuf is freed only when the last reference is freed.

The benefit over refcounts stored in separate slabs is that now refcounts
of different, unrelated mbufs do not share a cache line.

For EXT_EXTREF mbufs the zone_ext_refcnt is no longer needed, and m_extadd()
becomes void, making widely used M_EXTADD macro safe.

For EXT_SFBUF mbufs the sf_ext_ref() is removed, which was an optimization
exactly against the cache aliasing problem with regular refcounting.

Discussed with: rrs, rwatson, gnn, hiren, sbruno, np
Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D5396
Sponsored by: Netflix

8 years agoFix !IEEE80211_DEBUG build.
Gleb Smirnoff [Mon, 29 Feb 2016 23:09:31 +0000 (23:09 +0000)]
Fix !IEEE80211_DEBUG build.

8 years agoMerge byacc 20150711.
Jung-uk Kim [Mon, 29 Feb 2016 21:39:00 +0000 (21:39 +0000)]
Merge byacc 20150711.

8 years agonet80211: do not enforce promiscuous mode for AP scan
Andriy Voskoboinyk [Mon, 29 Feb 2016 21:17:39 +0000 (21:17 +0000)]
net80211: do not enforce promiscuous mode for AP scan

Drivers should set their own filters via ic_scan_start()/ic_scan_end()
callbacks; and we don't need frames other than beacons or probe responses.

(Note: this was a noop since r287197 due to promiscuous mode with bridge
workaround)

Tested with Intel 3945BG, RTL8188EU and WUSB54GC in HOSTAP mode.

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

8 years agoFAST_DEPEND: Prefer .OBJDIR depend files.
Bryan Drewery [Mon, 29 Feb 2016 21:10:47 +0000 (21:10 +0000)]
FAST_DEPEND: Prefer .OBJDIR depend files.

Sponsored by: EMC / Isilon Storage Division

8 years agonet80211: fix scanning after D5145 (PR 197498 related)
Andriy Voskoboinyk [Mon, 29 Feb 2016 21:09:09 +0000 (21:09 +0000)]
net80211: fix scanning after D5145 (PR 197498 related)

- In case, when we are doing <smth> -> INIT (FEXT_REINIT) -> <smth2>
state transition, cancel_scan() may be called in the first transition.
Reenqueue second state transition, so things will be executed in order.
- Discard any AUTH+ state transition request when INIT -> SCAN
transition is not done.
- Allow to track discarded state transitions via 'state' debugging
category.

Tested with:
 * RTL8188EU, HOSTAP mode.
 * RTL8188CUS, STA mode.
 * Intel 3945BG, IBSS and STA modes.

PR: 197498
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5482

8 years agoFix some whitespace nits in cxgbetool.c. No functional change.
Navdeep Parhar [Mon, 29 Feb 2016 21:04:06 +0000 (21:04 +0000)]
Fix some whitespace nits in cxgbetool.c.  No functional change.

8 years agonet80211: cleanup ieee80211_scan_sw.c
Andriy Voskoboinyk [Mon, 29 Feb 2016 21:03:54 +0000 (21:03 +0000)]
net80211: cleanup ieee80211_scan_sw.c

Make it look more consistently.
No functional changes.

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

8 years agonet80211: refactor scan_signal()
Andriy Voskoboinyk [Mon, 29 Feb 2016 21:00:10 +0000 (21:00 +0000)]
net80211: refactor scan_signal()

- Pass scan state and additional internal flags as a parameters.
- Add locked version.

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, STA mode.

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

8 years agonet80211: wakeup scan_start() task when null data frame was actually
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:56:02 +0000 (20:56 +0000)]
net80211: wakeup scan_start() task when null data frame was actually
transmitted

- Use M_TXCB mechanism to report about null data frame transmission.
- Increase timeout from 1 to 10 ms (the previous one may be not enough
for non-empty queue).

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188CUS, STA mode.

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

8 years agonet80211: split scan_task() (#3) (into scan_start() and
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:53:27 +0000 (20:53 +0000)]
net80211: split scan_task() (#3) (into scan_start() and
scan_curchan_task() functions)

(This part should fix the problem, described in
https://lists.freebsd.org/pipermail/freebsd-wireless/2016-January/006420.html)

- Rename ss_scan_task into ss_scan_start (better describes it's
current purpose)
- Utilize taskqueue_*_timeout() functions instead of current mechanism:
 * reschedule scan_curchan_task() via taskqueue_enqueue_timeout()
for every 'maxdwell' msecs (will replace infinite loop + sleeping
for 'maxdwell' period via cv_wait());
 * rerun the task immediately when an external event occurs
(instead of waking it up via cv_signal())

Also, use mtx_sleep() to wait for null frame transmission
(allows to drop conditional variable).

Tested with:
 * Intel 3945BG, STA mode;
 * RTL8188EU, STA mode.

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

8 years agonet80211: split scan_task() (#2) (add scan_end() function)
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:47:07 +0000 (20:47 +0000)]
net80211: split scan_task() (#2) (add scan_end() function)

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, IBSS mode.

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

8 years agonet80211: split scan_task() (#1) (replace 'done' label with scan_done()
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:44:59 +0000 (20:44 +0000)]
net80211: split scan_task() (#1) (replace 'done' label with scan_done()
function)

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, IBSS mode.

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

8 years agonet80211: utilize ss_scanend variable from scan_state structure
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:41:10 +0000 (20:41 +0000)]
net80211: utilize ss_scanend variable from scan_state structure

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

8 years agonet80211: reduce code verbosity in scan_task() (ieee80211_scan_sw.c)
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:39:04 +0000 (20:39 +0000)]
net80211: reduce code verbosity in scan_task() (ieee80211_scan_sw.c)

Add local *ss_priv variable (no functional changes)

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

8 years agonet80211: reduce code duplication between ieee80211_swscan_cancel_scan()
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:36:00 +0000 (20:36 +0000)]
net80211: reduce code duplication between ieee80211_swscan_cancel_scan()
and ieee80211_swscan_cancel_anyscan()

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, HOSTAP mode.

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

8 years agonetwork.subr: avoid unnecessary reinitialization
Andriy Voskoboinyk [Mon, 29 Feb 2016 20:21:54 +0000 (20:21 +0000)]
network.subr: avoid unnecessary reinitialization

Do not start interface when wpa_supplicant or hostapd is used;
they will restart it anyway

Tested with:
 * Intel 3945BG, STA mode (wpa_supplicant)
 * RTL8188EU, HOSTAP mode (hostapd)

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

8 years agoImport byacc 20150711.
Jung-uk Kim [Mon, 29 Feb 2016 19:40:54 +0000 (19:40 +0000)]
Import byacc 20150711.

8 years agoImport byacc 20141128.
Jung-uk Kim [Mon, 29 Feb 2016 19:37:12 +0000 (19:37 +0000)]
Import byacc 20141128.

8 years agoUpdate jemalloc to 4.1.0.
Jason Evans [Mon, 29 Feb 2016 19:10:32 +0000 (19:10 +0000)]
Update jemalloc to 4.1.0.

Add missing Symbol.map entry for __aligned_alloc.

Add weak-->strong symbol binding for
{malloc_stats_print,mallctl,mallctlnametomib,mallctlbymib} -->
{__malloc_stats_print,__mallctl,__mallctlnametomib,__mallctlbymib}.  These
bindings complete the set necessary to allow applications to replace all
malloc-related symbols.

8 years agoRemove uudecode make rule for vt fonts
Ed Maste [Mon, 29 Feb 2016 18:35:16 +0000 (18:35 +0000)]
Remove uudecode make rule for vt fonts

vt(4) fonts are provided in either .bdf or .hex form, and the binary
.fnt file is generated by vtfontcvt at build time.

8 years agoEnable NO_ make variable deprecation warning
Ed Maste [Mon, 29 Feb 2016 17:57:11 +0000 (17:57 +0000)]
Enable NO_ make variable deprecation warning

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

8 years agouserboot: use MK_CTF=no to disable CTF
Ed Maste [Mon, 29 Feb 2016 17:54:55 +0000 (17:54 +0000)]
userboot: use MK_CTF=no to disable CTF

The NO_ form (e.g. NO_CTF) is deprecated.

8 years agoFix typo.
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:40:37 +0000 (17:40 +0000)]
Fix typo.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years ago{kbdcontrol,vidcontrol,quota,telnet}(8) -> {kbdcontrol,vidcontrol,quota,telnet}(1)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:40:02 +0000 (17:40 +0000)]
{kbdcontrol,vidcontrol,quota,telnet}(8) -> {kbdcontrol,vidcontrol,quota,telnet}(1)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoioctl(8) -> ioctl(2)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:37:35 +0000 (17:37 +0000)]
ioctl(8) -> ioctl(2)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agokbdmux(8) -> kbdmux(4)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:36:00 +0000 (17:36 +0000)]
kbdmux(8) -> kbdmux(4)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoerrno(3) -> errno(2)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:34:54 +0000 (17:34 +0000)]
errno(3) -> errno(2)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agojls(1) -> jls(8)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:30:34 +0000 (17:30 +0000)]
jls(1) -> jls(8)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agosha256(8) -> sha256(1)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:29:34 +0000 (17:29 +0000)]
sha256(8) -> sha256(1)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agocarp(8) -> carp(4)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:28:05 +0000 (17:28 +0000)]
carp(8) -> carp(4)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoddb(9) -> ddb(4)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:26:41 +0000 (17:26 +0000)]
ddb(9) -> ddb(4)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoeventtimers(7) -> eventtimers(4)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:26:05 +0000 (17:26 +0000)]
eventtimers(7) -> eventtimers(4)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix typo.
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:25:13 +0000 (17:25 +0000)]
Fix typo.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agotzsetup(1) -> tzsetup(8)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:24:34 +0000 (17:24 +0000)]
tzsetup(1) -> tzsetup(8)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agokenv(8) -> kenv(1)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:22:34 +0000 (17:22 +0000)]
kenv(8) -> kenv(1)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix typo.
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:20:37 +0000 (17:20 +0000)]
Fix typo.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agosysconf(2) -> sysconf(3)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:20:04 +0000 (17:20 +0000)]
sysconf(2) -> sysconf(3)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agosendmsg(3) -> sendmsg(2)
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:19:15 +0000 (17:19 +0000)]
sendmsg(3) -> sendmsg(2)

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agodump(1) -> dump(8).
Edward Tomasz Napierala [Mon, 29 Feb 2016 17:17:10 +0000 (17:17 +0000)]
dump(1) -> dump(8).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation