pfg [Mon, 27 Nov 2017 15:23:17 +0000 (15:23 +0000)]
sys: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
No functional change intended.
pfg [Mon, 27 Nov 2017 15:20:12 +0000 (15:20 +0000)]
sys/kern: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:17:37 +0000 (15:17 +0000)]
sys/geom: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:16:59 +0000 (15:16 +0000)]
sys/gdb: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:15:37 +0000 (15:15 +0000)]
sys/fs: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:14:46 +0000 (15:14 +0000)]
sys/ddb: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:13:23 +0000 (15:13 +0000)]
sys/compat: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:12:43 +0000 (15:12 +0000)]
sys/cam: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:11:47 +0000 (15:11 +0000)]
sys/x86: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:10:39 +0000 (15:10 +0000)]
sys/sparc64: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:09:59 +0000 (15:09 +0000)]
sys/powerpc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:08:52 +0000 (15:08 +0000)]
sys/i386: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:07:26 +0000 (15:07 +0000)]
sys/mips: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:04:10 +0000 (15:04 +0000)]
sys/arm: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:03:07 +0000 (15:03 +0000)]
sys/amd64: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 15:01:59 +0000 (15:01 +0000)]
sys/sys: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Mon, 27 Nov 2017 14:52:40 +0000 (14:52 +0000)]
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
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.
dch [Mon, 27 Nov 2017 14:13:30 +0000 (14:13 +0000)]
add myself as ports committer, mentor jrm + swills
Approved by: jrm
Differential Revision: https://reviews.freebsd.org/D13268
trasz [Mon, 27 Nov 2017 12:50:26 +0000 (12:50 +0000)]
Add /etc/autofs/include_nis, a non-rewriting NIS map.
Submitted by: G. Paul Ziemba
Suggested by: asomers@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
trasz [Mon, 27 Nov 2017 12:46:18 +0000 (12:46 +0000)]
Rename /etc/autofs/include_nis to /etc/autofs/include_nis_nullfs, to indicate
that this script provides nullfs map rewriting for local mounts.
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
trasz [Mon, 27 Nov 2017 12:44:03 +0000 (12:44 +0000)]
Change formatting; no functional changes.
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
trasz [Mon, 27 Nov 2017 12:39:35 +0000 (12:39 +0000)]
Update intro(6) - remove hint that doesn't work, add explicit list
of games instead, and mention the "bsdgames" port.
Reviewed by: bcr@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D13196
trasz [Mon, 27 Nov 2017 12:37:14 +0000 (12:37 +0000)]
.Xr pmcstat(8) from kgmon(8) and gprof(1).
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
trasz [Mon, 27 Nov 2017 12:34:23 +0000 (12:34 +0000)]
Revert r326125.
It turns out kgmon(8) still works, and provides some functionality that's
not provided by pmcstat(8).
Reported by: bde@
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
phk [Mon, 27 Nov 2017 09:57:37 +0000 (09:57 +0000)]
Truncate negative lengths to zero
brd [Mon, 27 Nov 2017 04:24:48 +0000 (04:24 +0000)]
Fix another typo
Pointy hat to: oshogbo
delphij [Mon, 27 Nov 2017 04:15:03 +0000 (04:15 +0000)]
Don't assign rs as we will assign it later.
MFC after: 2 weeks
brd [Mon, 27 Nov 2017 02:28:40 +0000 (02:28 +0000)]
Fix handling -U. It does not take any arguments.
Approved by: will
mjg [Sun, 26 Nov 2017 21:10:47 +0000 (21:10 +0000)]
rw: fix runlock_hard when new readers show up
When waiters/writer spinner flags are set no new readers can show up unless
they already have a different rw rock read locked. The change in r326195 failed
to take that into account - in presence of new readers it would spin until
they all drain, which would be lead to trouble if e.g. they go off cpu and
can get scheduled because of this thread.
Reported by: pho
jhibbits [Sun, 26 Nov 2017 20:30:02 +0000 (20:30 +0000)]
Synchronize TLB1 mappings when created
This allows modules creating mappings to be loaded post-boot, after SMP has
started. Without this, the TLB1 mappings can become unsynchronized and lead
to kernel page faults when accessed on the alternate CPUs.
MFC after: 3 weeks
markj [Sun, 26 Nov 2017 19:17:55 +0000 (19:17 +0000)]
Move vm_phys_init_page() to vm_page.c.
Suggested by: kib
Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D13250
markj [Sun, 26 Nov 2017 19:16:45 +0000 (19:16 +0000)]
Remove unneeded initializations from vm_phys_init_page().
The page allocator always initializes the aflags and oflags fields.
Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D13242
tuexen [Sun, 26 Nov 2017 18:19:01 +0000 (18:19 +0000)]
Add to ipfw support for sending an SCTP packet containing an ABORT chunk.
This is similar to the TCP case. where a TCP RST segment can be sent.
There is one limitation: When sending an ABORT in response to an incoming
packet, it should be tested if there is no ABORT chunk in the received
packet. Currently, it is only checked if the first chunk is an ABORT
chunk to avoid parsing the whole packet, which could result in a DOS attack.
Thanks to Timo Voelker for helping me to test this patch.
Reviewed by: bcr@ (man page part), ae@ (generic, non-SCTP part)
Differential Revision: https://reviews.freebsd.org/D13239
mmel [Sun, 26 Nov 2017 16:41:30 +0000 (16:41 +0000)]
Addd work around for LLVM bug 35023.
Clang crashes when compiling zstd_compress.c with optimization for ARM targets.
https://bugs.llvm.org/show_bug.cgi?id=35023
imp [Sun, 26 Nov 2017 16:12:10 +0000 (16:12 +0000)]
Add efidp_format_device_path_node to format a single node in a device
path, much like efidp_format_device_path will format the entire path.
Sponsored by: Netflix
ed [Sun, 26 Nov 2017 14:56:23 +0000 (14:56 +0000)]
Add a Saved Process Status Register bit for AArch32 execution mode.
The documentation on the Saved Process Status Register (SPSR) is a bit
weird; the M[4] bit is documented separately from M[3:0]. The M[4] bit
can be toggled to switch to 32-bit execution mode. This functionality is
orthogonal to M[3:0].
Change the definition of PSR_M_MASK to no longer include M[4]. Add a new
definition, PSR_AARCH32 that can be used to toggle 32-bit independently.
This bit will be used by the cloudabi32 code to force execution of
userspace code in 32-bit mode.
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D13148
ed [Sun, 26 Nov 2017 14:53:56 +0000 (14:53 +0000)]
Correct some more places where TO_PTR() should be used.
These were missed in r326228.
MFC after: 2 weeks
ed [Sun, 26 Nov 2017 14:45:56 +0000 (14:45 +0000)]
Use TO_PTR() to convert integers to pointers.
For FreeBSD/arm64's cloudabi32 support, I'm going to need a TO_PTR() in
this place. Also use it for all of the other source files, so that the
difference remains as minimal as possible.
MFC after: 2 weeks
ed [Sun, 26 Nov 2017 14:28:27 +0000 (14:28 +0000)]
Make 32-bit system calls end up in svc_handler().
The nice thing about ARM64 is that it's pretty elegant to install
separate trap/exception handlers for 32-bit and 64-bit processes. That
said, for all other architectures (e.g., i386 on amd64) we always let
32-bit counterparts go through the regular system call codepath. Let's
do the same on ARM64.
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D13146
kib [Sun, 26 Nov 2017 10:02:43 +0000 (10:02 +0000)]
Improve sysctl(8) pretty printing of some structures.
S_vmtotal:
Use unsigned format to print unsigned memory counters from struct
vmtotal.
Remove unneeded cast, style locals declarations.
S_efi_map:
Make printing of the memory regions descriptions less MD by
using uintmax_t formats.
Noted by and discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
andrew [Sun, 26 Nov 2017 09:29:34 +0000 (09:29 +0000)]
Make the arm64 pmap_invalidate functions static inline. This fixes building
with DIAGNOSTIC.
PR: 223874
Reported by: emaste
MFC after: 1 week
cy [Sun, 26 Nov 2017 06:31:34 +0000 (06:31 +0000)]
Fix spelling error (probably typo).
delphij [Sun, 26 Nov 2017 04:55:23 +0000 (04:55 +0000)]
Fill in date.
nwhitehorn [Sun, 26 Nov 2017 04:34:13 +0000 (04:34 +0000)]
Remove another extern int n_slbs made redundant by declaring this in
mmu_oea64.h.
MFC after: 3 weeks
nwhitehorn [Sun, 26 Nov 2017 03:53:20 +0000 (03:53 +0000)]
Use the cookie now set by loader to determine whether the value passed to
PowerPC kernels in r6 is actually metadata from loader(8) or gibberish
left in r6, which is not required to be anything under the
PAPR/ePAPR/CHRP/OF standards, by another boot loader.
Note that, as a result, systems need a new boot loader to boot PPC kernels
after this revision without ending up at a mountroot prompt. New boot
loaders are backwards compatible and can boot older kernels.
Reviewed by: jhibbits
MFC after: 2 months
pfg [Sun, 26 Nov 2017 02:00:33 +0000 (02:00 +0000)]
lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.
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.
nwhitehorn [Sat, 25 Nov 2017 23:41:05 +0000 (23:41 +0000)]
Remove some, but not all, assumptions that the BSP is CPU 0 and that CPUs
are numbered densely from there to n_cpus.
MFC after: 1 month
nwhitehorn [Sat, 25 Nov 2017 23:23:24 +0000 (23:23 +0000)]
Avoid assumptions about the BSP being CPU 0.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 22:43:52 +0000 (22:43 +0000)]
On AIM systems, it is not actually possible to stop the CPU timer, so we
just set it to a large default value (and inherit any previously existing
value), hoping it never turns over. Instead, silently allow spurious
one-shots from rollovers.
MFC after: 10 days
nwhitehorn [Sat, 25 Nov 2017 22:42:05 +0000 (22:42 +0000)]
Return base IRQ of PIC when added and massively increase the number of
available IRQs per PIC for large systems.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 22:15:56 +0000 (22:15 +0000)]
Missed gate on __powerpc64__ for setting LPCR in r326207.
MFC after: 3 weeks
X-MFC-with: r326207
nwhitehorn [Sat, 25 Nov 2017 22:14:30 +0000 (22:14 +0000)]
When booting from an FDT, make sure the FDT itself isn't included the range
of available memory. Boot loaders are supposed to add a reserved entry for
it, but not all do.
MFC after: 2 weeks
nwhitehorn [Sat, 25 Nov 2017 22:13:19 +0000 (22:13 +0000)]
Allow platform modules to set the size of large pizes, as potentially
discovered from firmware, and better handle highly-discontiguous memory
and CPU maps.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 22:10:10 +0000 (22:10 +0000)]
Invalidate TLB at boot using the correct IS settings on newer-than-POWER5
CPUs.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 22:08:40 +0000 (22:08 +0000)]
Definitions for registers and trap types found on new POWER CPUs.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 22:06:40 +0000 (22:06 +0000)]
Missed platform_smp_timebase_sync() in r326205.
MFC after: 3 weeks
X-MFC-With: r326205
nwhitehorn [Sat, 25 Nov 2017 22:05:05 +0000 (22:05 +0000)]
Make n_slbs public in a more straightforward way. Some platforms (like
PowerNV) use firmware-assisted mechanisms to discover it and need access
to the variable.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 22:03:25 +0000 (22:03 +0000)]
Preserve the LPCR on new-ish (POWER7 and POWER8) CPUs, preventing exceptions
and such from ending on the wrong CPU on SMP systems. It would be good to
have this be more generic somehow as POWER9s appear, but PPC does not
have features bits, unfortunately.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 22:01:55 +0000 (22:01 +0000)]
Yield while spinning on APs and avoid announcing all CPUs unless bootverbose
is set. These improve startup performance on massively multithreaded systems
with 8-way SMT and dozens to hundreds of CPUs.
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 21:59:59 +0000 (21:59 +0000)]
Whether you can use mttb() or not is more complicated than whether PSL_HV
is set and the right thing to do may be platform-dependent (it requires
firmware on PowerNV, for instance). Make it a new platform method called
platform_smp_timebase_sync().
MFC after: 3 weeks
nwhitehorn [Sat, 25 Nov 2017 21:46:51 +0000 (21:46 +0000)]
Do not bind to CPUs with SMT, which use a different CPU numbering convention
that does not play well with this driver.
MFC after: 2 weeks
nwhitehorn [Sat, 25 Nov 2017 21:45:51 +0000 (21:45 +0000)]
Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for
the first instruction to be at the start of the text segment. This allows
the kernel to be booted correctly by stock kexec-lite.
MFC after: 2 weeks
nwhitehorn [Sat, 25 Nov 2017 21:44:23 +0000 (21:44 +0000)]
Automatically use the ELFv2 ABI on powerpc64 if supported by the compiler.
This has the same effects on DDB working as -mcall=aixdesc, but also is
supported by clang and marginally improves kernel performance.
MFC after: 2 weeks
mjg [Sat, 25 Nov 2017 20:49:27 +0000 (20:49 +0000)]
Add the missing lockstat check for thread lock.
mjg [Sat, 25 Nov 2017 20:37:13 +0000 (20:37 +0000)]
Convert in-kernel thread_lock_flags calls to thread_lock when debug is disabled
The flags argument is not used in this case.
mjg [Sat, 25 Nov 2017 20:25:45 +0000 (20:25 +0000)]
rwlock: fix up compilation of the previous change
commmitted wrong version of the patch
mjg [Sat, 25 Nov 2017 20:22:51 +0000 (20:22 +0000)]
rwlock: add __rw_try_{r,w}lock_int
mjg [Sat, 25 Nov 2017 20:13:50 +0000 (20:13 +0000)]
sx: change sunlock to wake waiters up if it locked sleepq
sleepq is only locked if the curhtread is the last reader. By the time
the lock gets acquired new ones could have arrived. The previous code
would unlock and loop back. This results spurious relocking of sleepq.
This is a step towards xadd-based unlock routine.
mjg [Sat, 25 Nov 2017 20:10:33 +0000 (20:10 +0000)]
locks: retry turnstile/sleepq loops on failed cmpset
In order to go to sleep threads set waiter flags, but that can spuriously
fail e.g. when a new reader arrives. Instead of unlocking everything and
looping back, re-evaluate the new state while still holding the lock necessary
to go to sleep.
mjg [Sat, 25 Nov 2017 20:08:11 +0000 (20:08 +0000)]
rwlock: stop re-reading the owner when going to sleep
pfg [Sat, 25 Nov 2017 17:12:48 +0000 (17:12 +0000)]
libc: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.
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.
pfg [Sat, 25 Nov 2017 17:09:43 +0000 (17:09 +0000)]
include: General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.
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.
kevans [Sat, 25 Nov 2017 16:46:35 +0000 (16:46 +0000)]
Allwinner a83t: enable USB support
Originally a patch by Mark Millard, augmented with information from work
done on NetBSD by jmcneill@.
Submitted by: Mark Millard (markmi@dsl-only.net)
Reviewed by: emaste, manu
Approved by: emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D13240
kevans [Sat, 25 Nov 2017 15:14:40 +0000 (15:14 +0000)]
Add r-ccu support for the Allwinner a83t
The r-ccu on the a83t differs from the others only by what it names the
ar100 parents. Export the _CCU macros (now converted to an enu) so that
ccu_sun8i_r can differentiate between a83t r-ccu and the others, then add
the compat string for the a83t r-ccu.
Reviewed by: manu
Approved by: emaste (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D13206
avg [Sat, 25 Nov 2017 09:47:31 +0000 (09:47 +0000)]
zdb: follow-up to r326150, check if malloc succeeded
Reported by: rpokala
MFC after: 1 week
X-MFC with: r326150
mav [Sat, 25 Nov 2017 09:42:14 +0000 (09:42 +0000)]
Slightly fix bidirectional stream number allocation.
This logic is still imperfect, since it allows at most 15 bidirectional
streams out of 30 allowed by specification, but at least now those should
work better. On the other side I don't remember I ever saw controller
supporting the bidirectional streams, so this is likely a nop change.
MFC after: 1 month
delphij [Sat, 25 Nov 2017 09:03:38 +0000 (09:03 +0000)]
Set errno to EFTYPE instead of EINVAL to be more consistent with the
rest of code.
MFC after: 1 month
jhb [Sat, 25 Nov 2017 04:49:12 +0000 (04:49 +0000)]
Decode kevent structures logged via ktrace(2) in kdump.
- Add a new KTR_STRUCT_ARRAY ktrace record type which dumps an array of
structures.
The structure name in the record payload is preceded by a size_t
containing the size of the individual structures. Use this to
replace the previous code that dumped the kevent arrays dumped for
kevent(). kdump is now able to decode the kevent structures rather
than dumping their contents via a hexdump.
One change from before is that the 'changes' and 'events' arrays are
not marked with separate 'read' and 'write' annotations in kdump
output. Instead, the first array is the 'changes' array, and the
second array (only present if kevent doesn't fail with an error) is
the 'events' array. For kevent(), empty arrays are denoted by an
entry with an array containing zero entries rather than no record.
- Move kevent decoding tables from truss to libsysdecode.
This adds three new functions to decode members of struct kevent:
sysdecode_kevent_filter, sysdecode_kevent_flags, and
sysdecode_kevent_fflags.
kdump uses these helper functions to pretty-print kevent fields.
- Move structure definitions for freebsd11 and freebsd32 kevent
structures to <sys/event.h> so that they can be shared with userland.
The 32-bit structures are only exposed if _WANT_KEVENT32 is defined.
The freebsd11 structures are only exposed if _WANT_FREEBSD11_KEVENT is
defined. The 32-bit freebsd11 structure requires both.
- Decode freebsd11 kevent structures in truss for the compat11.kevent()
system call.
- Log 32-bit kevent structures via ktrace for 32-bit compat kevent()
system calls.
- While here, constify the 'void *data' argument to ktrstruct().
Reviewed by: kib (earlier version)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D12470
jhb [Sat, 25 Nov 2017 03:59:36 +0000 (03:59 +0000)]
Add stdio.h to the synopsis for sysdecode functions that take a FILE *.
nwhitehorn [Fri, 24 Nov 2017 23:41:04 +0000 (23:41 +0000)]
Modify all FreeBSD bootloaders on PowerPC AIM (Book-S) systems to pass a
magic number to the kernel in r7 rather than the (currently unused and
irrelevant) width of the metadata pointer, which I believe was intended
for a never-used approach to the 64-bit port. This enables the kernel,
in a future commit, to switch on the cookie to distinguish a real
metadata pointer from loader(8) from garbage left in r6 by some other
boot loader.
MFC after: 3 weeks
markj [Fri, 24 Nov 2017 19:57:13 +0000 (19:57 +0000)]
Compile one of the uctf test programs with -m32.
The err.user64mode.ksh test expects it to run as a 32-bit process.
MFC after: 1 week
tuexen [Fri, 24 Nov 2017 19:38:59 +0000 (19:38 +0000)]
Fix SPDX line as suggested by pfg
emaste [Fri, 24 Nov 2017 19:21:21 +0000 (19:21 +0000)]
Temporarily disable VIMAGE on arm64
Loading a kernel module with a static VNET_DEFINE'd variable (e.g.
if_lagg) currently results in a kernel panic.
PR: 223670
markj [Fri, 24 Nov 2017 19:08:54 +0000 (19:08 +0000)]
Don't redefine _KERNEL.
MFC after: 1 week
markj [Fri, 24 Nov 2017 19:05:45 +0000 (19:05 +0000)]
Fix the type signature for sx(9) DTrace subroutines.
MFC after: 1 week
markj [Fri, 24 Nov 2017 19:04:31 +0000 (19:04 +0000)]
Have lockstat:::sx-release fire only after the lock state has changed.
MFC after: 1 week
markj [Fri, 24 Nov 2017 19:02:06 +0000 (19:02 +0000)]
Add a missing lockstat:::sx-downgrade probe.
We were returning without firing the probe when the lock had no shared
waiters.
MFC after: 1 week
landonf [Fri, 24 Nov 2017 19:01:14 +0000 (19:01 +0000)]
bhnd(4): Add missing dependency on ofw_bus_if.h
Reported by: wma
Approved by: adrian (mentor, implicit)
markj [Fri, 24 Nov 2017 17:57:00 +0000 (17:57 +0000)]
Fix typos.
MFC after: 3 days
jwb [Fri, 24 Nov 2017 16:54:25 +0000 (16:54 +0000)]
Add new ports committer jwb
Approved by: jrm
nwhitehorn [Fri, 24 Nov 2017 15:48:17 +0000 (15:48 +0000)]
Switch the default firmware for npe(4) from the QOS_VLAN one to the
plain-vanilla ETH microcode. The QOS_VLAN firmware added support in microcode
for handling IEEE 802.1q tags, but the npe(4) driver did not actually
support the relevant signalling. As a result, it was impossible to use
VLANs with npe(4). Switching to the more basic microcode (same license)
removes the on-NIC promisisng and makes vlan(4) work on both NPE interfaces.
Ref: https://lists.freebsd.org/pipermail/freebsd-arm/2012-August/003826.html
hselasky [Fri, 24 Nov 2017 14:50:28 +0000 (14:50 +0000)]
RoCE/infiniband upgrade to Linux v4.9 for kernel and userspace.
This commit merges projects/bsd_rdma_4_9 to head.
List of kernel sources used:
============================
1) kernel sources were cloned from git://github.com/torvalds/linux.git
Top commit
69973b830859bc6529a7a0468ba0d80ee5117826 - tag: v4.9, linux-4.9
2) krping was cloned from https://github.com/larrystevenwise/krping
Top commit
292a2f1abf0348285e678a82264740d52e4dcfe4
List of userspace sources used:
===============================
1) rdma-core was cloned from https://github.com/linux-rdma/rdma-core.git
Top commit
d65138ef93af30b3ea249f3a84aa6a24ba7f8a75
2) OpenSM was cloned from git://git.openfabrics.org/~halr/opensm.git
Top commit
85f841cf209f791c89a075048a907020e924528d
3) libibmad was cloned from git://git.openfabrics.org/~iraweiny/libibmad.git
Tag 1.3.13 with some additional patches from Mellanox.
4) infiniband-diags was cloned from git://git.openfabrics.org/~iraweiny/infiniband-diags.git
Tag 1.6.7 with some additional patches from Mellanox.
NOTES:
======
1) The mthca driver has been removed in kernel and in userspace.
2) All GPLv2 only sources have been removed and where applicable
rewritten from scratch under a BSD license.
3) List of fully supported drivers in userspace and kernel:
a) iw_cxgbe (Chelsio)
b) mlx4ib (Mellanox)
c) mlx5ib (Mellanox)
4) WITH_OFED=YES is still required by make in order to build
OFED userspace and kernel code.
5) Full support has been added for routable RoCE, RoCE v2.
Sponsored by: Mellanox Technologies
hselasky [Fri, 24 Nov 2017 14:29:32 +0000 (14:29 +0000)]
Fix for multi-threaded lib32 compat build on amd64.
Sponsored by: Mellanox Technologies
ed [Fri, 24 Nov 2017 14:02:32 +0000 (14:02 +0000)]
Pick the right vDSO file/linker flags when building cloudabi32.ko on ARM64.
The recently imported cloudabi_vdso_armv6_on_64bit.S should be the vDSO
for 32-bit processes when being run on FreeBSD/arm64. This vDSO ensures
that all system call arguments are padded to 64 bits, so that they can
be used by the kernel to call into most of the native implementations
directly.
ed [Fri, 24 Nov 2017 13:51:59 +0000 (13:51 +0000)]
Set CP15BEN in SCTLR to make memory barriers work in 32-bit mode.
Binaries generated by Clang for ARMv6 may contain these instructions:
MCR p15, 0, <Rd>, c7, c10, 5
These instructions are deprecated as of ARMv7, which is why modern
processors have a way of toggling support for them. On FreeBSD/arm64 we
currently disable support for these instructions, meaning that if 32-bit
executables with these instructions are run, they would crash with
SIGILL. This is likely not what we want.
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D13145
ed [Fri, 24 Nov 2017 13:50:53 +0000 (13:50 +0000)]
Add rudimentary support for building FreeBSD/arm64 with COMPAT_FREEBSD32.
Right now I'm using two Raspberry Pi's (2 and 3) to test CloudABI
support for armv6, armv7 and aarch64. It would be nice if I could
restrict this to just a single instance when testing smaller changes.
This is why I'd like to get COMPAT_CLOUDABI32 to work on arm64.
As COMPAT_CLOUDABI32 depends on COMPAT_FREEBSD32, at least for the ELF
loading, this change adds all of the bits necessary to at least build a
kernel with COMPAT_FREEBSD32. All of the machine dependent system calls
are still stubbed out, for the reason that implementations for these are
only useful if actual support for running FreeBSD binaries is added.
This is outside the scope of this work.
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D13144
tuexen [Fri, 24 Nov 2017 12:18:48 +0000 (12:18 +0000)]
Unbreak compilation when using SCTP_DETAILED_STR_STATS option.
MFC after: 1 week
hselasky [Fri, 24 Nov 2017 12:13:27 +0000 (12:13 +0000)]
Merge ^/head r326132 through r326161.
hselasky [Fri, 24 Nov 2017 12:10:42 +0000 (12:10 +0000)]
Implement atomic_fetchadd_64() for i386. This function is needed by the
atomic64 header file in the LinuxKPI for i386.
Reviewed by: kib
MFC after: 1 week
Sponsored by: Mellanox Technologies
hselasky [Fri, 24 Nov 2017 12:08:50 +0000 (12:08 +0000)]
Compile fixes for 32-bit architectures.
Sponsored by: Mellanox Technologies