Commit Graph

219895 Commits

Author SHA1 Message Date
Warner Losh
ffce99f502 Implement 5 wdc-specific nvme control options for their HGST drives:
wdc cap-diag		Capture diagnostic data from drive
	wdc drive-log		Capture drive history data from drive
	wdc get-crash-dump	Retrieve firmware crash dump from drive
2017-02-04 05:53:00 +00:00
Warner Losh
ccac2ba7ec Move the usage and command name lookup into functions. 2017-02-04 05:52:53 +00:00
Warner Losh
29740f4ce1 Back off using CPUTYPE for the moment. There's still some issues with
that.
2017-02-04 05:52:51 +00:00
Warner Losh
3f13e7a8a2 Put the arguments to aligned_alloc in the right order. 2017-02-04 05:52:50 +00:00
Alan Cox
8a99f1cc59 Over the years, the code and comments in vm_page_startup() have diverged in
one respect.  When determining how many page structures to allocate,
contrary to what the comments say, the code does not account for the
overhead of a page structure per page of physical memory.  This revision
changes the code to match the comments.

Reviewed by:	kib, markj
MFC after:	6 weeks
Differential Revision:	https://reviews.freebsd.org/D9081
2017-02-04 05:23:10 +00:00
Andrey V. Elsukov
9ef6004352 Check that primary GPT header is valid before wiping partitioning.
This allows safely destroy corrupted GPT when primary header was
rewritten by some data, that do not want to destroy.

MFC after:	1 week
2017-02-04 05:09:47 +00:00
Bryan Drewery
e297227038 Remove LOCAL_LIB_DIRS warning added in r275839.
The case for which this was added, r274807, causes this warning to
always show.  LOCAL_DIRS=foo LOCAL_LIB_DIRS=foo/lib.  The only case in
which r274807 is a problem is if foo/Makefile does not contain
SUBDIR+=lib, which is a normal convention.  LOCAL_LIB_DIRS is a special
hack only to get a library into the _generic_libs list for the
'make libraries' bootstrapping phase.  The old behavior changed in
r274807 was only in head during the 10.0 cycle, so the warning was
only ever needed until release anyhow.

Reported by:	ngie
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-04 02:15:49 +00:00
Enji Cooper
c6dc13326b Fix typo in variable name (_REDUNDENT_LIB_DIRS -> _REDUNDANT_LIB_DIRS)
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
2017-02-04 01:21:48 +00:00
Eric van Gyzen
f02396d5d9 Fix grammar in getpeereid(3) 2017-02-04 00:37:25 +00:00
Eric van Gyzen
3729014801 PCIe HotPlug: remove tests for DL active link capability
As of r313097, the HotPlug code requires the link to support
reporting of the data-link status.  Remove tests for this capability
from code that can now assume its presence.

Suggested by:	jhb
Reviewed by:	jhb
MFC after:	3 days
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D9431
2017-02-04 00:34:00 +00:00
George V. Neville-Neil
c613d0c2ba Files which implement the new random number system code for DTrace
Submitted by:	Graeme Jenkinson
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-02-03 22:40:13 +00:00
George V. Neville-Neil
00bb01a40c Replace the implementation of DTrace's RAND subroutine for generating
low-quality random numbers with a modern implementation (xoroshiro128+)
that is capable of generating better quality randomness without compromising performance.

Submitted by:	Graeme Jenkinson
Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D9051
2017-02-03 22:26:19 +00:00
Jilles Tjoelker
e301fd984a Clean up documentation of AF_UNIX control messages.
Document AF_UNIX control messages in unix(4) only, not split between unix(4)
and recv(2).

Also, warn about LOCAL_CREDS effective uid/gid fields, since the write could
be from a setuid or setgid program (with the explicit SCM_CREDS and
LOCAL_PEERCRED, the credentials are read at such a time that it can be
assumed that the process intends for them to be used in this context).

Reviewed by:	wblock
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9298
2017-02-03 20:33:23 +00:00
Warren Block
4af17bf5c0 Re-enable an accidentally-disabled temp directory creation test.
Reported by:	bjk
Sponsored by:	iXsystems
2017-02-03 20:17:54 +00:00
Warren Block
13ca53104f Decromulate an extra "if".
Reported by:	rpokala
Sponsored by:	iXsystems
2017-02-03 19:21:28 +00:00
Warren Block
7a206c317d Clarify some option descriptions, add a line of text to makeman to
add the slightest hint of a shade of a clue of what it does.

Sponsored by:	iXsystems
2017-02-03 19:09:46 +00:00
Patrick Kelsey
ec93ed8d95 Fix VIMAGE-related bugs in TFO. The autokey callout vnet context was
not being initialized, and the per-vnet fastopen context was only
being initialized for the default vnet.

PR:		216613
Reported by:	Alex Deiter <alex dot deiter at gmail dot com>
MFC after:	1 week
2017-02-03 17:02:57 +00:00
Toomas Soome
bfe9bdb063 loader: libefi/env.c warnings in arm build
The arm build has revealed some of the warnings, the fix for CHAR16
warning is to switch the warning off for env.c (same as for efinet.c).

For error code we need to use macro.

Reported by:	gjb
Reviewed by:	imp
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D9422
2017-02-03 16:39:10 +00:00
Bryan Drewery
27f134b64a native-xtools: Add missing readelf.
The switch to elftoolchain's readelf in r280859 caused native-xtools
to no longer build readelf.  This fixes poudriere builds not using
a native readelf when expected.

Reported by:	strejda on freenode
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-02-03 16:27:23 +00:00
Warren Block
b9b36cc00f Replace Cyrillic characters with Latin (normal) ones.
PR:		216534
Submitted by:	eborisch+FreeBSD@gmail.com
MFC after:	1 week
Sponsored by:	iXsystems
2017-02-03 16:21:30 +00:00
Pedro F. Giffuni
0157503dd8 resolvconf: restore RESTARTCMD=, CMD1=, CMD2= and sed pattern as before.
r312992 removed RESTARTCMD_WITH_ARG for @RESTARTCMD something@ but
reverted the sed to be '@RESTARTCMD \(.*\)@' and RESTARTCMD= to be
the value of RESTARTCMD_WITH_ARG.

Submitted by:	Guy Yur
x_MFC with:	r312992
2017-02-03 16:08:58 +00:00
Konstantin Belousov
57f6622f92 For i386, remove config options CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE
and device npx.

This means that FPU is always initialized and handled when available,
and SSE+ register file and exception are handled when available.  This
makes the kernel FPU code much easier to maintain by the cost of
slight bloat for CPUs older than 25 years.

CPU_DISABLE_CMPXCHG outlived its usefulness, see the removed comment
explaining the original purpose.

Suggested by and discussed with:	bde
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2017-02-03 12:51:40 +00:00
Andrew Turner
5b50ed8043 Fix the comment showing the meaning of the first argument to sigprocmask.
Sponsored by:	ABT Systems Ltd
2017-02-03 11:51:06 +00:00
Andrew Turner
c1a2c9314f Remove an old use of _ARM_ARCH_6, we are moving to using the standard
__ARM_ARCH >= 6 spelling.

Sponsored by:	ABT Systems Ltd
2017-02-03 11:47:57 +00:00
Andrew Turner
aa7dd0fb0e Only define atomic_fcmpset_long in the kernel. We may include
machine/atomic.h in userspace, however atomic_fcmpset_32 is unimplemented
there.

Sponsored by:	ABT Systems Ltd
2017-02-03 10:04:17 +00:00
Adrian Chadd
ce4552cd1a [net80211] don't update quiet time counter values every probe request.
The quiet time counter update is happening each time the IE is added,
which also means it happens for each quiet time IE addition to the probe
response.

Only update the countdown if we request ie (ie, beacon updates.)
2017-02-03 06:04:06 +00:00
Adrian Chadd
ea319c839b [ath_hal] [ar9300] link in the CAC enable/diable methods and expose it via the HAL. 2017-02-03 05:15:35 +00:00
Adrian Chadd
2bc158cf24 [ath_hal] prepare for CAC quiet time.
To support DFS, the NIC needs to be very quiet during this time.
No transmissions including ACKs are allowed.

This is just the initial HAL glue.
2017-02-03 05:15:08 +00:00
Adrian Chadd
c15fdc23c7 [ath_hal] [ar9300] initial radar decode for AR9380 and later chips. 2017-02-03 03:57:06 +00:00
Mark Johnston
b3b5bfeb22 Sync the x86 dis_tables.c with upstream.
This corresponds to the following illumos issues:

  5755 want support for Intel FMA instrs
  5756 want support for Intel BMI1 instrs
  5757 want support for Intel BMI2 instrs
  5758 want support for Intel AVX2 instrs
  7204 Want broadwell rdseed and adx support
  7208 Want stac/clac disasm support
  7733 Need SHA Instruction dis support
  7756 dis can't handle x86 SSE 3 instructions
  7757 want avx2 disasm tests
  7758 want SSE 4.1 disasm tests

MFC after:	2 weeks
2017-02-03 03:22:47 +00:00
Warner Losh
a3a6c48d66 Ensure that the passthrough request will fit in MAXPHYS bytes after it
has been rounded to full pages. This avoids a panic in
vm_fault_quick_hold_pages due to this off-by-one error passing one
page too many into vmapbuf.
2017-02-02 23:04:06 +00:00
Warner Losh
dc935c4f19 Use aligned buffer for the firmware data. Otherwise, when loading a
MAXPHYS bytes of data, the I/O would require MAXPHYS + PAGE_SIZE worth
of pages to do the I/O and we'd hit an assertion in
vm_fault_quick_hold_pages unless MAXPHYS was larger than 1M +
PAGE_SIZE.
2017-02-02 23:04:00 +00:00
Konstantin Belousov
9c16356ccd Use ANSI definitions for some i386 functions.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-02-02 22:02:10 +00:00
Alexey Dokuchaev
f73ff060d2 Try to fix the old "he capability is stupid" bug in gettytab(5)/getty(8)
There is one capability explicitly documented in gettytab(5) as stupid: he.
And it is indeed.  It was meant to facilitate system hostname modification,
but is hardly usable in practice because it allows very limited editing
(e.g., it depends on a particular hostname length, making it non-generic).

Replace it with simple implementation that treats ``he'' as POSIX extended
regular expression which is matched against the hostname.  If there are no
parenthesized subexpressions in the pattern, entire matched string is used
as the final hostname.  Otherwise, use the first matched subexpression.
If the pattern does not match, the original hostname is not modified.

Using regex(3) gives more freedom, does not complicate the code very much,
and makes a lot more sense, in turn making ``he'' less stupid and actually
useful (e.g., it is now possible to obtain node or domain names from the
original hostname string, without knowing it in advance).

Reviewed by:		jilles, manpages (wblock)
Approved by:		jilles (implied)
Differential Revision:	https://reviews.freebsd.org/D9244
2017-02-02 20:30:50 +00:00
Jung-uk Kim
b3d5213675 Update byacc regression tests to match 20170201. 2017-02-02 20:01:54 +00:00
Jung-uk Kim
3e794565fc MFV: r313101
Update byacc to 20170201.
2017-02-02 20:00:01 +00:00
Gleb Smirnoff
3057e051be Reduce diff to upstream using HAVE_CAPSICUM instead of __FreeBSD__. It'll also
make it easier to upstream HAVE_CASPER patch.
2017-02-02 19:56:41 +00:00
Jung-uk Kim
8992b86776 Import byacc 20170201. 2017-02-02 19:22:26 +00:00
Edward Tomasz Napierala
a6b15641d6 Ifdef out the unused vm_rr_selectdomain().
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-02-02 17:44:55 +00:00
Kurt Lidl
75429a15dd Fix compilation for mips64 platforms
The hwpmc_mips24k / hwpmc_mips74k modules are only for mips 32-bit hosts.
Reviewed by:	adrian
2017-02-02 17:43:00 +00:00
John Baldwin
2ffb582a45 Require Data Layer Active reporting for native PCI-e HotPlug.
Some PCI-e bridges report that they support HotPlug in the slot
capabilities but do not report support for Data Layer Active events
in the link capabilities register.  These bridges do not work correctly
when HotPlug is used.  Further, while the description of HotPlug in
the spec does not mention that DL active events are required, the
description of the link capabilities register says that DL active is
required for HotPlug.  Thanks to Dave Baukus for finding that language
in the spec.

PR:		211699
Submitted by:	Dave Baukus <daveb@spectralogic.com>
Reviewed by:	vangyzen
MFC after:	3 days
2017-02-02 17:29:15 +00:00
Adrian Chadd
66c73f1d0a [ath_hal] [ar9300] initial radar detection glue.
* flesh out a "get default DFS parameters" routine
* remove the stub that returns NULL
* fix up the enable DFS method to do what FreeBSD does - specifically, allow pe_enabled
  to be set/cleared.

This allows the radar pulse reporting code to function, but it doesn't yet
do anything useful.
2017-02-02 09:19:57 +00:00
Michal Meloun
93a065e749 Remake support for SMP kernel on UP cpu:
- Use new option SMP_ON_UP instead of (mis)using specific CPU type.
   By this, any SMP kernel can be compiled with SMP_ON_UP support.
 - Enable runtime detection of CPU multiprocessor extensions only
   if SMP_ON_UP option is used. In other cases (pure SMP or UP),
   statically compile only required variant.
 - Don't leak multiprocessor instructions to UP kernel.
 - Correctly handle data cache write back to point of unification.
   DCCMVAU is supported on all armv7 cpus.
 - For SMP_ON_UP kernels, detect proper TTB flags on runtime.

Differential Revision: https://reviews.freebsd.org/D9133
2017-02-02 06:14:44 +00:00
Wojciech Macek
ae0f418aa4 Remove remaining ifdefs from CESA header
Commit r312743 ("Use SoC ID - based detection in CESA") resulted
in build failing for Marvell armv5 platforms, which don't support
the newer version of CESA controller. This patch provides a fix by
removing ifdefs around bitfields' definitions, so that they are
known to all platforms.

Submitted by:          Marcin Wojtas <mw@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Stormshield
2017-02-02 06:07:39 +00:00
Adrian Chadd
be34efe2f3 [ath_hal] [ar9300] initial hacks to make spectral scan working on AR9380 and later NICs.
* add debugging
* disable the manual noise floor calibration and tracking done by the HAL;
  this interferes with the normal calibration path and will lock up the RX
  side
* don't program short report / priority if they're provided as NOVAL.
2017-02-02 05:29:22 +00:00
Adrian Chadd
f59ff2a32d [ath] ensure the NIC is woken up before changing the spectral scan parameters. 2017-02-02 05:27:48 +00:00
Adrian Chadd
4a3fdd0e13 [ath_hal] add debugging level for spectral scan. 2017-02-02 05:27:27 +00:00
Adrian Chadd
38fbe19b81 [ath] add spectral scan priority. 2017-02-02 05:27:06 +00:00
Adrian Chadd
a3c47b0437 [athspectral] add a knob to expose the spectral scan priority.
This is required for AR9380 and later chips.. please leave it at 0 for now.
2017-02-02 05:26:39 +00:00
Gleb Smirnoff
8b3245fb4e Fix build with WITHOUT_INET6.
Submitted by:	Alex Deiter <alex.deiter gmail.com>
2017-02-02 04:53:33 +00:00