]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoCreate a new PSCI error code and use it to signal that starting the CPU is
Andrew Turner [Tue, 25 Oct 2016 14:18:27 +0000 (14:18 +0000)]
Create a new PSCI error code and use it to signal that starting the CPU is
impossible as the PSCI firmware is missing.

Sponsored by: ABT Systmes Ltd

7 years agoImport the Cortex String memcpy and memmove into the kernel. On ThunderX
Andrew Turner [Tue, 25 Oct 2016 14:04:35 +0000 (14:04 +0000)]
Import the Cortex String memcpy and memmove into the kernel. On ThunderX
these show a 9-10% reduction in user and system time for a buildworld -j48.

Obtained from: ABT Systems Ltd
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agoFix the build on both arm64 and when WITHOUT_FORTH is defined.
Andrew Turner [Tue, 25 Oct 2016 14:01:13 +0000 (14:01 +0000)]
Fix the build on both arm64 and when WITHOUT_FORTH is defined.

 * On arm64 we need to use the ${MACHINE_CPUARCH} subdirectory.
 * env.c is only needed when using forth so only build it there.

Sponsored by: ABT Systems Ltd

7 years agoUpdate the armv6 tlb handling functions to detect if it is running on
Andrew Turner [Tue, 25 Oct 2016 13:45:59 +0000 (13:45 +0000)]
Update the armv6 tlb handling functions to detect if it is running on
hardware that supports the mp extensions. If so it should use the broadcast
tlb invalidate instructions as other CPUs or devices may need to know about
the invalidation.

To simplify the code have the compiler optimise out the else case when not
builing for Cortex-A8.

Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D8092

7 years agofix up r307903, use correct max address definition
Andriy Gapon [Tue, 25 Oct 2016 10:59:21 +0000 (10:59 +0000)]
fix up r307903, use correct max address definition

MFC after: 1 week
X-MFC with: r307903

7 years agovmm/svm: iopm_bitmap and msr_bitmap must be contiguous in physical memory
Andriy Gapon [Tue, 25 Oct 2016 10:34:14 +0000 (10:34 +0000)]
vmm/svm: iopm_bitmap and msr_bitmap must be contiguous in physical memory

To achieve that the whole svm_softc is allocated with contigmalloc now.
It would be more effient to de-embed those arrays and allocate only them
with contigmalloc.

Previously, if malloc(9) used non-contiguous pages for the arrays, then
random bits in physical pages next to the first page would be used to
determine permissions for I/O port and MSR accesses.  That could result
in a guest dangerously modifying the host hardware configuration.

One example is that sometimes NMI watchdog driver in a Linux guest
would be able to configure a performance counter on a host system.
The counter would generate an interrupt and if hwpmc(4) driver is loaded
on the host, then the interrupt would be delivered as an NMI.

Discussed with: jhb
Reviewed by: grehan
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8321

7 years agoMake the USB attach strings in dmesg include product name.
Edward Tomasz Napierala [Tue, 25 Oct 2016 07:48:19 +0000 (07:48 +0000)]
Make the USB attach strings in dmesg include product name.

Note to self: MFC this to 9 and 8.

Reviewed by: hselasky@, imp@
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8259

7 years agoFreeBSD tcp stack used to inform respective congestion control module about the
Hiren Panchasara [Tue, 25 Oct 2016 05:45:47 +0000 (05:45 +0000)]
FreeBSD tcp stack used to inform respective congestion control module about the
loss event but not use or obay the recommendations i.e. values set by it in some
cases.

Here is an attempt to solve that confusion by following relevant RFCs/drafts.
Stack only sets congestion window/slow start threshold values when there is no
CC module availalbe to take that action. All CC modules are inspected and
updated when needed to take appropriate action on loss.

tcp_stacks/fastpath module has been updated to adapt these changes.

Note: Probably, the most significant change would be to not bring congestion
window down to 1MSS on a loss signaled by 3-duplicate acks and letting
respective CC decide that value.

In collaboration with: Matt Macy <mmacy at nextbsd dot org>
Discussed on: transport@ mailing list
Reviewed by: jtl
MFC after: 1 month
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D8225

7 years agoUndo r307899. It needs a bit more work and proper commit log.
Hiren Panchasara [Tue, 25 Oct 2016 05:07:51 +0000 (05:07 +0000)]
Undo r307899. It needs a bit more work and proper commit log.

7 years agoIn Collaboration with: Matt Macy <mmacy at nextbsd dot com>
Hiren Panchasara [Tue, 25 Oct 2016 05:03:33 +0000 (05:03 +0000)]
In Collaboration with:     Matt Macy <mmacy at nextbsd dot com>
Reviewed by:     jtl
Sponsored by:     Limelight Networks
Differential Revision:     https://reviews.freebsd.org/D8225

7 years agoUse proper if_getdrvflags() API.
Bryan Drewery [Tue, 25 Oct 2016 03:55:56 +0000 (03:55 +0000)]
Use proper if_getdrvflags() API.

This is a NOP.

Sponsored by: Dell EMC Isilon

7 years agohyperv/hn: Set baudrate properly
Sepherosa Ziehau [Tue, 25 Oct 2016 01:41:39 +0000 (01:41 +0000)]
hyperv/hn: Set baudrate properly

PR: 208931
Submitted by: Eugene Grosbein <ports grosbein net>
Reported by: Eugene Grosbein <ports grosbein net>
MFC after: 1 week
Sponsored by: Microsoft

7 years agoFix a typo which broke the build for powerpc.
Justin Hibbits [Tue, 25 Oct 2016 01:32:35 +0000 (01:32 +0000)]
Fix a typo which broke the build for powerpc.

It's spelled LIBC_SRCTOP not LIBC_SRC.

Pointy-hat to: jhibbits
Reported by: kib

7 years agoFix the man page to reflect the change done by r307890 to mountd.c
Rick Macklem [Tue, 25 Oct 2016 00:59:23 +0000 (00:59 +0000)]
Fix the man page to reflect the change done by r307890 to mountd.c
so that the "-n" option uses the sysctl for the new NFS server.
This is a content change.

PR: 213450
Submitted by: rs@bytecamp.net
MFC after: 2 weeks

7 years agomountd(8) was erroneously setting the sysctl for the old NFS server
Rick Macklem [Tue, 25 Oct 2016 00:52:42 +0000 (00:52 +0000)]
mountd(8) was erroneously setting the sysctl for the old NFS server
when the new/default NFS server was running, for the "-n" option.

This patch fixes the problem for head and stable/11. For stable/10 the
patch will need to be modified when MFC'd, since the stable/10 mountd.c
handles both old and new NFS servers.
Since the new NFS server uses vfs.nfsd.nfs_privport == 0 by default,
there wouldn't have been many users affected by the code not setting
it to 0 when the "-n" option was specified.

PR: 213450
Submitted by: rs@bytecamp.net
MFC after: 2 weeks

7 years agoEnable driver for SY8106A Buck Regulator.
Jared McNeill [Mon, 24 Oct 2016 22:35:45 +0000 (22:35 +0000)]
Enable driver for SY8106A Buck Regulator.

7 years agoDefer cpufreq updates from intr handler to the taskqueue_thread queue.
Jared McNeill [Mon, 24 Oct 2016 22:35:12 +0000 (22:35 +0000)]
Defer cpufreq updates from intr handler to the taskqueue_thread queue.

7 years agoFix ip_output() on point-to-point links
Ryan Stone [Mon, 24 Oct 2016 22:11:33 +0000 (22:11 +0000)]
Fix ip_output() on point-to-point links

In r304435, ip_output() was changed to use the result of the route
lookup to decide whether the outgoing packet was a broadcast or
not.  This introduced a regression on interfaces where
IFF_BROADCAST was not set (e.g. point-to-point links), as the
algorithm could incorrectly treat the destination address as a
broadcast address, and ip_output() would subsequently drop the
packet as broadcasting on a non-IFF_BROADCAST interface is not
allowed.

Differential Revision: https://reviews.freebsd.org/D8303
Reviewed by: jtl
Reported by: ambrisko
MFC after: 2 weeks
X-MFC-With: r304435
Sponsored by: Dell EMC Isilon

7 years agoBelatedly revert r303119, which was determined to not be
Glen Barber [Mon, 24 Oct 2016 21:16:21 +0000 (21:16 +0000)]
Belatedly revert r303119, which was determined to not be
needed.

Sponsored by: The FreeBSD Foundation

7 years agoAdd needed cpu-supply property for cpufreq.
Emmanuel Vadot [Mon, 24 Oct 2016 21:09:48 +0000 (21:09 +0000)]
Add needed cpu-supply property for cpufreq.

Patch is merged upstream, in the meantime add it in our DTS.

7 years agoFix a regression introduced in SVN r256678 that breaks USM header parsing
Shteryana Shopova [Mon, 24 Oct 2016 21:05:23 +0000 (21:05 +0000)]
Fix a regression introduced in SVN r256678 that breaks USM header parsing

Reviewed by: bz@

7 years agokrping: Allow the underlying ib_device to handle DMA mappings.
Navdeep Parhar [Mon, 24 Oct 2016 20:53:44 +0000 (20:53 +0000)]
krping: Allow the underlying ib_device to handle DMA mappings.

Submitted by: Vijay Singh @ Netapp

7 years agoFollow-up to r307866:
Konstantin Belousov [Mon, 24 Oct 2016 20:47:46 +0000 (20:47 +0000)]
Follow-up to r307866:
- Make !KDB config buildable.
- Simplify interface to nmi_handle_intr() by evaluating panic_on_nmi
  in one place, namely nmi_call_kdb().  This allows to remove do_panic
  argument from the functions, and to remove i386/amd64 duplication of
  the variable and sysctl definitions.  Note that now NMI causes
  panic(9) instead of trap_fatal() reporting and then panic(9),
  consistently for NMIs delivered while CPU operated in ring 0 and 3.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoPreliminary support for EFI in boot loader. Define efi-boot forth
Warner Losh [Mon, 24 Oct 2016 20:36:54 +0000 (20:36 +0000)]
Preliminary support for EFI in boot loader. Define efi-boot forth
environment variable to allow conditional compilation based on EFI
being present or not. Provide efi-setenv, efi-getenv, and
efi-unsetenv, though those need improvement. Move the efi definition
to libefi (but include a reference so they get included).

7 years agoallwinner: Add support for P2WI in RSB driver
Emmanuel Vadot [Mon, 24 Oct 2016 20:33:42 +0000 (20:33 +0000)]
allwinner: Add support for P2WI in RSB driver

Push-Pull Two Wire interface is a almost compatible iic like bus used
in sun6i SoC. It's only use is to communicate with the power management IC.

Reviewed by: jmcneill
MFC after: 1 week
Relnotes: yes

7 years agocxgbe(4): Fix bug in the calculation of the number of physically
Navdeep Parhar [Mon, 24 Oct 2016 19:09:56 +0000 (19:09 +0000)]
cxgbe(4): Fix bug in the calculation of the number of physically
contiguous regions in an mbuf chain.

If the payload of an mbuf ends at a page boundary count_mbuf_nsegs would
incorrectly consider the next mbuf's payload physically contiguous based
solely on a KVA comparison.

MFC after: 1 week
Sponsored by: Chelsio Communications

7 years agoInclude <sys/types.h> explicitly instead of depending on that
Marcel Moolenaar [Mon, 24 Oct 2016 18:12:57 +0000 (18:12 +0000)]
Include <sys/types.h> explicitly instead of depending on that
header being included by <sys/param.h>. When compiled as part
of makefs(8) and on macOS or Linux, <sys/param.h> is not our
own.

7 years agoInclude <stdarg.h> instead of <machine/stdarg.h> when compiled as
Marcel Moolenaar [Mon, 24 Oct 2016 18:03:04 +0000 (18:03 +0000)]
Include <stdarg.h> instead of <machine/stdarg.h> when compiled as
part of libsbuf. The former is the standard header, and allows us
to compile libsbuf on macOS/linux.

7 years agoDetect clang on macOS. The version string is slightly different.
Marcel Moolenaar [Mon, 24 Oct 2016 17:59:25 +0000 (17:59 +0000)]
Detect clang on macOS. The version string is slightly different.

7 years agoInclude "util.h", not <util.h>. The header is in the same directory
Marcel Moolenaar [Mon, 24 Oct 2016 17:57:46 +0000 (17:57 +0000)]
Include "util.h", not <util.h>. The header is in the same directory
as the C file. There may be a <util.h> on the host when compiling
on macOS or Linux, causing conflicts.

7 years agoWhen compiling on macOS or Linux, __dead can be defined already.
Marcel Moolenaar [Mon, 24 Oct 2016 17:56:08 +0000 (17:56 +0000)]
When compiling on macOS or Linux, __dead can be defined already.
Conditionally define __dead.

7 years agoFix typo.
Konstantin Belousov [Mon, 24 Oct 2016 17:37:21 +0000 (17:37 +0000)]
Fix typo.

Submitted by: alc
MFC after: 3 days

7 years agoHandle broadcast NMIs.
Konstantin Belousov [Mon, 24 Oct 2016 16:40:27 +0000 (16:40 +0000)]
Handle broadcast NMIs.

On several Intel chipsets, diagnostic NMIs sent from BMC or NMIs
reporting hardware errors are broadcasted to all CPUs.

When kernel is configured to enter kdb on NMI, the outcome is
problematic, because each CPU tries to enter kdb.  All CPUs are
executing NMI handlers, which set the latches disabling the nested NMI
delivery; this means that stop_cpus_hard(), used by kdb_enter() to
stop other cpus by broadcasting IPI_STOP_HARD NMI, cannot work.  One
indication of this is the harmless but annoying diagnostic "timeout
stopping cpus".

Much more harming behaviour is that because all CPUs try to enter kdb,
and if ddb is used as debugger, all CPUs issue prompt on console and
race for the input, not to mention the simultaneous use of the ddb
shared state.

Try to fix this by introducing a pseudo-lock for simultaneous attempts
to handle NMIs.  If one core happens to enter NMI trap handler, other
cores see it and simulate reception of the IPI_STOP_HARD.  More,
generic_stop_cpus() avoids sending IPI_STOP_HARD and avoids waiting
for the acknowledgement, relying on the nmi handler on other cores
suspending and then restarting the CPU.

Since it is impossible to detect at runtime whether some stray NMI is
broadcast or unicast, add a knob for administrator (really developer)
to configure debugging NMI handling mode.

The updated patch was debugged with the help from Andrey Gapon (avg)
and discussed with him.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D8249

7 years agoloader should boot pre-feature flags pools.
Toomas Soome [Mon, 24 Oct 2016 16:28:54 +0000 (16:28 +0000)]
loader should boot pre-feature flags pools.

The feature flags chek is missing the corner case where we have valid pool
version, but feature flags are not enabled - as for example plain v28 pool.

This update does fix the boot support for such pools.

Reviewed by: avg, allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8331

7 years agoMove the LLVM-based libgcc_s to /lib
Ed Maste [Mon, 24 Oct 2016 14:56:13 +0000 (14:56 +0000)]
Move the LLVM-based libgcc_s to /lib

When enabled, it should install in the same location as the existing
library.

Reported by: antoine

7 years agoSet SHLIBDIR before .including src.opts.mk in libcapser services
Ed Maste [Mon, 24 Oct 2016 14:37:18 +0000 (14:37 +0000)]
Set SHLIBDIR before .including src.opts.mk in libcapser services

bsd.own.mk (included from src.opts.mk) sets SHLIBDIR?=${LIBDIR}, so
SHLIBDIR must be set before including either one of them.

MFC with: 305626
Sponsored by: The FreeBSD Foundation

7 years agoRevert 307822
Emmanuel Vadot [Mon, 24 Oct 2016 14:24:12 +0000 (14:24 +0000)]
Revert 307822

P2WI is almost compatible with RSB which we already support.
I'll add support for P2WI in aw_rsb instead.

Discussed with:  jmcneill

7 years agoMFV r307859:
Martin Matuska [Mon, 24 Oct 2016 14:08:05 +0000 (14:08 +0000)]
MFV r307859:
Update libarchive to 3.2.2

7 years agoUpdate vendor/libarchive to git 629358182b04d7de2316bbd29708c58ddf797fd2
Martin Matuska [Mon, 24 Oct 2016 13:51:45 +0000 (13:51 +0000)]
Update vendor/libarchive to git 629358182b04d7de2316bbd29708c58ddf797fd2

Libarchive 3.2.2

7 years agoIncrease CACHE_LINE_SHIFT to 7 as cache lines are 128 bytes on ThunderX.
Andrew Turner [Mon, 24 Oct 2016 13:44:24 +0000 (13:44 +0000)]
Increase CACHE_LINE_SHIFT to 7 as cache lines are 128 bytes on ThunderX.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoFix panic after ZVOL renamed to name invalid for DEVFS.
Alexander Motin [Mon, 24 Oct 2016 12:24:24 +0000 (12:24 +0000)]
Fix panic after ZVOL renamed to name invalid for DEVFS.

MFC after: 2 weeks

7 years agohyperv/ic: Rework framework/message version negotiation.
Sepherosa Ziehau [Mon, 24 Oct 2016 05:36:19 +0000 (05:36 +0000)]
hyperv/ic: Rework framework/message version negotiation.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Modified by: sephe
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8280

7 years agohyperv/hn: Nuke unused forward declaration.
Sepherosa Ziehau [Mon, 24 Oct 2016 05:20:02 +0000 (05:20 +0000)]
hyperv/hn: Nuke unused forward declaration.

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

7 years agohyperv/hn: Fix RX filter settings.
Sepherosa Ziehau [Mon, 24 Oct 2016 05:10:35 +0000 (05:10 +0000)]
hyperv/hn: Fix RX filter settings.

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

7 years agohyperv/hn: Start link status check, if no network changes were pending.
Sepherosa Ziehau [Mon, 24 Oct 2016 05:01:34 +0000 (05:01 +0000)]
hyperv/hn: Start link status check, if no network changes were pending.

Link status check is much more lightweight than network change detection.

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

7 years agoAdd a bunch of new default options to MPC85XX* configs
Justin Hibbits [Mon, 24 Oct 2016 04:21:06 +0000 (04:21 +0000)]
Add a bunch of new default options to MPC85XX* configs

These were tested at various points but never merged into the configs at the
time.

7 years agohyperv/hn: Properly handle synthetic parts reattach failure.
Sepherosa Ziehau [Mon, 24 Oct 2016 03:42:34 +0000 (03:42 +0000)]
hyperv/hn: Properly handle synthetic parts reattach failure.

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

7 years agohyperv/hn: Fix chimney sending buffer leakage upon NVS sending failure.
Sepherosa Ziehau [Mon, 24 Oct 2016 03:34:19 +0000 (03:34 +0000)]
hyperv/hn: Fix chimney sending buffer leakage upon NVS sending failure.

This will not happen in real world, since TX consumption of the vmbus
TX bufring is limitted.  Better safe than sorry.

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

7 years agohyperv/hn: Move chimney buffer index and size to txdesc.
Sepherosa Ziehau [Mon, 24 Oct 2016 03:26:34 +0000 (03:26 +0000)]
hyperv/hn: Move chimney buffer index and size to txdesc.

All RNDIS control messages have used SG list for a while.  This makes
the send context suitable for further refactoring.

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

7 years ago[rss] manpage improvements.
Adrian Chadd [Sun, 23 Oct 2016 20:42:32 +0000 (20:42 +0000)]
[rss] manpage improvements.

Submitted by: gallatin

7 years ago[rss] install the header file.
Adrian Chadd [Sun, 23 Oct 2016 20:41:25 +0000 (20:41 +0000)]
[rss] install the header file.

Submitted by: gallatin

7 years agoUse the correct name for the qm_portals class.
Justin Hibbits [Sun, 23 Oct 2016 19:59:56 +0000 (19:59 +0000)]
Use the correct name for the qm_portals class.

This file was copy&pasted from bman_fdt, and it still shows.

7 years agoAdd device cpufreq.
Jared McNeill [Sun, 23 Oct 2016 19:02:19 +0000 (19:02 +0000)]
Add device cpufreq.

7 years agoRemove the powerpcspe Symbol.map, it's identical to powerpc's.
Justin Hibbits [Sun, 23 Oct 2016 18:08:34 +0000 (18:08 +0000)]
Remove the powerpcspe Symbol.map, it's identical to powerpc's.

Reported by: kib

7 years agoUse checkyesno instead of rolling my own..
Warner Losh [Sun, 23 Oct 2016 18:00:09 +0000 (18:00 +0000)]
Use checkyesno instead of rolling my own..

7 years agoTweak the UPDATING message a bit about the upgrade path.
Warner Losh [Sun, 23 Oct 2016 18:00:08 +0000 (18:00 +0000)]
Tweak the UPDATING message a bit about the upgrade path.
Add some automation into Makefile.inc1 to to enforce known good
upgrade from source paths.

7 years agoThrottle CPU frequency when hot temperature threshold has been reached to
Jared McNeill [Sun, 23 Oct 2016 17:48:34 +0000 (17:48 +0000)]
Throttle CPU frequency when hot temperature threshold has been reached to
prevent overheating.

When sensor 0's alarm interrupt is fired, set a throttle flag. Further
requests to set CPU frequency will be rejected until sensor 0's temperature
returns to a level below the hot temperature threshold.

Relnotes: yes

7 years agoUse upstream suffixes for LLVM IR
Dimitry Andric [Sun, 23 Oct 2016 14:28:29 +0000 (14:28 +0000)]
Use upstream suffixes for LLVM IR

In r307676, several make rules were added for LLVM IR files, both in
text and binary format.  Unfortunately these use different suffixes from
what upstream uses:
* Text IR has upstream suffix ".ll", while r307676 uses ".llo"
* Binary IR has upstream suffix ".bc", while r307676 uses ".bco"

Change these to what upstream uses instead.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8326

7 years agoallwinner: Add support for P2WI bus
Emmanuel Vadot [Sun, 23 Oct 2016 12:48:09 +0000 (12:48 +0000)]
allwinner: Add support for P2WI bus

P2WI (Push-Pull Two Wire Interface) is an I2C-like bus used in sun6i SoC
for talking to power management unit IC.

7 years agoIn the fueword64(9) wrapper for architectures which do not implemented
Konstantin Belousov [Sun, 23 Oct 2016 11:23:17 +0000 (11:23 +0000)]
In the fueword64(9) wrapper for architectures which do not implemented
native fueword64(9) still, use proper type for local where fuword64()
result is stored.

Note that fueword64() is unused in the tree.

Submitted by: Chunhui He <hchunhui@mail.ustc.edu.cn>
PR: 212520
MFC after: 1 week

7 years ago[net80211] Add a variant on ieee80211_get_rx_params() that returns a pointer.
Adrian Chadd [Sun, 23 Oct 2016 08:21:35 +0000 (08:21 +0000)]
[net80211] Add a variant on ieee80211_get_rx_params() that returns a pointer.

Be careful when calling this, as the underlying mbuf may change
afterwards - common in the RX path.

7 years ago[net80211] Add a macro to see if a frame is a management frame or not.
Adrian Chadd [Sun, 23 Oct 2016 08:19:43 +0000 (08:19 +0000)]
[net80211] Add a macro to see if a frame is a management frame or not.

7 years agoRevert r307813.
Justin Hibbits [Sun, 23 Oct 2016 01:03:17 +0000 (01:03 +0000)]
Revert r307813.

I misread the code, and it shouldn't have compiled (fputhread is just a variable
name).

7 years agoUse the right thread pointer for SPE alignment exceptions.
Justin Hibbits [Sun, 23 Oct 2016 01:01:08 +0000 (01:01 +0000)]
Use the right thread pointer for SPE alignment exceptions.

7 years agoelfcopy: select mode by the end of the program name
Ed Maste [Sat, 22 Oct 2016 23:49:06 +0000 (23:49 +0000)]
elfcopy: select mode by the end of the program name

The mode of operation (elfcopy, mcs, or strip) is chosen based on the
program name.  Broaden this to allow a substring match at the end of the
name to allow prefixes - for example, bsdstrip or aarch64-freebsd-strip.

This improves use of these tools as drop-in replacements for GNU objcopy
and strip, which are often built with a limited set of supported targets
and installed with a target prefix for cross tools.

Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1663

7 years agoRemove reference to RCS from PSD titles
Baptiste Daroussin [Sat, 22 Oct 2016 23:09:06 +0000 (23:09 +0000)]
Remove reference to RCS from PSD titles

7 years agoRemove RCS entry from PSD content file, it is gone along with GNU RCS
Baptiste Daroussin [Sat, 22 Oct 2016 23:05:44 +0000 (23:05 +0000)]
Remove RCS entry from PSD content file, it is gone along with GNU RCS

7 years agoEVDEV: ums evdev support improvements: locking and event reporting
Oleksandr Tymoshenko [Sat, 22 Oct 2016 22:55:10 +0000 (22:55 +0000)]
EVDEV: ums evdev support improvements: locking and event reporting

- Use ums lock as evdev lock
- Do not cap axes values to sysmouse limits for evdev reports
- Do not map T-axis events to buttons for evdev reports
- Use shortcuts for event reporting

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
MFC after: 1 week

7 years agoEVDEV: Add shortcut functions for event types
Oleksandr Tymoshenko [Sat, 22 Oct 2016 22:52:50 +0000 (22:52 +0000)]
EVDEV: Add shortcut functions for event types

Add wrappers around generic evdev_push_event for specific event types:
EV_KEY/EV_REL/EV_ABS etc...

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

7 years agoFix build of tzsetup when WITHOUT_DIALOG is set
Baptiste Daroussin [Sat, 22 Oct 2016 22:35:39 +0000 (22:35 +0000)]
Fix build of tzsetup when WITHOUT_DIALOG is set

Hide dialog specific code behind HAVE_DIALOG. It allows to build a stripped
down version (missing the dialog UI) but perfectly function tzsetup when
world is built WITHOUT_DIALOG

Reorganise a bit the code to limit the number of blocks under HAVE_DIALOG

Reviewed by: emaste
Sponsored by: https://reviews.freebsd.org/D8325

7 years agoAlign whitespace.
Cy Schubert [Sat, 22 Oct 2016 22:29:03 +0000 (22:29 +0000)]
Align whitespace.

MFC after: 2 weeks
X-MFC with: r307800

7 years agoSources from the "current" build tree and generated sources in the
Cy Schubert [Sat, 22 Oct 2016 22:27:51 +0000 (22:27 +0000)]
Sources from the "current" build tree and generated sources in the
object tree should be used instead of sources and headers from the
already installed source tree on the build host.

This was noticed while addressing issues in the upcoming amd update.

MFC after: 2 weeks

7 years agoReduce code duplication between powerpc and powerpcspe
Justin Hibbits [Sat, 22 Oct 2016 21:51:58 +0000 (21:51 +0000)]
Reduce code duplication between powerpc and powerpcspe

They're nearly identical except for a few files.
Reported by: kib

7 years agoFix typo in the COMPILER_VERSION check
Baptiste Daroussin [Sat, 22 Oct 2016 20:00:39 +0000 (20:00 +0000)]
Fix typo in the COMPILER_VERSION check

PR: 213120
Submitted by: Yuta Satoh <nigoro.dev@gmail.com>
MFC after: 3 days

7 years agoDo not install NIS program rc script if WITHOUT_NIS is set
Baptiste Daroussin [Sat, 22 Oct 2016 19:51:32 +0000 (19:51 +0000)]
Do not install NIS program rc script if WITHOUT_NIS is set

PR: 213375
Submitted by: sergey@akhmatov.ru
MFC after: 3 days

7 years agoImport pci_vendors 2016.10.20
Baptiste Daroussin [Sat, 22 Oct 2016 19:36:12 +0000 (19:36 +0000)]
Import pci_vendors 2016.10.20

7 years agoFix a typo from a manual merge.
Justin Hibbits [Sat, 22 Oct 2016 19:27:49 +0000 (19:27 +0000)]
Fix a typo from a manual merge.

7 years agoImport tzdata 2016h
Baptiste Daroussin [Sat, 22 Oct 2016 19:24:46 +0000 (19:24 +0000)]
Import tzdata 2016h

MFC after: 2 days

7 years agoImport tzdata 2016h
Baptiste Daroussin [Sat, 22 Oct 2016 19:18:59 +0000 (19:18 +0000)]
Import tzdata 2016h

7 years agoddb(4): Add sleepchains to "show allchains"
Conrad Meyer [Sat, 22 Oct 2016 18:02:20 +0000 (18:02 +0000)]
ddb(4): Add sleepchains to "show allchains"

Reported by: markj
Reviewed by: markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8320

7 years agoNo functional changes, mostly getting the whitespace changes resulting
Michael Tuexen [Sat, 22 Oct 2016 17:21:21 +0000 (17:21 +0000)]
No functional changes, mostly getting the whitespace changes resulting
from an updated formatting tool chain.

MFC after: 1 month

7 years agoFix libusb20_dev_get_desc(3) to use the "vendor product" order, not
Edward Tomasz Napierala [Sat, 22 Oct 2016 14:37:13 +0000 (14:37 +0000)]
Fix libusb20_dev_get_desc(3) to use the "vendor product" order, not
"product vendor". This is consistent with how it's generally done.
The ordering is visible eg in usbconfig(8) output.

Note to self: MFC this to 9 and 8.

Reviewed by: hselasky@
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8258

7 years agoptrace.S is not needed, libc/sys/ptrace.c exists already.
Justin Hibbits [Sat, 22 Oct 2016 13:11:09 +0000 (13:11 +0000)]
ptrace.S is not needed, libc/sys/ptrace.c exists already.

This was leftovers from the initial branch work.

Reported by: kib

7 years agodaemon: Allow logging daemon stdout/stderr to file or syslog.
Jilles Tjoelker [Sat, 22 Oct 2016 11:26:22 +0000 (11:26 +0000)]
daemon: Allow logging daemon stdout/stderr to file or syslog.

There are various new options, documented in the man page, to send the
daemon's standard output and/or standard error to a file or to syslog.

Submitted by: ank at iki.fi
Reviewed by: wblock (man page only)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D7993

7 years agojedec_ts: a driver for thermal sensors on memory modules
Andriy Gapon [Sat, 22 Oct 2016 08:00:46 +0000 (08:00 +0000)]
jedec_ts: a driver for thermal sensors on memory modules

The driver currently supports chips that are fully compliant with the
JEDEC SPD / EEPROM / TS standard (JEDEC Standard 21-C,
TSE2002 Specification, frequenlty referred to as JEDEC JC 42.4).

Additionally some chips from STMicroelectronics are supported as well.
They are compliant except for their Device ID pattern.

Given the continued lack of any common sensor infrastructure, the driver
uses an ad-hoc sysctl to report the temperature.

Reviewed by: wblock (documentation)
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D8174

7 years agoInitialize the ofw_bus_devinfo on the portals to prevent a crash.
Justin Hibbits [Sat, 22 Oct 2016 02:11:53 +0000 (02:11 +0000)]
Initialize the ofw_bus_devinfo on the portals to prevent a crash.

If the device tree doesn't contain a cpu-handle field in any bman-portal or
qman-portal, it will exit without setting up the devinfo, leaving it
uninitialized.  This will lead to attempts to free random memory, and ultimately
panic.

7 years agoCreate a new MACHINE_ARCH for Freescale PowerPC e500v2
Justin Hibbits [Sat, 22 Oct 2016 01:57:15 +0000 (01:57 +0000)]
Create a new MACHINE_ARCH for Freescale PowerPC e500v2

Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By: bdrewery, imp
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D5683

7 years agocxgbe(4): Dump any mailbox command that times out.
Navdeep Parhar [Sat, 22 Oct 2016 00:48:58 +0000 (00:48 +0000)]
cxgbe(4): Dump any mailbox command that times out.

7 years agoDefine max_align_t for C11.
John Baldwin [Fri, 21 Oct 2016 23:50:02 +0000 (23:50 +0000)]
Define max_align_t for C11.

libc++'s stddef.h includes an existing definition of max_align_t for
C++11, but it is only defined for C++, not for C.  In addition, GCC and
clang both define an alternate version of max_align_t that uses a
union of multiple types rather than a plain long double as in libc++.
This adds a __max_align_t to <sys/_types.h> that matches the GCC and
clang definition that is mapped to max_align_t in <stddef.h>.

PR: 210890
Reviewed by: dim
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8194

7 years agoswapoff: Remove only late devices with -aL.
Jilles Tjoelker [Fri, 21 Oct 2016 21:55:50 +0000 (21:55 +0000)]
swapoff: Remove only late devices with -aL.

Currently, '/etc/rc.d/swaplate stop' removes all swap devices. This can be
very slow and may not even be possible if there is a lot of swap space in
use. However, removing swap devices is only needed for late swap devices
that may depend on daemons that subsequent shutdown steps stop. Normal swap
devices such as hard disk partitions will remain available throughout the
shutdown process and need not be removed.

In swapoff, interpret -aL to remove late swap devices only, and use this in
etc/rc.d/swaplate. The meaning of -aL in swapon remains unchanged (add all
swap devices, both normal and late).

PR: 187081
Reviewed by: wblock (man page only), ngie
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8126

7 years agoFix building of many ports that use make from base, such as devel/apr1,
Dimitry Andric [Fri, 21 Oct 2016 21:52:22 +0000 (21:52 +0000)]
Fix building of many ports that use make from base, such as devel/apr1,
after r307676, which added transformation rules for .llo and .bco files.

These suffixes also have to be added the the global .SUFFIXES target,
otherwise the various suffix-transformation rules would be interpreted
as literal targets.  E.g.,

.c.bco:
... commands ...

would actually to build a file named ".c.bco".

7 years agoClose some file descriptor leaks in pw
Alan Somers [Fri, 21 Oct 2016 20:17:19 +0000 (20:17 +0000)]
Close some file descriptor leaks in pw

MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8245

7 years agoFix a problem in camcontrol(8) that cropped up with r307684.
Kenneth D. Merry [Fri, 21 Oct 2016 18:54:56 +0000 (18:54 +0000)]
Fix a problem in camcontrol(8) that cropped up with r307684.

In r307684, I changed rescan_or_reset_bus() to bzero stack-allocated CCBs
before sending them to the kernel because there was stack garbage in there
that wound up meaning that bogus CCB flags were set.

While this fixed the 'camcontrol rescan all' case (XPT_DEV_MATCH CCBs were
failing previously), it broke the 'camcontrol rescan 0' (or any other
number) case when INVARIANTS are turned on.  Rescanning a single bus
reliably produced an assert in cam_periph_runccb():

panic: cam_periph_runccb: ccb=0xfffff80044ffe000, func_code=0x708, flags=0xffffdde0

The flags values don't make sense from the code.  Changing the CCBs in
rescan_or_reset_bus() from stack to heap allocated avoids the problem.

It would be better to understand why userland stack allocated CCBs don't
work properly, since there may be other code that breaks if stack allocated
CCBs don't work.

sbin/camcontrol/camcontrol.c:
In rescan_or_reset_bus(), allocate the CCBs using malloc(3) instead
of on the stack to avoid an assertion in cam_periph_runccb().

MFC after: 3 days
Sponsored by: Spectra Logic

7 years agoFix a grammar error.
Michael Tuexen [Fri, 21 Oct 2016 18:45:09 +0000 (18:45 +0000)]
Fix a grammar error.

Reported by:i hiren, vangyzen
MFC after: 1 month
X-MFC: r307727
Sponsored by: Netflix

7 years agoRework r306337.
Hiren Panchasara [Fri, 21 Oct 2016 18:27:30 +0000 (18:27 +0000)]
Rework r306337.

In sendit(), if mp->msg_control is present, then in sockargs() we are
allocating mbuf to store mp->msg_control. Later in kern_sendit(), call
to getsock_cap(), will check validity of file pointer passed, if this
fails EBADF is returned but mbuf allocated in sockargs() is not freed.
Made code changes to free the same.

Since freeing control mbuf in sendit() after checking (control != NULL)
may lead to double freeing of control mbuf in sendit(), we can free
control mbuf in kern_sendit() if there are any errors in the routine.

Submitted by:     Lohith Bellad <lohith.bellad@me.com>
Reviewed by:     glebius
MFC after:     3 weeks
Differential Revision:     https://reviews.freebsd.org/D8152

7 years agoAllow all subdirectories to be optional via SUBDIR.${MK_*}
Ed Maste [Fri, 21 Oct 2016 17:25:19 +0000 (17:25 +0000)]
Allow all subdirectories to be optional via SUBDIR.${MK_*}

Reviewed by: br, imp
Tested by: br
Pointy hat to: emaste
Differential Revision: https://reviews.freebsd.org/D8317

7 years agoFix few sentence in the man page.
Mariusz Zaborski [Fri, 21 Oct 2016 16:31:58 +0000 (16:31 +0000)]
Fix few sentence in the man page.

Pointed out by: wblock

7 years agocapsicum: perform copyout without the fildesc lock held in sys_cap_ioctls_get
Mariusz Zaborski [Fri, 21 Oct 2016 16:12:23 +0000 (16:12 +0000)]
capsicum: perform copyout without the fildesc lock held in sys_cap_ioctls_get

Reviewed by: pjd

7 years agoAdd names for some DASP devices.
Alexander Motin [Fri, 21 Oct 2016 15:23:54 +0000 (15:23 +0000)]
Add names for some DASP devices.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 1 week

7 years agonetmap: if_ptnet depends on inet
Ed Maste [Fri, 21 Oct 2016 15:17:42 +0000 (15:17 +0000)]
netmap: if_ptnet depends on inet