Commit Graph

215306 Commits

Author SHA1 Message Date
Eric Badger
6ff6aea629 Fix missing substitution of @SBINDIR@ in resolvconf scripts
Certain features, such as resolv_conf_passthrough=NULL, do not work
correctly due to this missing substitution.

Also remove the @PREFIX@ substitution, which is no longer needed.

Reviewed by:	pfg
Approved by:	vangyzen (mentor)
MFC after:	1 week
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D7572
2016-08-23 02:06:20 +00:00
Pedro F. Giffuni
16c2e36059 indent(1): add some comments to quiet down Coverity.
Hopefully adding comments should help explain the code to both static
checkers and humans.

CID:	976543, 976544, 976545
Obtained from:	Piotr Stephaniak
2016-08-23 01:58:02 +00:00
Pedro F. Giffuni
f3c23ec321 indent(1): Fix memory leaks pointed out by clang-analyzer.
Shift the responsibility of allocating memory for the string duplicate
from the caller (set_option, add_typedefs_from_file) to the callee
(add_typename) as it has more knowledge about when the duplication
actually needs to occur.

Taken from:	Piotr Stefaniak
2016-08-23 01:40:45 +00:00
Emmanuel Vadot
728af0b7fc Do not include file from dt-bindings and simply use the already present defines.
Reported by:	jmcneill
MFC after:	1 week
2016-08-23 00:46:22 +00:00
Bryan Drewery
fa6d79e80b Rename ORDERED to BOOTSTRAP since no order is respected in the list.
The directories in SUBDIR_ORDERED are built in parallel, so the name is
misleading.

MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2016-08-22 22:51:10 +00:00
Bryan Drewery
34ce63e5aa For 'make <directory>' hook into the all_subdir_<directory> targets.
This fixes parallel build issues when trying to depend on ${SUBDIR}.  An
example of this in share/i18n/csmapper/Makefile where mapper.dir depends
on ${SUBDIR} having been traversed and built already.  Before this
change running make in that directory would build the subdirectories
twice.  This led to obscure build races.  While reworking that build
may be possible, the framework should not so easily allow creating such
problems.

Now depending on <directory> will properly redirect to the
all_subdir_<directory> target rather than invoking the inline shell.

This also makes 'make -jX <directory>' now respect any
SUBDIR_DEPEND_<directory> statements when SUBDIR_PARALLEL is defined.
This is not entirely intended and may be changed later.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-08-22 22:51:07 +00:00
Bryan Drewery
d9bb42153a Always define the various <target>_subdir_<directory> targets, even if not used.
This is part of an effort to cleanup handling of some edge cases
involving 'make <directory>'.  It also provides the targets for
other uses.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-08-22 22:51:04 +00:00
Bryan Drewery
e54caebe4d Stop using _SUBDIR internally for non-SUBDIR_PARALLEL builds.
This is unifying more of the logic.  Rather than create targets such
as 'all: all_subdir_foo' when using SUBDIR_PARALLEL and using
'all: _SUBDIR' when not using SUBDIR_PARALLEL, always use the
expanded out <target>_subdir_<directory> pattern.  When not using
SUBDIR_PARALLEL, have each directory-target depend on the previously
defined targets as to respect the *order* of SUBDIR.

Using 'make -N' now prints all directory traversals individually rather
than using a loop, since a loop is no longer used to traverse.

This is part of an effort to cleanup handling of some edge cases
involving 'make <directory>' and making it simpler in the sense
that the pattern used to build is the same for all modes.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-08-22 22:51:01 +00:00
Bryan Drewery
6ea8e4de48 Fix building on read-only source trees.
This partially reverts r296702 and reworks the original check to only
look in .CURDIR.  This avoids ever trying to rebuild a .src file that is
already in the source tree as an override.

PR:		211952
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
2016-08-22 22:50:58 +00:00
Andrey A. Chernov
d34d90a89d 1) Back out r304607 case 2). fgetwln() as its pair fgetln() supposed to
return partial line on any errors. See the comment in fgetln.c.
Add corresponding comment to fgetwln() too.
2) Rewrite r304607 case 1).
3) Remove "Fast path" from __fgetwc_mbs() since it can't detect encoding
errors and ignores them all.

PR:     212033
MFC after:      7 days
2016-08-22 22:28:41 +00:00
Jung-uk Kim
69afce5e64 Prefer C-style comments in assembly sources. 2016-08-22 21:49:17 +00:00
Jung-uk Kim
0f7bb790d3 Fix white spaces in assembly sources. 2016-08-22 21:30:59 +00:00
John Baldwin
a47632d45b Fix build for !SMP kernels after the Xen MSIX workaround.
Move msix_disable_migration under #ifdef SMP since it doesn't make sense
for !SMP kernels.

PR:		212014
Reported by:	Glyn Grinstead <glyn@grinstead.org>
MFC after:	3 days
2016-08-22 21:23:17 +00:00
Jung-uk Kim
43e4bca77d Build OpenSSL assembly sources for arm. Tested with Raspberry Pi 2 Model B.
MFC after:	1 week
2016-08-22 20:59:34 +00:00
Ollivier Robert
6eb79b4759 Remove support for SSH1 as it is already disabled in our OpenSSH.
Submitted by:	vangyzen
MFC after:	2 weeks
2016-08-22 20:48:46 +00:00
Hans Petter Selasky
f81d0b43f1 Don't separate the status stage of the XHCI USB control transfers into
its own job because this breaks the simplified QEMU XHCI TRB parser,
which expects the complete USB control transfer as a series of back to
back TRBs. The old behaviour is kept under #ifdef in case this change
breaks enumeration of any USB devices.

PR:		212021
MFC after:	1 week
2016-08-22 19:32:50 +00:00
Ollivier Robert
6533da453a Add support for Ed25519 keys.
Reported by:	mwlucas
MFH:		2 weeks
2016-08-22 19:27:20 +00:00
Andrew Turner
724c3e47f6 Fix the arm64 non-SMP build, active_irq is a uint64_t so cast it through
a uintmax_t.

Obtained from:	ABT Systems Ltd
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-08-22 19:05:11 +00:00
Ed Maste
4620ba2e32 Remove duplicate symbol from libhx509 version-script.map
Upstream commit r21331 (7758a5d0) added semiprivate function
_hx509_request_to_pkcs10 twice. This change has been committed upstream
as 8ef0071d.
2016-08-22 18:50:57 +00:00
Emmanuel Vadot
ad1913f42a Fix building for ARM kernel that have FLASHADDR, PHYSADDR and LOADERRAMADDR defined.
Pointy Hat: myself

Reported by:	bz
2016-08-22 18:33:56 +00:00
Andrew Turner
1d479540a5 Ensure map is valid, even before userland exists and the fault address
register points to an address in the userland range.

Obtained from:	ABT Systems Ltd
MFC after:	1 week
Sponsored by:	the FreeBSD Foundation
2016-08-22 18:19:46 +00:00
John Baldwin
702d2626c7 Remove cross references to el(4) and ie(4). 2016-08-22 18:17:29 +00:00
Andrew Turner
8e7fcbc322 Fix pmap_update_entry, pmap_invalidate_range takes the end address, not
the size.

Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-08-22 18:12:44 +00:00
Ed Maste
051ea71782 Regenerate src.conf.5 after r304616 2016-08-22 17:53:18 +00:00
Ed Maste
8a9745b5e5 Forcibly disable MK_TESTS if building without C++
Several atf components require C++, and the test suite is not usable
if building WITHOUT_CXX.

Reviewed by:	bdrewery, jmmv
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D7597
2016-08-22 17:45:30 +00:00
Ed Schouten
8b0a83cce2 Make CloudABI work on i386.
Copy over amd64's cloudabi64_sysvec.c into i386 and tailor it to work.
Again, we use a system call convention similar to FreeBSD, except that
there is no support for indirect system calls (%eax == 0).

Where i386 differs from amd64 is that we have to store thread/process
entry arguments on the stack instead of using registers. We also have to
put an extra pointer on the stack for TLS (for GSBASE). Place that
pointer in the empty slot that is normally used to hold return
addresses. That seems to keep the code simple.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D7590
2016-08-22 17:37:31 +00:00
Bruce Evans
ded67349a3 Further fixes for translation of PrintScreen/SysRq.
The previous fix was tested mainly on 3 AT keyboards with USB adaptors where
it works.  1 USB keyboard doesn't translate Alt-PrintScreen, so the software
has to do it.

Reorganize a little to share some code and to not translate the unusual usb
scan code0x8a unless an Alt modified is set.  Remove redundant check of Alt
modifiers.  Translation now more clearly filters out Alt-PrintScreen before
the check.

The table of errors fixed in the previous commit had many bugs.  Correct
table:

K_RAW  Ctl-PrintScreen:                                 E0-2A-E0-37 -> E0-37
K_RAW  Alt-PrintScreen (with 4 comb. of Ctl/Shift):     79 -> 54
K_RAW  Pause/Break (with 4 comb. of Alt/Shift):         E0-46 -> E1-1D-45
K_CODE PrintScreen (with 4 comb. of Ctl/Shift):         54 -> 5c
K_CODE Alt-PrintScreen (with 4 comb. of Ctl/Shift):     7e -> 54
K_CODE Pause/Break (with 8 comb. of Ctl/Alt/Shift):     6c -> 68

That is 25 of 32 shift combinations for 2 keys fixed.  All 16 combinations
were broken for K_CODE and thus also for K_XLATE.
2016-08-22 16:39:51 +00:00
Bryan Drewery
200fa97664 Bump __FreeBSD_version for C++11 thread_local support in r303795.
PR:		192320
2016-08-22 15:52:03 +00:00
Andrey A. Chernov
4ae83079a7 Fix error processing.
1) Don't forget to set __SERR on __slbexpand() error.
2) Check for __fgetwc() errors using errno. Don't check for __SERR
as PR suggested, it user-visible flag which can stick from previous
functions and stdio code don't check it for this purpose.

PR:     212033
MFC after:      3 days
2016-08-22 15:44:54 +00:00
Ryan Stone
23424a2021 Temporarily disable the optimization from r304436
r304436 attempted to optimize the handling of incoming UDP packet by only
making an expensive call to in_broadcast() if the mbuf was marked as an
broadcast packet.  Unfortunately, this cannot work in the case of point-to-
point L2 protocols like PPP, which have no notion of "broadcast".

Discussions on how to properly fix r304436 are ongoing, but in the meantime
disable the optimization to ensure that no existing network setups are broken.

Reported by:	bms
2016-08-22 15:27:37 +00:00
Marcelo Araujo
f3ccb446d2 Fix calloc(3) argument order.
Reviewed by:	trasz
MFC after:	4 weeks.
Differential Revision:	https://reviews.freebsd.org/D7532
2016-08-22 15:01:39 +00:00
Andrew Turner
c7d40f1843 Use switch statements in pmap_remove_pages. While only one level of
pagetable is supported more will be added soon to support removing
superpages.

Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-08-22 14:53:39 +00:00
Conrad Meyer
c114e74120 ioat(4): Allow callouts to be scheduled after hw reset
is_completion_pending governs whether or not a callout will be scheduled
when new work is queued on the IOAT device.  If true, a callout is
already scheduled, so we do not need a new one.  If false, we schedule
one and set it true.  Because resetting the hardware completed all
outstanding work but failed to clear is_completion_pending, no new
callout could be scheduled after a reset with pending work.

This resulted in a driver hang for polled-only work.
2016-08-22 14:51:09 +00:00
Conrad Meyer
0283c0f581 ioat(4): Don't process events past queue head
Fix a race where the completion routine could overrun the active ring
area in some situations.
2016-08-22 14:51:07 +00:00
Hans Petter Selasky
351a9c7c0b Increase the maximum RX/TX queue size. This allows for a RX/TX queue
size of 16384 mbufs. Previously the limit was 8192.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-08-22 13:43:25 +00:00
Andrew Turner
a3c1bc2eae Use pmap_update_entry in pmap_enter when updating an entry with a new
physical address. This is required when either mapping is writeable.

While here remove an unneeded call to pmap_pde, we already have the pde
from earlier in the function.

Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-08-22 12:56:40 +00:00
Andrew Turner
aed6b9701b Add sysctls to report on superpages statistics. While here add extra
logging to these paths.

Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-08-22 12:17:40 +00:00
Andrew Turner
109dddc015 Add a size argument to pmap_update_entry.
Make use of this in pmap_promote_l2.

Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-08-22 10:50:30 +00:00
Hans Petter Selasky
7816434a4f Fix for invalid use of bits in input context. Basically split
configuring of EP0 and non-EP0 into xhci_cmd_evaluate_ctx() and
xhci_cmd_configure_ep() respectivly. This resolves some errors when
using XHCI under QEMU and gets is more in line with the XHCI
specification.

PR:		212021
MFC after:	1 week
2016-08-22 10:21:25 +00:00
Andrew Turner
1d32c3222e Add KASSERTS in pmap_alloc_l3 to ensure we are not encountering superpages
when we don't yet expect them;

Obtained from:	ABT Systems Ltd
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-08-22 10:21:09 +00:00
Sepherosa Ziehau
2e5573e6de hyperv/hn: Factor out function to simplify NVS request sending
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7578
2016-08-22 08:00:14 +00:00
Sepherosa Ziehau
8f556f2598 hyperv/hn: Factor out function to execute NVS transactions.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7577
2016-08-22 07:51:46 +00:00
Sepherosa Ziehau
ef56e63fb3 hyperv/hn: Get rid of netvsc_dev
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7575
2016-08-22 07:44:11 +00:00
Sepherosa Ziehau
fdd6031b04 hyperv/hn: Move chimney sending buffer to hn_softc
And don't recreate chimney sending buffer for each primary channel
open, it is now created in device_attach DEVMETHOD and destroyed
in device_detach DEVMETHOD.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7574
2016-08-22 07:34:39 +00:00
Pyun YongHyeon
bb7e9b3046 Add a missing change in r304575.
Noticed by:	jhb
2016-08-22 03:28:06 +00:00
Michael Tuexen
7fcbd928f8 Improve the locking when sending user messages.
First, keep a ref count on the stcb after looking it up, as
done in the other lookup cases.
Second, before looking again at sp, ensure that it is not
freed, because the assoc is about to be freed.

MFC after: 3 days
2016-08-22 01:45:29 +00:00
Pyun YongHyeon
066d6cbcef Add Killer E2400 to the supported hardware list. 2016-08-22 01:28:02 +00:00
Pyun YongHyeon
477cba21d2 Add Killer E2400 Gigabit Ethernet support.
It seems Killer E2200/E2400 has a BIOS misconfiguration or silicon
bug which triggers DMA write errors when driver uses advertised
maximum payload size.  Force the maximum payload size to 128 bytes
in DMA configuration.
This change should fix occasional DMA write errors reported on
Killer E2200.

Tested by:	<psy0nic@sys-tek.org>
2016-08-22 01:19:05 +00:00
Pyun YongHyeon
03b4253bb8 Correct DMA channel number selection on AR816x family of
controllers. For Gigabit Ethernet version of AR816x, AR813x/AR815x
except L1D controller, use vendor recommended ASPM parameters.
While here, increase alc_dma_burst array size.  Broken H/W can
return bogus value in theory.
2016-08-22 01:06:54 +00:00
Michael Tuexen
26a5d52f03 Remove duplicate code, which is not protected by the appropriate locks.
MFC after: 3 days
2016-08-22 00:40:45 +00:00