Commit Graph

248060 Commits

Author SHA1 Message Date
Ruslan Bukin
a8692c16c9 Fix xae(4) driver attachement on the Government Furnished Equipment (GFE)
riscv cores.

GFE cores come with standard DTS file that lacks standard 'dmas ='
property, which means xae(4) could not find a DMA controller to use.

The 'dmas' property could not be added to the DTS file because the
ethernet controller and DMA engine parts in Linux are implemented
in a single driver.

Instead of 'dmas' property the standard Xilinx 'axistream-connected'
property is provided, so fallback to use it instead.

Suggested by:	James Clarke <jrtc27@jrtc27.com>
Reviewed by:	James Clarke <jrtc27@jrtc27.com>
Sponsored by:	DARPA, AFRL
2020-02-07 14:36:28 +00:00
Baptiste Daroussin
79208b1025 Fix most of the style warnings 2020-02-07 12:26:38 +00:00
Scott Long
69e85eb8ae Advertise the MPI Message Version that's contained in the IOCFacts message
in the sysctl block for the driver.  mpsutil/mprutil needs this so it can
know how big of a buffer to allocate when requesting the IOCFacts from the
controller.  This eliminates the kernel console messages about wrong
allocation sizes.

Reported by:	imp
2020-02-07 12:15:39 +00:00
Scott Long
b041593ae7 Touch up some of the iocfacts fields 2020-02-07 11:48:26 +00:00
Baptiste Daroussin
89fd163c4e Update diff(1) TODO removing what has been implemented 2020-02-07 10:18:01 +00:00
Baptiste Daroussin
64793e748c diff: implement -y (--side-by-side) along with -W and --suppress-common-lines
PR:		219933
Submitted by:	fehmi noyan isi <fnoyanisi@yahoo.com>
MFC after:	3 weeks
2020-02-07 10:17:13 +00:00
Scott Long
d176b8039e Ever since the block layer expanded its command syntax beyond just
BIO_READ and BIO_WRITE, we've handled this expanded syntax poorly in
drivers when the driver doesn't support a particular command.  Do a
sweep and fix that.

Reported by:	imp
2020-02-07 09:22:08 +00:00
Ryan Libby
a2abae8dc9 smr.h: fix build after r357641
r357641 missed committing the change to sys/sys/smr.h.

Reported by:	jkim
Submitted by:	jeff
Reviewed by:	rlibby
Differential Revision:	https://reviews.freebsd.org/D23464
2020-02-07 00:47:58 +00:00
John Baldwin
f5a7e78d32 Tidy the _set_tp function for RISC-V.
- Use a constant for the offset instead of a magic number.
- Use an addi instruction that writes to tp directly instead of a mv
  that writes the result of a compiler-generated addi.

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23521
2020-02-06 21:46:15 +00:00
Mark Johnston
b09e7a4f42 Remove more manual additions of -DSMP.
Since r357598 this should no longer be necessary.
2020-02-06 21:01:19 +00:00
Jeff Roberson
a40068e524 Fix a race in smr_advance() that could result in unnecessary poll calls.
This was relatively harmless but surprising to see in counters.  The
race occurred when rd_seq was read after the goal was updated and we
incorrectly calculated the delta between them.

Reviewed by:	rlibby
Differential Revision:	https://reviews.freebsd.org/D23464
2020-02-06 20:51:46 +00:00
Jeff Roberson
cd0be8b2ed Temporarily force IFF_NEEDSEPOCH until drivers have been resolved.
Recent network epoch changes have left some drivers unexpectedly broken
and there is not yet a consensus on the correct fix.  This is patch is
a minor performance impact until we can agree on the correct path
forward.

Reviewed by:	core, network, imp, glebius, hselasky
Differential Revision:	https://reviews.freebsd.org/D23515
2020-02-06 20:47:50 +00:00
Alexander Motin
c10aea724f Reduce number of atomic_add() calls in aggsum.
Previous code used 4 atomics to do aggsum_flush_bucket() and 2 more to
re-borrow after the flush.  But since asc_borrowed and asc_delta are
accessed only while holding asc_lock, it makes no any sense to modify
as_lower_bound and as_upper_bound in multiple steps.  Instead of that
the new code uses only 2 atomics in all the cases, one per as_*_bound
variable.  I think even that is overkill, simple atomic store and
load could be used here, since all modifications are done under the
as_lock, but there are no such primitives in ZFS code now.

While there, make borrow code consider previous borrow value, so that
on mixed request patterns reduce chance of needing to borrow again if
much larger request follows tiny one that needed borrow.

Also reduce as_numbuckets from uint64_t to u_int.  It makes no sense
to use so large division operation on every aggsum_add().

Reviewed by:	Brian Behlendorf, Paul Dagnelie
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2020-02-06 20:32:53 +00:00
Mateusz Piotrowski
89be2c1ee3 Improve documentation of bootconfig and PARTITIONS
- Mention bootconfig target in TARGETS section.
- Document PARTITIONS variable, which is only mentioned in the examples,
  but doesn't have its own point.

Submitted by:	arrowd@
Reviewed by:	bcr
Approved by:	bcr (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D22927
2020-02-06 20:18:45 +00:00
Jeff Roberson
8d7f16a5db Add some global counters for SMR. These may eventually become per-smr
counters.  In my stress test there is only one poll for every 15,000
frees.  This means we are effectively amortizing the cache coherency
overhead even with very high write rates (3M/s/core).

Reviewed by:	markj, rlibby
Differential Revision:	https://reviews.freebsd.org/D23463
2020-02-06 20:10:21 +00:00
Kyle Evans
7295d1dda1 MFV r357635: imnport v1.9 of the O_SEARCH tests
The RCSID data was wrong, so this is effectively a record-only merge
with correction of said data. No further changes should be needed in this
area, as we've now upstreamed our local changes to this specific test.
2020-02-06 18:51:36 +00:00
Kyle Evans
7b872210c0 NetBSD-tests: import v1.9 of the O_SEARCH tests
This completes the rest of our local changes going upstream.
2020-02-06 18:48:12 +00:00
John Baldwin
2243365e29 Use the context created in makectx() for stack traces.
Always use the kdb_thr_ctx() for db_trace_thread() as on other
architectures.  Initialize pcb_ra to be the sepc from the saved
trapframe rather than the saved ra to avoid skipping a frame.

Reviewed by:	mhorne, br
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23513
2020-02-06 18:04:45 +00:00
Pedro F. Giffuni
9d529ed898 fstyp: sync HAMMER1/2 detection support with DragonFly BSD.
Submitted by:	Tomohiro Kusumi
PR:		243929
2020-02-06 18:04:15 +00:00
John Baldwin
ecafbba5a6 Fix DDB to unwind across exception frames.
While here, add an extra line of information for exceptions and
interrupts and compress the per-frame line down to one line to match
other architectures.

Reviewed by:	mhorne, br
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23508
2020-02-06 18:02:38 +00:00
Warner Losh
a4964a527c Add elf2aout removal
After committing, I noticed elf2aout commit missed the relnotes
yes. It's unlikely to be interesting, since it's just part of sparc64
removal and quite niche, but it was installed on all FreeBSD machines.
2020-02-06 18:00:50 +00:00
Warner Losh
be39790ac2 Add relnotes entries for armv5 and sparc64 being removed.
These commits lacked the proper relnotes entries in the commit
message.
2020-02-06 18:00:46 +00:00
Warner Losh
dd99ab06f3 Remove elf2aout
Remove the long obsolete elf2aout utility. Should any ports need to
know when this left the tree, use 1300077 as the revision so we
avoid multiple bumps for the sparc64 removal.

Reviewed by: brooks@, emaste@
Differential Revision: https://reviews.freebsd.org/D23527
2020-02-06 17:52:16 +00:00
Warner Losh
d6cc6be78c Mark elf2aout as deprecated.
Only sparc64 used this, so we will be removing it from FreeBSD 13. Add
the usual deprecation notice in a MFC-able way.

Reviewed by: emaste, rgrimes
Differential Revision: https://reviews.freebsd.org/D23526
2020-02-06 17:52:11 +00:00
Warner Losh
6a027eda92 No need to have a special sparc64 list here.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D23525
2020-02-06 17:52:07 +00:00
Warner Losh
ab9848aa9b No need to make sunlabel anymore
It was only built on sparc64. Since it wasn't a general tool on other
architectures, no need to keep it around for another release.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D23524
2020-02-06 17:52:02 +00:00
Warner Losh
75ababf8b5 Restore missing comment
I was overly agressive about removing the entire comment. It was still
valid, except the part about being only for some architectures.

Reviewed by: emaste
Differenial Revision: https://reviews.freebsd.org/D23523
2020-02-06 17:51:48 +00:00
Warner Losh
ac12771c01 Avoid the phrase 'now deprecated'
Reword this construct to be more consistent with normal man page language.
2020-02-06 16:38:06 +00:00
Warner Losh
24619588e4 'is now deprecated' -> 'is deprecated'
Man pages are written in a more timeless voice than news flashes,
so adopt the language to what we do elsewhere.
2020-02-06 16:38:02 +00:00
Luca Pizzamiglio
19bb4570ea mixer: call the cleanup function in a test
The set_empty_value test has a cleanup function, but is not called.
Fix it

Reviewed by:	0mp
Approved by:	kp
Differential Revision:	https://reviews.freebsd.org/D23498
2020-02-06 14:31:29 +00:00
Ed Maste
429932bacc src.conf.5: regen after r357617, BINUTILS_BOOTSTRAP description update 2020-02-06 14:18:48 +00:00
Ed Maste
0b3a4f15aa Update WITH_/WITHOUT_BINUTILS_BOOTSTRAP descriptions
Use of binutils is being incrementally reduced.  The specific binutils
are listed in the WITH_BINUTILS and WITHOUT_BINUTILS descriptions; there
is no need to list the specific tools again in the descriptions for the
_BOOTSTRAP options.

MFC after:	1 week
2020-02-06 14:13:33 +00:00
Roger Pau Monné
d16bd54140 xen/console: fix priority of Xen console
Currently the Xen console is always attached with priority CN_REMOTE
(highest), which means that when booting with a single console the Xen
console will take preference over the VGA for example, and that's not
intended unless the user has also selected to use a serial console.

Fix this by lowering the priority of the Xen console to NORMAL unless
the user has selected to use a serial console. This keeps the usual
FreeBSD behavior of outputting to the internal consoles (ie: VGA) when
booted as a Xen dom0.

MFC after:	3 days
Sponsored by:	Citrix Systems R&D
2020-02-06 14:02:47 +00:00
Leandro Lupori
38cf2a4334 Implement kvm_kerndisp
This change adds a new libkvm function, kvm_kerndisp(), that can be used to
retrieve the kernel displacement, that is the difference between the kernel's
base virtual address at run time and the kernel base virtual address specified
in the kernel image file.

This will be used by kgdb, to properly relocate kernel symbols, when needed.

Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D23285
2020-02-06 13:21:59 +00:00
Pawel Biernacki
210176ad76 sysctl(9): add CTLFLAG_NEEDGIANT flag
Add CTLFLAG_NEEDGIANT flag (modelled after D_NEEDGIANT) that will be used to
mark sysctls that still require locking Giant.

Rewrite sysctl_handle_string() to use internal locking instead of locking
Giant.

Mark SYSCTL_STRING, SYSCTL_OPAQUE and their variants as MPSAFE.

Add infrastructure support for enforcing proper use of CTLFLAG_NEEDGIANT
and CTLFLAG_MPSAFE flags with SYSCTL_PROC and SYSCTL_NODE, not enabled yet.

Reviewed by:	kib (mentor)
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D23378
2020-02-06 12:45:58 +00:00
Ryan Libby
28c0abcebb auditd_stop: wait_for_pids instead of sleeping
It's faster and more reliable to wait_for_pids than to sleep 1.

cem@ suggested just to remove auditd_stop() and use the rc.subr default
stop action (SIGTERM instead of audit -t), which has a built-in
wait_for_pids.  That may be a better solution.

Discussed with:	cem
Reviewed by:	asomers
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23223
2020-02-06 08:32:30 +00:00
Ryan Libby
bae55c4aec uma: remove UMA_ZFLAG_CACHEONLY flag
UMA_ZFLAG_CACHEONLY was essentially the same thing as UMA_ZONE_VM, but
with a more confusing name.  Remove the flag, make UMA_ZONE_VM an
inherit flag, and replace all references.

Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23516
2020-02-06 08:32:25 +00:00
Xin LI
f99e4a2d11 MFV r357608: Limit memory usage in xz(1) instead of in tuklib.
Apply upstream 353970510895f6a80adfe60cf71b70a95adfa8bc to limit memory
usage on 32-bit binary to 4020 MiB.

Submitted by:	Lasse Collin <lasse.collin at tukaani.org>
Reviewed by:	kib, bcr
Differential Revision:	https://reviews.freebsd.org/D23474
2020-02-06 07:47:28 +00:00
Xin LI
9657691eff Apply a reduced version of upstream 353970510895f6a80adfe60cf71b70a95adfa8bc
which implements memory limit in xz(1) when running in 32-bit mode.

The change is applied directly in vendor area to ease future import.
2020-02-06 07:45:07 +00:00
Justin Hibbits
31091dea96 powerpc: Fix altivec disabling in set_mcontext()
We somewhat blindly copy the srr1 from the new context to the trap frame,
but disable FPU and VSX unconditionally, relying on the trap to re-enable
them.  This works because the FPU manages the VSX extended FP registers,
which is governed by the PCB_FPFREGS flag.  However, with altivec, we
would blindly disable PSL_VEC, without touching PCB_VEC.  Handle this case
by disabling altivec in both srr1 and pcb_flags, if the mcontext doesn't
have _MC_AV_VALID set.

Reported by:	pkubaj
2020-02-06 01:25:30 +00:00
Navdeep Parhar
21935a41fd cxgbe(4): Add native netmap support to the main interface.
This means that extra virtual interfaces (VIs) created with
hw.cxgbe.num_vis are no longer required to use netmap.  Use this
tunable to enable native netmap support on the main interface:

hw.cxgbe.native_netmap="3"

There is no change in default behavior.

Suggested by:	jch@
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
2020-02-05 22:29:01 +00:00
Mark Johnston
a4b3b53557 Define SMP for standalone module builds.
Suggested and reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D23519
2020-02-05 20:57:45 +00:00
Alfredo Dal'Ava Junior
f272c8de6e [virtio] Fix r/w to PCI configuration area on big endian platforms
In legacy VirtIO drivers, the header must be PCI endianness (little) and the
device-specific region is encoded in the native endian of the guest.

This patch makes the access (read/write) to VirtIO header using the little
endian order. Other read and write access are native endianness. This also
sets the device's IO region as big endian if on big endian machine.

PR:		205178
Submitted by:	Andre Silva <afscoelho@gmail.com>
Reported by:	Kenneth Salerno <kennethsalerno@yahoo.com>
Reviewed by:	bryanv, bdragon, luporl, alfredo
Approved by:	jhibbits (mentor)
Differential Revision:	https://reviews.freebsd.org/D23401
2020-02-05 20:39:18 +00:00
John Baldwin
4a9b01b262 Fix EXCP_MASK to include all relevant bits from scause.
While cause codes higher than 16 are reserved, the exception code
field of the register is defined to be all bits but the upper-most
bit.

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23510
2020-02-05 20:34:22 +00:00
John Baldwin
ac2b208d08 Use csr_read() to read sstatus instead of inline assembly.
While here, remove a local variable to avoid the CSR read in non-debug
kernels.

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23511
2020-02-05 20:32:37 +00:00
John Baldwin
b68892fe61 Remove stale workaround for the htif console.
In practice this discarded all characters entered at the DDB prompt.

Reviewed by:	br
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23509
2020-02-05 20:11:08 +00:00
Ed Maste
0f61170882 libssp_nonshared: use only on i386 and ppc
libssp_nonshared.a defines one symbol, __stack_chk_fail_local.  This
is used only on i386 and powerpc; other archs emit calls directly to
__stack_chk_fail.  Simplify linking on other archs by omitting it.

PR:		242941 [exp-run]
2020-02-05 20:08:01 +00:00
John Baldwin
37bd6bb849 Read the breakpoint instruction to determine its length in BKPT_SKIP.
This fixes continuing from debug.kdb.enter=1 after enabling the use of
compressed instructions since the compiler can emit the two byte
c.ebreak instead of the 4 byte ebreak.

Reviewed by:	br
MFC after:	1 week
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23507
2020-02-05 20:06:35 +00:00
Brandon Bergren
7283901ae9 [PowerPC] [DTrace] Add ELFv2 support in libdtrace
PPC64 ELFv2 acts like a "normal" platform in that it no longer needs
function descriptors. So, ensure we are only enabling them on ELFv1.

Additionally, ELFv2 requires that the ELF header have a nonzero e_flags,
so ensure that the synthesized ELF header in dt_link.c is setting it.

Reviewed by:	jhibbits, markj
Approved by:	gnn
Differential Revision:	https://reviews.freebsd.org/D22403
2020-02-05 19:39:48 +00:00
Ed Maste
42ee7a9a9b delete empty directories after r357455 2020-02-05 19:18:04 +00:00