Commit Graph

227726 Commits

Author SHA1 Message Date
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Pedro F. Giffuni
2321c47418 include: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:45:28 +00:00
Pedro F. Giffuni
51369649b0 sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:43:44 +00:00
Pedro F. Giffuni
7282444b10 sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:36:21 +00:00
Vladimir Kondratyev
3e10195c86 evdev: change USB scancode 0x54 from KEY_SLASH to KEY_KPSLASH
Submitted by:		dumbbell
Reviewed by:		gonzo, wulf
Approved by:		gonzo (mentor)
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D12983
2017-11-20 19:25:22 +00:00
Vladimir Kondratyev
b12ac17ef1 Fix evdev codes for slash and asterisk numpad keys of AT-keyboards
Reviewed by:	gonzo
Approved by:	gonzo (mentor)
MFC after:	2 weeks
2017-11-20 19:20:05 +00:00
Vladimir Kondratyev
303dbb854f evdev: Export EVDEV_SUPPORT kernel option through feature facility
Suggested by:	netchild
Reviewed by:	gonzo
Approved by:	gonzo (mentor)
MFC after:	1 week
2017-11-20 19:17:43 +00:00
Glen Barber
2833897f35 Use chroot(8) when invoking realpath(1) when setting BOOTFILES,
otherwise realpath(1) exits due to a nonexistent directory.

Sponsored by:	The FreeBSD Foundation
2017-11-20 15:03:03 +00:00
Xin LI
b2ea244070 MFV r326007: less v529.
MFC after:	2 weeks
2017-11-20 08:52:33 +00:00
Xin LI
ee3dcfe98f Vendor import of less v529. 2017-11-20 06:53:49 +00:00
Justin Hibbits
727ca2fdfd Eliminate 1 XX_VirtToPhys() and 2 XX_PhysToVirt() calls from if_dtsec(4)
XX_VirtToPhys(), by way of pmap_kextract(), is an expensive operation.
Profiling via dtrace during a series of iperf tests I found 16111 / 30432
stack frames were located in mmu_booke_kextract(), so eliminating this
expensive call should improve performance slightly.  XX_PhysToVirt() is not
as expensive, but redundant calls in this context is wasteful.
2017-11-20 04:32:01 +00:00
Andriy Voskoboinyk
c92451ae9d Reduce code duplication for wlan(4) interface creation in network.subr.
Since wlandebug(8) can accept any (original or changed) interface name
this part may be simplified a bit.
2017-11-19 20:18:21 +00:00
Andriy Voskoboinyk
e989c74331 wlandebug(8): allow fallback to old behavior + improve name checks.
- Treat passed interface name as original if ifconfig_get_orig_name() fails.
- Reject interface name if it does not start from "wlan".
2017-11-19 20:13:11 +00:00
Yoshihiro Takahashi
d12546572d Remove empty directories. 2017-11-19 11:33:46 +00:00
Konstantin Belousov
319a53f5ad Fix build.
Sponsored by:	The FreeBSD Foundation
2017-11-19 11:21:16 +00:00
Xin LI
11d38f2ca0 Remove unused header. 2017-11-19 03:52:03 +00:00
Xin LI
eafe4941b3 Remove unused header. 2017-11-19 03:51:47 +00:00
Kyle Evans
c4717ac049 aw_nmi: add support for a31/a83t's r_intc
We currently support the a83t's r_intc in a somewhat hack-ish way; our .dts
describes it as nmi_intc, and uses a subset of the actual register space to
make it line up with a20/a31 nmi offsets.

This breaks with the recent 4.14 update describing r_intc using the full
register space, so update aw_nmi to use the correct register offsets with
the right compat data in a way that doesn't break our current dts with
nmi_intc or upstream with r_intc described.

Reviewed by:	manu
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D13122
2017-11-19 03:14:10 +00:00
Brad Davis
6be8e27be0 Add missing call to services_mkdb to build the services.db
Approved by:	gjb
2017-11-19 02:16:11 +00:00
Ed Maste
4a8dea8cf9 ANSIfy sys/libkern
PR:		223641
Submitted by:	ota@j.email.ne.jp
MFC after:	1 week
2017-11-19 00:31:13 +00:00
Emmanuel Vadot
dab900583d dts: arm64: allwinner: Remove unused dts for pine64
Latest u-boot port provide the dts for pine64, remove our custom
and outdated dts for this board.
2017-11-18 21:39:54 +00:00
Bryan Drewery
4a76893d57 Remove unneeded special case for .OBJDIR=.CURDIR.
The else statement is already handling this by ensuring a safe .OBJDIR is used.

Sponsored by:	Dell
2017-11-18 21:27:33 +00:00
Emmanuel Vadot
3f9ade0643 if_awg: drain tx buffers and clear rx buffers when stopping
Stale packets should not be transmitted when the interface comes up after being down.
Count the successfully transmitted ones for statistics and drop the rest.

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D12539
2017-11-18 21:12:06 +00:00
Emmanuel Vadot
bd9063297c if_awg: avoid hole in the rx ring buffer when mbuf allocation fails
Use a spare dma map when attempting to map a new mbuf on the rx path.
If the mbuf allocation fails or the dma map loading for the new mbuf fails just reuse the old mbuf
and increase the drop counter.

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D12538
2017-11-18 21:08:18 +00:00
Emmanuel Vadot
337c6940a9 if_awg: rename tx functions to match other drivers and free mbuf on m_collapse failure
- use awg_encap and awg_txeof names to match iflib and other network drivers.
- handle m_collapse failure similarly by freeing the mbuf rather than reenqueuing it where it will continue to fail.

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D13035
2017-11-18 21:04:39 +00:00
Emmanuel Vadot
0d2abe1e2b if_awg: don't process transmitted packets on TX_BUF_UA_INT, only on TX_INT
TX_BUF_UA_INT is set when there are no buffers to transmit and can
happen before hw.awg.tx_interval segments have been transmitted.

To reduce load, tx cleanup should be done in hw.awg.tx_interval intervals.

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D13034
2017-11-18 20:59:20 +00:00
Emmanuel Vadot
f179ed0561 if_awg: replace multiple calls to if_setdrvflagbits with one call in awg_txintr
Small optimization

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D13033
2017-11-18 20:55:37 +00:00
Emmanuel Vadot
09e2285c4c if_awg: only increment IFCOUNTER_OPACKETS when the last segment of a frame has been successfully transmitted
A packet may be built from multiple segments, don't increase the count for each segment

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D13032
2017-11-18 20:50:31 +00:00
Emmanuel Vadot
fce9d29f8d if_awg: store mbuf and dma mapping in the last segment of a tx frame instead of the first
According to the datasheet, TX_DESC_CTL is cleared when whole frame is transmitted or all
data in the current descriptor's buffer are transmitted.
When the mbuf and mapping are stored in the first segment and in a scenario where a tx
completion interrupt arrives for a frame and only the start of the next frame was transmitted,
at the time of interrupt processing the mbuf and mapping will be freed when processing the
first segment of the next frame but the other untrasmitted segments still need to use them.

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D13031
2017-11-18 20:46:31 +00:00
Emmanuel Vadot
c6110e7514 if_awg: mark the first tx descriptor as ready only after all the other tx descriptors are set up
In a multi segment frame, if the first tx descriptor is marked with TX_DESC_CTL
but not all tx descriptors for the other segments in the frame are set up,
the TX DMA may transmit an incomplete frame.
To prevent this, set TX_DESC_CTL for the first tx descriptor only when done
with all the other segments.

Also, don't bother cleaning transmitted tx descriptors since TX_DESC_CTL
is cleared for them by the hardware and they will be reprogrammed before
TX_DESC_CTL is reenabled for them.

Submitted by:	Guy Yur <guyyur@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D13030
2017-11-18 20:42:48 +00:00
Emmanuel Vadot
1ee5a3d3b2 if_awg: only request completion interrupt on the last descriptor of a tx frame
The hardware will not issue a completion interrupt for a descriptor
with TX_INT_CTL set if it doesn't also have TX_LAST_DESC set.

Submitted by:	 Guy Yur <guyyur_gmail.com>
Differential Revision:	https://reviews.freebsd.org/D13029
2017-11-18 20:38:05 +00:00
Hans Petter Selasky
b108f35740 Remove duplicate static function prototype to fix compilation of
mlx5_fs_tree.c after r325638 when using GCC.

Found by:	kib @
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2017-11-18 20:32:09 +00:00
Bryan Drewery
f70bac6449 Evaluate options after including src-env.conf and before Makefile.sys.inc.
Fixes top-level breakage in r325974.

Pointyhat to:	bdrewery
Sponsored by:	Dell
2017-11-18 20:10:36 +00:00
Bryan Drewery
7e0aabd961 Fix top-level targets with read-only OBJDIR.
This also makes it so that top-level build targets do not immediately create
the OBJDIR.  Only sub-make targets will do so.  This avoids creating object
directories for targets like 'make check-old' or creating unneeded
MACHINE.MACHINE_ARCH directories during 'make tinderbox'.

Reported by:	npn, lifanov
Tested by:	npn, Mark Millard
Sponsored by:	Dell
2017-11-18 20:01:15 +00:00
Bryan Drewery
a7fa261e37 Move top-level AUTO_OBJ logic to Makefile.sys.inc.
Sponsored by:	Dell
2017-11-18 20:01:12 +00:00
Bryan Drewery
f778955213 Include Makefile.sys.inc if possible for top-level only.
This will allow disabling some things like AUTO_OBJ early if not needed for the
directory/targets, without putting special logic into share/mk/*.sys.mk.

Sponsored by:	Dell
2017-11-18 20:01:09 +00:00
Bryan Drewery
b00ea69b51 Fix PORTS_MODULES+'make reinstallkernel' trying to run bogus 'make redeinstall'.
Also fix 'make installkernel' running 'make deinstall' twice.

PR:		201779
MFC after:	2 weeks
Sponsored by:	Dell
2017-11-18 20:01:05 +00:00
Bryan Drewery
3faecc70e8 Fix 'make -n' for {reinstall,distribute}kernel.
PR:		201779
Sponsored by:	Dell
2017-11-18 20:01:02 +00:00
Emmanuel Vadot
7847756781 dts: Allwinner: Remove our last custom DTS
All Allwinner boards should use the upstream DTS so remove our
remaining custom ones.
2017-11-18 16:07:53 +00:00
Emmanuel Vadot
518cc4989e Update our copy of DTS from the ones from Linux 4.14 2017-11-18 15:46:48 +00:00
Mariusz Zaborski
3aa239f187 Remove unused Casper configurations files.
This is a reaming of Casper daemon.
2017-11-18 15:34:31 +00:00
Pedro F. Giffuni
df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Edward Tomasz Napierala
ef4968d9e7 Increase rtld initial memory pool size from 32kB to 128kB.
The old value was probably fine back in 1998, when that code was imported
(although the comments still mention VAX, which was quite obsolete by then);
now, however, it's too small to handle our libc, which results in some
additional calls to munmap/mmap later on.  Asking for more virtual address
space is virtually free, and syscalls are not, thus the change.

It was suggested by kib@ that this might be a symptom of a deeper problem.
It doesn't only affect libc, though - the change also improves rtld memory
management for eg KDE libraries.  I guess it's just a natural bloat.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12834
2017-11-18 13:21:22 +00:00
Bjoern Heidotting
95197f47ff Remove leftover in lagg(4) manpage forgotten in r271733
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D13061
2017-11-18 11:58:35 +00:00
Mateusz Guzik
284194f183 locks: fix compilation issues without SMP or KDTRACE_HOOKS 2017-11-17 23:27:06 +00:00
Andrey V. Elsukov
66f84fabb3 Add comment for accidentally committed unrelated change in r325960.
Do not invoke IPv4 NAT handler for non IPv4 packets. Libalias expects
a packet is IPv4. And in case when it is IPv6, it just translates them
as IPv4. This leads to corruption and in some cases to panics.
In particular a panic can happen when value of ip6_plen modified to
something that leads to IP fragmentation, but actual packet length does
not match the IP length.

Packets that are not IPv4 will be dropped by NAT rule.

Reported by:	Viktor Dukhovni <freebsd at dukhovni dot org>
MFC after:	1 week
2017-11-17 23:25:06 +00:00
Navdeep Parhar
879462e916 cxgbe(4): Add core Vdd to the sysctl MIB.
Sponsored by:	Chelsio Communications
2017-11-17 23:22:39 +00:00
Andrey V. Elsukov
e11f0a0c4c Unconditionally enable support for O_IPSEC opcode.
IPsec support can be loaded as kernel module, thus do not depend from
kernel option IPSEC and always build O_IPSEC opcode implementation as
enabled.

Obtained from:	Yandex LLC
MFC after:	1 week
Sponsored by:	Yandex LLC
2017-11-17 22:40:02 +00:00
Alan Somers
1a69c11aab Add assertion in probedone() that we're holding the device lock.
Submitted by:	ken
Reviewed by:	asomers
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
2017-11-17 20:53:52 +00:00
Mateusz Guzik
18f23540d8 lockmgr: remove the ADAPTIVE_LOCKMGRS option
The code was never enabled and is very heavy weight.

A revamped adaptive spinning may show up at a later time.

Discussed with:	kib
2017-11-17 20:41:17 +00:00