Commit Graph

225136 Commits

Author SHA1 Message Date
Kyle Evans
c6841b079b Respect SIMPLE_BACKUP_SUFFIX environment variable in indent(1)
Instead of using a non-configurable ".BAK" suffix, respect the
SIMPLE_BACKUP_SUFFIX environment variable also used by patch(1). This
simplifies cleanup operations in some patch/indent workflows.

Reviewed by:	cem (earlier version), emaste, pstef
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D10921
2017-08-07 18:01:27 +00:00
Konstantin Belousov
fe04f5e9d0 Avoid DI recursion when reclaim_pv_chunk() is called from
pmap_advise() or pmap_remove().

Reported and tested by:	pho (previous version)
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-08-07 17:29:54 +00:00
Konstantin Belousov
1a47eac0f5 Explain why delayed invalidation is not required in pmap_protect() and
pmap_remove_pages().

Submitted by:	alc
MFC after:	1 week
2017-08-07 17:23:10 +00:00
Dimitry Andric
8422e09e55 Follow-up to r321684 (Don't use libc++ when cross-building for gcc
arches), and handle two more cases where libc++ includes could be
incorrectly enabled, in case the host compiler is clang 5.0.0, and the
target (cross) compiler is gcc 4.2.1.

Noted by:	bdrewery
MFC after:	3 days
X-MFC-With:	321684
2017-08-07 16:23:53 +00:00
Alexander Motin
e1cf70fbab Fix hrtimer_active() in case of cancellation.
While there, switch to FreeBSD internal callout active status.

Reviewed by:	markj, hselasky
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D11900
2017-08-07 14:34:05 +00:00
Ruslan Bukin
ca20f8ec29 o Replace __riscv__ with __riscv
o Replace __riscv64 with (__riscv && __riscv_xlen == 64)

This is required to support new GCC 7.1 compiler.
This is compatible with current GCC 6.1 compiler.

RISC-V is extensible ISA and the idea here is to have built-in define
per each extension, so together with __riscv we will have some subset
of these as well (depending on -march string passed to compiler):

__riscv_compressed
__riscv_atomic
__riscv_mul
__riscv_div
__riscv_muldiv
__riscv_fdiv
__riscv_fsqrt
__riscv_float_abi_soft
__riscv_float_abi_single
__riscv_float_abi_double
__riscv_cmodel_medlow
__riscv_cmodel_medany
__riscv_cmodel_pic
__riscv_xlen

Reviewed by:	ngie
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11901
2017-08-07 14:09:57 +00:00
Navdeep Parhar
b96793ae43 cxgbe(4): Add the T6 and T5 Unified Wire configuration files to the
kernel, just like for T4, when the driver is compiled into the kernel.

Reported by:	mav@
MFC after:	3 days
Sponsored by:	Chelsio Communications
2017-08-07 14:04:19 +00:00
Pietro Cerutti
f9995000bc Enhance top(1) to filter on multiple usernames
Reviewed by:	cognet, bapt
Approved by:	cognet
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11840
2017-08-07 08:45:08 +00:00
Andriy Voskoboinyk
c69b68f502 rfcomm_pppd.8: fix a typo (SPD -> SDP).
MFC after:	3 days
2017-08-06 21:54:43 +00:00
Navdeep Parhar
cc2050c5eb cxgbe(4): Avoid a NULL dereference that would occur during module unload
if there were problems earlier during attach.

MFC after:	3 days
Sponsored by:	Chelsio Communications
2017-08-06 19:45:59 +00:00
Konstantin Belousov
0b9b3897a8 Remove trivial comments. Remove and-ing with UINT_MAX for minor(),
cast to int already does the required truncation of significant bits.

Requested and reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
2017-08-06 12:27:20 +00:00
Cy Schubert
6f777dd4e9 Remove dead target introduced in r178828.
MFC after:	1 week
2017-08-06 06:35:40 +00:00
Cy Schubert
dcb20d01f5 krb5_err.h is generated from a .et file in kerberos5/lib/libkrb5.
As kerberos5/lib/krb5 include files are already referenced it makes
no sense to generate it again here.

MFC after:	1 month
2017-08-06 06:31:47 +00:00
Andrew Turner
1f15260790 Mark each cpu in the appropriate cpuset_domain set. This allows devices to
handle cases where they can only run on a single domain.

To allow all devices access to this set we need to move reading the domain
earlier in the boot as it was previously handled in the CPU driver, however
this is too late for the GICv3 ITS driver.

Sponsored by:	DARPA, AFRL
2017-08-05 20:57:34 +00:00
Andriy Voskoboinyk
8c59f334b9 Add myself to the calendar.freebsd.
Reported by:	mckusick
2017-08-05 19:57:45 +00:00
Enji Cooper
3783c851d7 Don't check result of chflags in f_flag_cleanup()
This will prevent false positives from occurring if the test is run on
ZFS since ZFS doesn't support fflags throbbing like UFS.

PR:	221189
MFC after:	4 days
MFC with:	r321949
2017-08-05 16:58:02 +00:00
Marius Strobl
4b38286169 - Move creation and unlinking of /etc/wall_cmos_clock from the handling
of the initial UTC dialog to install_zoneinfo() so that file gets the
  necessary treatment also when that dialog is skipped via "-s", when
  selecting UTC from the time zone menu or on the command-line instead
  etc.
- Make the initial UTC dialog actually work by giving the relevant files
  the necessary treatment and then exit when choosing "Yes" there instead
  of moving on to the time zone menu regardless.
- Since r301131, /etc/localtime is also installed when selecting UTC in
  interactive configurations (which previously meant only via the time
  zone menu, though). Thus, the code added in r230298 which treats a
  NULL zone file name as UTC and removes /etc/localtime in that case can
  go again.
- Consistently refer to "could not delete" (as chosen by the oldest such
  code in here) when unlink(2) fails instead of a to mixture of "delete"
  and "unlink" in error messages.
2017-08-05 12:59:03 +00:00
Christoph Moench-Tegeder
609d1acfeb add myself to calendar.freebsd
Reported by:	mckusick
2017-08-05 10:03:47 +00:00
Konstantin Belousov
1e94ddb453 Provide more detailed specification for major(), minor() and makedev().
Remove some statements which are no longer correct after ino64, and
clarify other.

The rewording is not in fact specific to ino64 and improvements are
useful on the stable branches.

Noted and reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-08-05 07:52:15 +00:00
Jung-uk Kim
0105034487 Detect hypervisors early. We used to set lower hz on hypervisors by default
but it was broken since r273800 (and r278522, its MFC to stable/10) because
identify_cpu() is called too late, i.e., after init_param1().

MFC after:	3 days
2017-08-05 06:56:46 +00:00
Cy Schubert
11b5e0cd9c loadpoolfile() implements a -R (NORESOLVE) option which is not listed
in usage(). This commit trues up usage() with loadpoolfile().
2017-08-05 06:46:06 +00:00
Toomas Soome
07672e9c19 libefi/time.c cstyle cleanup
libefi/time.c is mix of different styles, this update does cleanup.
Also fix 0 versus NULL, and zero the tv structure for case we get error
from UEFI firmware.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D11861
2017-08-05 05:20:03 +00:00
Cy Schubert
a3329e0129 Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery).
MFC after:	1 month
2017-08-05 00:28:42 +00:00
Matt Joras
fdf2bc100e Selectively print "hwaddr" from ifconfig(8).
ifconfig(8) printing the hwaddr is only really useful if it differs from
the link layer address.

Reported by:	jhb
Reviewed by:	rpokala
Approved by:	rstone (mentor)
Differential Revision:	https://reviews.freebsd.org/D11777
2017-08-04 21:06:47 +00:00
Konstantin Belousov
e28f262a86 Fix off by one in calculation of the number of buckets for the pc
addresses.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D11864
2017-08-04 18:02:54 +00:00
Warner Losh
9990efd2e2 Move EFI fmtdev functionality to libefi
This patch moves code necessary for the fmtdev functionality from
loader to libefi, allowing other applications to make use of it

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11862
2017-08-04 16:33:36 +00:00
Navdeep Parhar
019c1a0111 cxgbe(4): Allow the TOE timer tunables to be set with microsecond
precision.  These timers are already displayed in microseconds in the
sysctl MIB.  Add variables to track these tunables while here.

MFC after:	3 days
Sponsored by:	Chelsio Communications
2017-08-04 15:57:10 +00:00
Mariusz Zaborski
73979478cc Introduce the flopenat(3) function.
Reviewed by:	des, emaste
Differential Revision:	https://reviews.freebsd.org/D11690
2017-08-04 14:24:24 +00:00
Andrew Turner
49f347f450 Start to teach the GICv3 driver about NUMA. On ThunderX we may have
multiple ITS devices, however we only want a single ITS device to be
configured on each CPU. To fix this only enable ITS when the node matches
the CPUs node.

Sponsored by:	DARPA, AFRL
2017-08-04 13:08:45 +00:00
Dag-Erling Smørgrav
d93a896ef9 Upgrade to OpenSSH 7.5p1. 2017-08-04 12:57:24 +00:00
Andrew Turner
dbba8930ce Read the numa-node-id property from each CPU node. This will initially be
used to support the dual package ThunderX where we need to send MSI/MSI-X
interrupts to the same package as the device the interrupt came from.

Sponsored by:	DARPA, AFRL
2017-08-04 10:33:22 +00:00
Konstantin Belousov
4e93dbdf47 Relax visibility for some termios symbols.
They are defined by XSI or newer SUS.
This is a follow-up to r318780.

Reported by:	jbeich
Obtained from:	DragonflyBSD commit e08b3836c962
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-08-04 09:45:40 +00:00
Brad Davis
4426f42906 Document usb verbosity levels
Submitted by:	Tom Jones <jones@sdf.org>
Approved by:	hselasky
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11850
2017-08-04 08:56:31 +00:00
Alan Cox
ba98e6a2d7 In case readers are misled by expressions that combine multiplication and
division, add parentheses to make the precedence explicit.

Submitted by:	Doug Moore <dougm@rice.edu>
Requested by:	imp
Reviewed by:	imp
MFC after:	1 week
X-MFC after:	r321840
Differential Revision:	https://reviews.freebsd.org/D11815
2017-08-04 04:23:23 +00:00
Warner Losh
f48bfebce1 Add EFI utility functions to libefi
This patch adds additional EFI utility functions to convert errno
values to EFI_STATUS errors, as well as EFI times to UNIX times.

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11858
2017-08-04 04:20:11 +00:00
Warner Losh
457ea3bce3 Move EFI ZFS functions to libefi
This patch moves some EFI ZFS functions from loader to libefi,
allowing them to be used by anything that links against libefi.

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11855
2017-08-04 04:20:06 +00:00
Warner Losh
acf82d2659 Add definitions and utilities for EFI drivers
This patch adds definitions and utility code for creating EFI drivers
using the EFI_DRIVER_BINDING_PROTOCOL.

Submitted by: Eric McCorkle
Differential Revision: https://reviews.freebsd.org/D11852
2017-08-04 04:16:41 +00:00
Warner Losh
fac7b28779 Add stpcpy and stpncpy to libstand
This adds the stpcpy and stpncpy functions to libstand.

Differential Revision: https://reviews.freebsd.org/D11844
2017-08-04 03:48:17 +00:00
Warner Losh
8a5d94f94d Make nvd vs nda choice boot-time rather than build-time
Introduce hw.nvme.use_nvd tunable. This tunable allows both nvd and
nda to be installed in the kernel, while allowing only one of them to
create devices. This is an all-or-nothing setting, and you can't
change it after boot-time. However, it will allow easier A/B testing.

Differential Revision: https://reviews.freebsd.org/D11825
2017-08-04 03:40:01 +00:00
Alan Cox
0c75fcfe73 Add myself. 2017-08-04 03:20:01 +00:00
Navdeep Parhar
6320b0f850 cxgbe(4): Always use the first and not the last virtual interface
associated with a port in begin_synchronized_op.

MFC after:	3 days
Sponsored by:	Chelsio Communications
2017-08-04 01:28:06 +00:00
Mark Johnston
963307726d Fix procstat --libxo -L.
- Use the title role for column headers.
- Fix a typo in a field name (lpwid -> lwpid).
- Place the fields of different threads in separate containers.
2017-08-03 22:41:34 +00:00
Conrad Meyer
6f240e18b5 x86: Tag some intrinsics with __pure2
Some C wrappers for x86 instructions do not touch global memory and only act
on their arguments; they can be marked __pure2, aka __const__.  Without this
annotation, Clang 3.9.1 is not intelligent enough on its own to grok that
these functions are __const__.

Submitted by:	Anton Rang <anton.rang AT isilon.com>
Sponsored by:	Dell EMC Isilon
2017-08-03 22:28:30 +00:00
Jeremie Le Hen
4542ad8688 Remove deprecation notice for ruptime/rwho/rwhod.
PR:		220953
Reported by:	peter
2017-08-03 21:37:57 +00:00
Mark Johnston
a95435cfed Bump the maximum file name length in pseudofs filesystems to 48.
The previous limit of 24 was somewhat restrictive, and with this change
ceil(log2(sizeof(struct pfs_node))) is the same as before in both the ILP32
and LP64 models, so the malloc zone used for allocations of struct pfs_node
is the same as before.

Approved by:	des
2017-08-03 21:35:53 +00:00
Jeremie Le Hen
881d286b1d rwho/ruptime/rwhod shouldn't be gated by RCMDS.
PR:		220953
Reported by:	peter@
Differential Revision:	https://reviews.freebsd.org/D11743
2017-08-03 21:30:12 +00:00
Mark Johnston
f2ec04a394 Add subsystem vendor and device ID fields to struct pci_dev.
MFC after:	1 week
2017-08-03 21:14:46 +00:00
Emmanuel Vadot
c31654c5b6 arm: Add a GENERIC-NODEBUG kernel config
Like amd64 or arm64 provide a GENERIC-NODEBUG configuration file that
remove WITNESS and INVARIANTS etc ...
2017-08-03 19:01:46 +00:00
Ian Lepore
ba60088b16 Add missing header file to SRCS.
Reported by:	manu@
2017-08-03 18:49:15 +00:00
Ian Lepore
094e5e7e12 Switch to iicdev_readfrom/writeto() to do xfers with proper bus ownership.
Tested by:	manu@
2017-08-03 18:43:54 +00:00