Commit Graph

219890 Commits

Author SHA1 Message Date
Dimitry Andric
65575c1424 Merge ^/head r312894 through r312967. 2017-01-29 22:00:47 +00:00
Dimitry Andric
98221d2e7e Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch
r293443, and update build glue.
2017-01-29 21:56:47 +00:00
Dimitry Andric
b025d011dd Vendor import of lld release_40 branch r293443:
https://llvm.org/svn/llvm-project/lld/branches/release_40@293443
2017-01-29 20:59:10 +00:00
Dimitry Andric
3efcd4e54b Vendor import of libc++ release_40 branch r293443:
https://llvm.org/svn/llvm-project/libcxx/branches/release_40@293443
2017-01-29 20:59:02 +00:00
Dimitry Andric
3dfdcbdf6f Vendor import of compiler-rt release_40 branch r293443:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@293443
2017-01-29 20:58:54 +00:00
Dimitry Andric
d1b6c770be Vendor import of clang release_40 branch r293443:
https://llvm.org/svn/llvm-project/cfe/branches/release_40@293443
2017-01-29 20:58:47 +00:00
Dimitry Andric
aac4ca60bc Vendor import of llvm release_40 branch r293443:
https://llvm.org/svn/llvm-project/llvm/branches/release_40@293443
2017-01-29 20:58:36 +00:00
Konstantin Belousov
a0f64f38a1 Do not leave stale 4K TLB entries on pde (superpage) removal or
protection change.

On superpage promotion, x86 pmaps do not invalidate existing 4K
entries for the superpage range, because they are compatible with the
promoted 2/4M entry.  But the invalidation on superpage removal or
protection change only did single INVLPG with the base address of the
superpage.  This reliably flushed superpage TLB entry, and 4K entry
for the first page of the superpage, potentially leaving other 4K TLB
entries lingering.  Do the invalidation of the whole superpage range
to correct the problem.

Note that the precise invalidation is done by x86 code for kernel_pmap
only, for user pmaps whole (per-AS) TLB is flushed.  This made the bug
well hidden, because promotions of the kernel mappings require
specific load.

Reported and tested by:	Jonathan Looney <jtl@netflix.com> (previous version)
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-29 19:14:48 +00:00
Luiz Otavio O Souza
d177868c16 The stf(4) interface name does not conform with the default naming
convention for interfaces, because only one stf(4) interface can exist
in the system.

This disallow the use of unit numbers different than 0, however, it is
possible to create the clone without specify the unit number (wildcard).

In the wildcard case we must update the interface name before return.

This fix an infinite recursion in pf code that keeps track of network
interfaces and groups:

1 - a group for the cloned type of the interface is added (stf in this
    case);
2 - the system will now try to add an interface named stf (instead of
    stf0) to stf group;
3 - when pfi_kif_attach() tries to search for an already existing 'stf'
    interface, the 'stf' group is returned and thus the group is added
    as an interface of itself;

This will now cause a crash at the first attempt to traverse the groups
which the stf interface belongs (which loops over itself).

Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-01-29 18:41:09 +00:00
Jason A. Harmening
d986450859 Implement get_pcpu() for i386 and use it to replace pcpu_find(curcpu)
in the i386 pmap.

The curcpu macro loads the per-cpu data pointer as its first step,
so the remaining steps of pcpu_find(curcpu) are circular.

get_pcpu() is already implemented for arm, arm64, and risc-v.
My plan is to implement it for the remaining architectures and use
it to replace several instances of pcpu_find(curcpu) in MI code.

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9370
2017-01-29 16:54:55 +00:00
Olivier Houchard
4943dc2d2c Correct the IT instruction in atomic_fcmpset_64().
Reported by:	andrew
2017-01-29 13:31:56 +00:00
Edward Tomasz Napierala
142c750ace Remove unused kern_sendfile() declaration. 2017-01-29 12:31:24 +00:00
Brooks Davis
a692daff31 Remove "-Xassembler -G0" from CFLAGS.
-G0 is sufficent except on old version of clang (<3.8) and such versions
are unlikely to be generally useful on mips64.

Reported by:	sbruno
Sponsored by:	DARPA, AFRL
2017-01-29 11:52:36 +00:00
Yoshihiro Takahashi
794e3f9ae0 - Remove i8255.h because it's pc98 device.
- rsa.h is for both RSA-DV/S ISA and RSA-98III CBUS, but there is no RSA-DV/S
  support.  So it can be removed.
2017-01-29 03:34:49 +00:00
Luiz Otavio O Souza
a5c1a50a26 Do not run the pf purge thread while the VNET variables are not
initialized, this can cause a divide by zero (if the VNET initialization
takes to long to complete).

Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-01-29 02:17:52 +00:00
Pedro F. Giffuni
4ceff30f95 Remove GCC's __nonnull() attribute definition.
While GCC's __nonnull__ attribute is generally useful to prevent misuse of
some functions it also tends to do rather dangerous "optimizations". Now
that we have replaced (r312934) all such uses with the clang nullability
qualifiers, the GCC attribute is unnecessary.

Remove the definition completely to prevent its use in system's headers.
2017-01-29 00:45:52 +00:00
Enji Cooper
dad206bd67 Update MACHINE/MACHINE_ARCH examples to use arm64/aarch64 instead of i386/pc98
pc98 support was removed in r312910
2017-01-29 00:24:34 +00:00
Enji Cooper
5832bcdca8 Remove non-existent ct(4) dependency for scsi_low.c
ct(4) was removed with pc98 in r312910
2017-01-29 00:12:06 +00:00
Marius Strobl
1bacf3be8c Fix overly long lines, whitespace and other bugs according to style(9). 2017-01-29 00:05:49 +00:00
Enji Cooper
2f6a7e426e Update TARGET/TARGET_ARCH examples to use arm64/aarch64 instead of i386/pc98
pc98 support was removed in r312910
2017-01-28 23:58:17 +00:00
Enji Cooper
bc53c94f82 Fix typo in lib/Makefile
The SUBDIR_DEPEND variable should be for librpcsec_gss, not
liblibrpc_gss

MFC after:	1 week
PR:		216409
Reported by:	mail@fbsd.e4m.org
2017-01-28 23:51:03 +00:00
Enji Cooper
17fc11dde6 Garbage collect pc98-only variables still referenced in sys/modules/Makefile
These should have been removed with r312910
2017-01-28 23:47:17 +00:00
Enji Cooper
dd59a8d033 Remove duplicate bhnd SUBDIR entry
MFC after:	1 week
PR:		216413
Reported by:	mail@fbsd.e4m.org
2017-01-28 23:41:38 +00:00
Pedro F. Giffuni
649702c5a3 Make use of clang nullability attributes.
Replace uses of the GCC __nonnull__ attribute with the clang nullability
qualifiers. The replacement should be transparent for clang developers as
the new qualifiers will produce the same warnings and will be useful for
static checkers but will not cause aggressive optimizations.

GCC will not produce such warnings and developers will have to use
upgraded GCC ports built with the system headers from r312538.

Hinted by:	Apple's Libc-1158.20.4, Bionic libc
MFC after:	11.1 Release

Differential Revision:	https://reviews.freebsd.org/D9004
2017-01-28 20:54:43 +00:00
Olivier Houchard
8406f869f4 Remove useless labels. 2017-01-28 17:48:33 +00:00
Olivier Houchard
14dd14fc00 Use strexeq instead of needlessly branch.
Suggested by:	ian
2017-01-28 17:46:04 +00:00
Andriy Voskoboinyk
2bbd06fc33 Garbage collect IFT_IEEE80211 (but leave the define for possible reuse)
This interface type ("a parent interface of wlanX") is not used since
r287197

Reviewed by:	adrian, glebius
Differential Revision:	https://reviews.freebsd.org/D9308
2017-01-28 17:08:40 +00:00
Baptiste Daroussin
b7a1807568 Really revert 312923 this time 2017-01-28 16:40:51 +00:00
Baptiste Daroussin
b4b4b5304b Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
Baptiste Daroussin
814aaaa7da Revert r312923 a better approach will be taken later 2017-01-28 16:30:14 +00:00
Olivier Houchard
dc5f9fcdae Implement atomic_fcmpset_* for arm and arm64. 2017-01-28 16:24:06 +00:00
Sean Bruno
835809f99f Fix i386 compile failure by moving needed closing parenthesis out of
conditional block.

Submitted by:   hiren
Reported by:    cy
2017-01-28 15:44:14 +00:00
Baptiste Daroussin
2e8e6c3a4f Make the drm2 module depend on linuxkpi
Use linux memory allocation to reduce diff with upstream
2017-01-28 15:43:19 +00:00
Robert Watson
f00e79c847 Merge enhancements to the ALTERA Avalon bus generic device attachment
driver to support exposing a GEOM device, which can be used to mount
Avalon-attached ROMs, reserved areas of DRAM, etc, as a filesystem:

commit 9deb1e60ea
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Sat Mar 5 20:33:12 2016 +0000

    Use format strings with make_dev(9) in avgen(4).

commit 0bf2176c23
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Tue Mar 1 10:23:23 2016 +0000

    Implement a new "geomio" configuration argument to altera_avgen(4),
    the generic I/O device we attach to various BERI peripherals.  The new
    option requests that, instead of exposing the underlying device via a
    special device node in /dev, it instead be exposed via geom(4),
    allowing it to be used with filesystems.  The current implementation
    does not allow a device to be exposed both for file/mmap and geom, so
    one of the two models must be selected when configuring it via FDT or
    device.hints.  A typical use of the new option will be:

      sri-cambridge,geomio = "rw";

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2017-01-28 13:25:06 +00:00
Hiroki Sato
2f1c643658 Fix a bug which caused not to create AF_LOCAL sockets when family
is specified.

Spotted by:	Alex Deiter
2017-01-28 13:09:18 +00:00
Robert Watson
95fadd99d5 Merge robustness improvements for the ALTERA JTAG UART driver from
CheriBSD, which attempt to work around an inherent race in the UART's
control-register design in detecting whether JTAG is currently,
present, which will otherwise lead to moderately frequent output
drops when running in polled rather than interrupt-driven operation.
Now, these drops are quite infrequent.

commit 9f33fddac9
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Thu Jul 16 17:34:12 2015 +0000

    Add a new sysctl, hw.altera_jtag_uart.ac_poll_delay, which allows the
    (default 10ms) delay associated with a full JTAG UART buffer combined
    with a lack of a JTAG-present flag to be tuned.  Setting this higher
    may cause some JTAG configurations to be more reliable when printing
    out low-level console output at a speed greater than the JTAG UART is
    willing to carry data.  Or it may not.

commit 73992ef760
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Sun Jan 1 15:13:07 2017 +0000

    Minor improvements to the Altera JTAG UART device driver:

    - Minor rework to the logic to detect JTAG presence in order to be a bit
      more resilient to inevitable races: increase the retry period from two
      seconds to four seconds for trying to find JTAG, and more agressively
      clear the miss counter if JTAG has been reconnected.  Once JTAG has
      vanished, stop prodding the miss counter.

    - Do a bit of reworking of the output code to frob the control register
      less by checking whether write interrupts are enabled/disabled before
      changing their state.  This should reduce the opportunity for races
      with JTAG discovery (which are inherent to the Altera
      hardware-software interface, but can at least be minimised).

    - Add statistics relating to interrupt enable/disable/JTAG
      discovery/etc.

    With these changes, polled-mode JTAG UART ttys appear substantially
    more robust.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2017-01-28 12:43:19 +00:00
Robert Watson
55e0d88afd Fix build of aio_test on MIPS, where the compiler warns about the local
variable 'err' shadowing the global function err(3).  Which it does.

Sponsored by:	DARPA, AFRL
2017-01-28 12:26:22 +00:00
Robert Watson
d166e6c63f As with GENERIC on other architectures, include COMPAT_FREEBSD10 and
COMPAT_FREEBSD11 in the generic BERI kernel configuration template.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2017-01-28 11:38:51 +00:00
Yoshihiro Takahashi
0a225f01e1 Remove more pc98 support. 2017-01-28 09:58:00 +00:00
Dexuan Cui
6597559ea7 ifnet: move the new ifnet_event EVENTHANDLER_DECLARE to net/if_var.h
Thank glebius for pointing this out:
"The network stuff shall not be added to sys/eventhandler.h"

Reviewed by:	David_A_Bright_DELL.com, sephe, glebius
Approved by:	sephe (mentor)
MFC after:	2 weeks
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D9345
2017-01-28 07:26:42 +00:00
Warner Losh
da5b9d11e9 Switch to Linux / device tree upstream names. U-boot uses these by
default, and the fewer changes relative to the upstream u-boot the
better.
Add compatibility links for the old names.
Add dts file for BeagleBone Green while we're here.
2017-01-28 05:07:55 +00:00
Warner Losh
2b372753e2 Honor LINKS=x y in dtb modules. We need this for compatibility links
for old, FreeBSD names.
2017-01-28 05:07:53 +00:00
Alan Somers
740a9bfadd Improve the aio tests
* Add tests for aio_suspend(2).
* Add tests for polled completion notification.
* Test the full matrix of file descriptor types and completion notification
  mechanisms.
* Don't bother with mkstemp, because ATF runs every test in its own temp dir.
* Fix some typos.
* Remove extraneous ATF_REQUIRE_KERNEL_MODULE calls.

Reviewed by:	jhb
MFC after:	4 weeks
Differential Revision:	https://reviews.freebsd.org/D9045
2017-01-28 04:33:51 +00:00
Yoshihiro Takahashi
f7c79dd679 Garbage collect the FPU_ERROR_BROKEN option.
It is for pc98 only.
2017-01-28 03:53:53 +00:00
Yoshihiro Takahashi
661cf9b682 Regen after r312910. 2017-01-28 02:25:33 +00:00
Yoshihiro Takahashi
2b375b4edd Remove pc98 support completely.
I thank all developers and contributors for pc98.

Relnotes:	yes
2017-01-28 02:22:15 +00:00
Sean Bruno
34bac11eba Add iflib man pages for developers.
Doc review is probably waranted here for editing.

Submitted by:	Nicole Graziano
2017-01-28 00:40:36 +00:00
Ed Maste
978f10562f ERL: set -march=octeon+ for use with external toolchain
Upstream GCC and devel/mips64-gcc use "octeon+" as the CPU setting for
the Octeon processor in the EdgeRouter Lite. As of r312899 the base
system GCC 4.2.1 accepts octeon+ as an alias for the Octeon support
added in r208737 for the same CPU.

Sponsored by:	The FreeBSD Foundation
2017-01-28 00:00:10 +00:00
Hiren Panchasara
6134aabe38 Add a knob to change default behavior of inheriting listen socket's tcp stack
regardless of what the default stack for the system is set to.

With current/default behavior, after changing the default tcp stack, the
application needs to be restarted to pick up that change. Setting this new knob
net.inet.tcp.functions_inherit_listen_socket_stack to '0' would change that
behavior and make any new connection use the newly selected default tcp stack.

Reviewed by:		rrs
MFC after:		2 weeks
Sponsored by:		Limelight Networks
2017-01-27 23:10:46 +00:00
John Baldwin
fbb779cca9 Unregister CPL handlers for TOE-related messages when unloading TOM.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2017-01-27 23:08:30 +00:00