Commit Graph

253400 Commits

Author SHA1 Message Date
Fernando Apesteguía
f1cba2b70c vi(1): Add URL to the vi/ex reference manual in the man page
Reported in PR 241985

The manual page references the "vi/ex reference manual" but there is no
information about where to find that document. Add a reference to the manual in
the SEE ALSO section since the Project hosts a copy of it[1].

Change sent upstream[2]

If D26158 gets reviewed and committed, we could close that PR.

[1] https://docs.freebsd.org/44doc/usd/13.viref/paper.pdf).
[2] https://github.com/lichray/nvi2/pull/85

Submitted by:	freebsd@tim.thechases.com
Approved by:	manpages (gbe@)
Differential Revision:	https://reviews.freebsd.org/D26163
2020-09-25 10:20:12 +00:00
Edward Tomasz Napierala
0c5bd5f993 Regen after r366145.
Sponsored by:	DARPA
2020-09-25 10:05:38 +00:00
Michal Meloun
b95a8021ec Make simplebus friendlier for subclassing.
MFC after:	1 week
2020-09-25 09:56:50 +00:00
Edward Tomasz Napierala
586bd2de78 Make makesyscalls.lua initialize 'struct sysent' entries using c99
designated initializers.  This makes it easier to modify 'struct sysent'
layout.

Reviewed by:	kevans
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D26530
2020-09-25 09:34:00 +00:00
Andriy Gapon
a4f28d4296 pwm(8): fix potential duty overflow, use unsigneds for period and duty
For a long period value and the duty specified as a percentage,
there could be an overflow.
Using unsigned integers aligns the code with struct pwm_state and allows
to safely use periods up to 4 seconds where supported by drivers.

MFC after:	2 weeks
2020-09-25 07:55:08 +00:00
Andriy Gapon
31b0753da3 pwm(8): do not exit with failure after successfully reading configuration
MFC after:	1 week
2020-09-25 07:54:38 +00:00
Andriy Gapon
e08dc44162 aw_pwm: add a check and some comments related to long periods
The hardware supports periods as long as 196 seconds[*] when using the
maximal prescaling of 72000 and maximum cycle count of 2^16.

But the code becomes incorrect when the period length approaches 1 second.
That's because of things like NS_PER_SEC / period.

[*] At the same time I must note that the KPI provides for maximum
period of about 4 seconds (2^32 nanoseconds).

MFC after:	2 weeks
2020-09-25 07:41:51 +00:00
Andriy Gapon
6957a14075 aw_pwm: ensure sane configuration, just in case
Make sure that the hardware is configured to cycle mode and that the
bypass is disabled.

MFC after:	2 weeks
2020-09-25 07:40:56 +00:00
Andriy Gapon
fc1ec731c8 aw_pwm: fix programming of the period
The programmed value is biased by one: 0 means 1 cycle,
1 means 2 cycles, etc.

MFC after:	3 weeks
2020-09-25 07:40:26 +00:00
Andriy Gapon
1c2c602a17 aw_pwm: fix selection of the prescaler
Prescaling divides the frequency, not multiplies it.

MFC after:	2 weeks
2020-09-25 07:40:02 +00:00
Andriy Gapon
108d235ae6 aw_pwm: remove the busy bit check
The bit seems to always be set on my hardware, H3.
However, programming the hardware seems to work just fine.

MFC after:	3 weeks
2020-09-25 07:39:41 +00:00
Andriy Gapon
b1dbb66d49 aw_pwm: trivially add H3 support
MFC after:	2 weeks
2020-09-25 07:39:14 +00:00
Conrad Meyer
5b50517079 amdtemp(4), amdsmn(4): Attach to Ryzen 4000 APU (Zen 2, "Renoir")
PR:		249864
Reported by:	Florian Millet <florian.millet AT laposte.net>
Tested by:	Florian Millet
2020-09-25 04:16:28 +00:00
Alan Somers
90ec6a3035 lib/libc/tests/iconv: raise WARNS to 6
MFC after:	2 weeks
2020-09-24 21:42:44 +00:00
Alan Somers
9f036e84fb lib/libc/tests/sys: raise WARNS to 6
MFC after:	2 weeks
2020-09-24 21:39:09 +00:00
Gordon Bergling
f6393bcd78 tcp(4): Add a reference for tcp_bbr(4) man page 2020-09-24 19:59:29 +00:00
Gordon Bergling
fb929f78fb Add missing file (tcp_bbr.4) from r366127
Reviewed by:	bcr
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24915
2020-09-24 19:35:34 +00:00
Gordon Bergling
a7869854ed Add a manual page for TCP BBR
Reviewed by:	bcr
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24915
2020-09-24 19:33:48 +00:00
Maxim Sobolev
dffc6929bf Fix a typo in the 366098.
Reported by:	0mp
MFC after:	2 weeks
		(along with 366098)
2020-09-24 19:12:03 +00:00
Gordon Bergling
194498e9b5 crypto_buffer(9): Add a HISTORY and a AUTHORS section
Reviewed by:	jhb
Approved by:	jhb
Differential Revision:	https://reviews.freebsd.org/D26487
2020-09-24 16:50:14 +00:00
Fernando Apesteguía
347307b8e4 Fix typo and environment variable macro
Follow up for r366119

Reported by:	xtouqh@mm.st
Differential Revision:	https://reviews.freebsd.org/D26182
2020-09-24 16:42:17 +00:00
Alan Somers
a62772a78e fusefs: fix mmap'd writes in direct_io mode
If a FUSE server returns FOPEN_DIRECT_IO in response to FUSE_OPEN, that
instructs the kernel to bypass the page cache for that file. This feature
is also known by libfuse's name: "direct_io".

However, when accessing a file via mmap, there is no possible way to bypass
the cache completely. This change fixes a deadlock that would happen when
an mmap'd write tried to invalidate a portion of the cache, wrongly assuming
that a write couldn't possibly come from cache if direct_io were set.

Arguably, we could instead disable mmap for files with FOPEN_DIRECT_IO set.
But allowing it is less likely to cause user complaints, and is more in
keeping with the spirit of open(2), where O_DIRECT instructs the kernel to
"reduce", not "eliminate" cache effects.

PR:		247276
Reported by:	trapexit@spawn.link
Reviewed by:	cem
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D26485
2020-09-24 16:27:53 +00:00
Fernando Apesteguía
f0f718ce96 which(1): Add EXAMPLES section to manpage
Add EXAMPLES section showing the use of -a and -s flags and how which(1)
treates duplicates.

Approved by:	manpages (gbe@)
Differential Revision:	https://reviews.freebsd.org/D26182
2020-09-24 16:11:53 +00:00
Alan Somers
5710395f4d Fix some signed/unsigned comparison warnings in NFS
Reviewed by:	rmacklem
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D26533
2020-09-24 15:38:01 +00:00
Ed Maste
dbe522e6ca mgb.4: add note about experimental status
Also remove HISTORY section until it is connected to the build.
2020-09-24 14:42:22 +00:00
Michael Tuexen
b6db274d1e Whitespace changes.
MFC after:		3 days
2020-09-24 12:26:06 +00:00
Konstantin Belousov
5dca94ee82 Remove pointless local variable.
Reported by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	6 days
2020-09-24 12:14:25 +00:00
Bjoern A. Zeeb
fe5ebb23cc Provide MS() and SM() macros for 80211 and wireless drivers.
We have (two versions) of MS() and SM() macros which we use throughout
the wireless code.  Change all but three places (ath_hal, rtwn, and rsu)
to the newly provided _IEEE80211_MASKSHIFT() and _IEEE80211_SHIFTMASK()
macros.  Also change one internal case using both _S and _M instead of
just _S away from _M (one of the reasons rtwn and rsu were not changed).

This was done semi-mechanically.  No functional changes intended.

Requested by:	gnn (D26091)
Reviewed by:	adrian (pre line wrap)
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (d/b/a "Netgate")
Differential Revision:	https://reviews.freebsd.org/D26539
2020-09-24 10:57:39 +00:00
Andrew Turner
122e47836e Clean up the arm64 bus_dma_run_filter
- We can exit the loop as soon as the filter check passes.
 - The alignment check has already passed so there is no need to also run
   it here.

Sponsored by:	Innovate UK
2020-09-24 10:42:28 +00:00
Andrew Turner
ec9d068513 Ensure arm64 DMA alignment is passed from parents to children
This ensures the alignment check will take these alignments into account.

Sponsored by:	Innovate UK
2020-09-24 10:40:49 +00:00
Stefan Eßer
192d7246a7 Add danish translations provided by GitHub user scootergriesen
These translations did already exist in the index files for "vt".

Obtained from:	https://github.com/scootergrisen/freebsd/
2020-09-24 09:06:04 +00:00
Li-Wen Hsu
ea91248c6d Regen after r365903
Sponsored by:	The FreeBSD Foundation
2020-09-24 08:51:23 +00:00
Michal Meloun
88f7c52f31 Add missing declarations of 64-bit variants of bus_peek/bus_poke on amd64.
It fixes GENERIC-KCSAN build.

Reported by:	rpokala
MFC after:	1 month
MFC with:	r365899
2020-09-24 08:40:32 +00:00
Andrew Turner
2e3b7d8041 Bounce in more cases in the arm64 busdma
We need to use a bounce buffer when the memory we are operating on is not
aligned to a cacheline, and not aligned to the maps alignment.

The former is to stop other threads from dirtying the cacheline while we
are performing DMA operations with it. The latter is to check memory
passed in by a driver is correctly aligned for the device.

Reviewed by:	mmel
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D26496
2020-09-24 07:17:05 +00:00
Andrew Turner
f0e50a4416 Ensure we always align and size arm64 busdma allocations to a cacheline
This will ensure nothing modifies the cacheline while DMA is in progress
so we won't need to bounce the data.

Reviewed by:	mmel
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D26495
2020-09-24 07:13:13 +00:00
Warner Losh
d9524c1232 Don't define _STANDALONE when building kernel modules.
_STANDALONE is only for the bootloader, not kernel modules. Remove it
from the build. This was harmless before, but sys/malloc.h now does
different things for the standalone environment, triggering the issue.
2020-09-24 07:10:34 +00:00
Andrew Turner
0aaa66cc79 Add a coherent flag on the arm64 dma map struct
Use it to decide if we can skip cache management.

While here remove the DMAMAP_COULD_BOUNCE flag as it's unneeded.

Reviewed by:	mmel
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D26494
2020-09-24 07:07:54 +00:00
Andrew Turner
66cbbb75b2 Add bounce helpers to the arm64 busdma
Add helper functions to the arm64 busdma for common cases of checking if
we may need to bounce, and if we must bounce for a given address.

These will be expanded later as we handle cache-misaligned memory.

Reported by:	mmel
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D26493
2020-09-24 07:03:26 +00:00
Warner Losh
0672da33f3 Create a standalone version of sys/malloc.h
The ZSTD support for the boot loader will need to include files that
use the kernel's malloc interface. Create a standalone stub version
that's functional enough to allow this to work. There's some
limitations in this interface, and it's not quite a perfect
match. Specifically, M_WAITOK allocations can fail because there's
nothing that can be done we no memory is available.
2020-09-24 06:40:35 +00:00
Stefan Eßer
68c8c1a705 Slightly modify wording to better match nearby entries.
MFC after:	3 days
2020-09-24 06:12:57 +00:00
Mateusz Guzik
1b2edd6e2b cache: eliminate cache_zap_locked_vnode
It is only ever called for negative entries and for those it is
just a wrapper around cache_zap_negative_locked_vnode_kl which
always succeeds.

This also fixes a bug where cache_lookup_fallback should have been
calling cache_zap_locked_bucket instead. Note that in order to trigger
the bug NOCACHE must not be set, which currently only happens when
creating a new coredump (and then the coredump-to-be has to have a
negative entry).
2020-09-24 03:38:32 +00:00
Maxim Sobolev
4cd407ec93 dd a new option (-H) to daemon(8) to catch SIGHUP and re-open output_file file when
received.

The default system log rotation mechanism (newsyslog(8)) requires ability to send
signal to a daemon in order to properly complete rotation of the logs in an "atomic"
manner without having to making a copy and truncating original file. Unfortunately
our built-in mechanism to convert "dumb" programs into daemons has no way to handle
this rotation properly. This change adds this ability, to be enabled by supplying -H
option in addition to the -o option.

Reviewed by:	markj, rpokala (manpages)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D26526
2020-09-24 02:44:58 +00:00
Warner Losh
4d1bad3c62 Remove stray lines
I snagged the license boiler plate. Fix that. also, it's spelled .Va
not .Vn. Plus " quoting issues.

Noticed by: rgrimes, xtouqh at hotmail dot com
2020-09-23 22:49:27 +00:00
Kyle Evans
93900fe76d tests: move the memfd tests over to sys/posixshm
memfd_create is implemented on top of posixshm, so this is a logically
correct place for them to be. Moreover, this reduces the number of places to
look to run tests when working in this part of the tree.

Discussed with:	kib (to some extent, a while ago)
2020-09-23 19:54:59 +00:00
Mark Johnston
114484b7ec Flag vm_reserv and vm_phys sysctls as MPSAFE.
Nothing in these subsystems relies on Giant.

MFC after:	1 week
2020-09-23 19:36:07 +00:00
Mark Johnston
78257765f2 Add a vmparam.h constant indicating pmap support for large pages.
Enable SHM_LARGEPAGE support on arm64.

Reviewed by:	alc, kib
Sponsored by:	Juniper Networks, Inc., Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26467
2020-09-23 19:34:21 +00:00
Mark Johnston
4168aedcde Add largepage support to the arm64 pmap.
Reviewed by:	alc, kib
Sponsored by:	Juniper Networks, Inc., Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26466
2020-09-23 19:33:47 +00:00
Warner Losh
f9ba2bbe3a Use envvar rather than nonstandard hint. lines
The NOTES files have a bunch of hint lines that are removed when
generating LINT. However, we can achieve the same effect by prepending
each of the lines with 'envvar' so the NOTES files become standard
config(8) files. No functional changes as the sed script to generate
the LINT files filters these either way.

Suggested by: kevans
2020-09-23 19:18:53 +00:00
Toomas Soome
1dc762d4fb loader: fix non-zfs build
We can not include zfs headers while building without zfs.

Reported by:	Oscar Holmlund
2020-09-23 19:15:22 +00:00
Nick O'Brien
e1c8f8f87d riscv: Trap cleanup - use nitems()
No functional changes, just cleanup.

Reviewed by:	kp
Approved by:	kp (mentor)
Sponsored by:	Axiado
2020-09-23 18:54:14 +00:00