Commit Graph

252866 Commits

Author SHA1 Message Date
Mark Johnston
a2d704d19f Avoid unnecessary object locking in vm_page_grab_pages_unlocked().
We were needlessly acquiring the object lock to call
vm_page_grab_pages() even when all of the requested pages were looked up
locklessly.  Fix that, stop testing for count == 0 in
vm_page_grab_pages(), and add assertions to help catch this kind of
mistake.

Reported by:	cem
Reviewed by:	alc, cem, dougm, jeff
Differential Revision:	https://reviews.freebsd.org/D26304
2020-09-02 19:59:25 +00:00
Ian Lepore
ac07cdf8f7 In ltc430x(4), add the ability to configure control register 2 via FDT or
hints data.  Control register 2 holds the settings a user might want to
configure, such as the timeout value for idle busses and whether to enable
the mass-writes feature.

Also add hint support for disconnecting idle busses (which was already
supported using FDT data).

Update the manpage with the new features, and also split the hints section
into separate lists of required and optional hints.
2020-09-02 19:37:47 +00:00
Mateusz Guzik
b1a824b684 vfs: retire vholdl as a symbol
Similarly to vrefl in r364283.
2020-09-02 19:21:37 +00:00
Mateusz Guzik
2b4632aee9 vfs: purge cache entries early on vgone
There is no reason for them to linger across reclaim and it is an
invariant that doomed vnodes are not added to the namecache.
2020-09-02 19:21:10 +00:00
Li-Wen Hsu
0932ee9fa0 Temporarily skip tests panic i386 kernel in CI
lib.libbe.be_create.libbe_create
sbin.bectl.bectl_test.bectl_create

PR:		249055
Sponsored by:	The FreeBSD Foundation
2020-09-02 19:18:27 +00:00
Mark Johnston
a0efcf6400 Add sysctl(8) formatting for hw.pagesizes.
- Change the type of hw.pagesizes to OPAQUE, since it returns an array.
- Modify the handler to only truncate the returned length if the caller
  supplied an output buffer.  This allows use of the trick of passing a
  NULL output buffer to fetch the output size, while preserving
  compatibility if MAXPAGESIZES is increased.
- Add a "S,pagesize" formatter to sysctl(8).

Reviewed by:	alc, kib
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26239
2020-09-02 18:17:08 +00:00
Mark Johnston
847ab36bf2 Include the psind in data returned by mincore(2).
Currently we use a single bit to indicate whether the virtual page is
part of a superpage.  To support a forthcoming implementation of
non-transparent 1GB superpages, it is useful to provide more detailed
information about large page sizes.

The change converts MINCORE_SUPER into a mask for MINCORE_PSIND(psind)
values, indicating a mapping of size psind, where psind is an index into
the pagesizes array returned by getpagesizes(3), which in turn comes
from the hw.pagesizes sysctl.  MINCORE_PSIND(1) is equal to the old
value of MINCORE_SUPER.

For now, two bits are used to record the page size, permitting values
of MAXPAGESIZES up to 4.

Reviewed by:	alc, kib
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26238
2020-09-02 18:16:43 +00:00
Fernando Apesteguía
2825bf5b2a kldstat(8): Add EXAMPLES to the man page
Add EXAMPLES for all the flags

Approved by:	manpages (bcr@)
Differential Revision: https://reviews.freebsd.org/D26283
2020-09-02 18:15:57 +00:00
Mark Johnston
2d838cd867 Add the MEM_EXTRACT_PADDR ioctl to /dev/mem.
This allows privileged userspace processes to find information about the
physical page backing a given mapping.  It is useful in applications
such as DPDK which perform some of their own memory management.

Reviewed by:	kib, jhb (previous version)
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D26237
2020-09-02 18:12:47 +00:00
Niclas Zeising
662c3e2084 drm2: Further improve deprecation message
Further improve the drm2 deprecation message, only displaying information
about the port for relevant architectures, and skipping the message
completely from arm, which uses some parts of drm2 still.

This is mostly intended to be merged to 12, since the base bits of drm2 on
FreeBSD 13 are only really used on arm.

Reviewed by:	manu, mmel
Approved by:	manu
MFC after:	3 days
X-MFC-with:	r364737
Differential Revision:	https://reviews.freebsd.org/D26275
2020-09-02 18:04:49 +00:00
Alan Somers
dc2541703c Fix output of nfsstat -cE in json or xml mode
Due to a copy/paste error, the "getacl" field was duplicated, but only in
XML or JSON mode, not in txt mode.

Discussed with:	rmacklem
MFC after:	1 week
Sponsored by:	Axcient
2020-09-02 17:36:30 +00:00
Ryan Moeller
de209fe10e Correct and expand on OpenZFS cache file and auto import
Reported by:	avg
Sponsored by:	iXsystems, Inc.
2020-09-02 16:03:33 +00:00
Konstantin Belousov
8f8838c059 Fix a page table pages leak after LA57.
If the call to _pmap_allocpte() is not sleepable, it is possible that
allocation of PML4 or PDP page is successful but either PDP or PD page
is not.  Restructured code in _pmap_allocpte() leaves zero-referenced
page in the paging structure.

Handle it by checking refcount of the page one level above failed
alloc and free that page if its reference count is zero.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D26293
2020-09-02 15:55:16 +00:00
Ryan Moeller
3fcf9dc4b7 Use MLINKS where appropriate for zfs/zpool subcommand pages
Reported by:	Julian H. Stacey
Sponsored by:	iXsystems, Inc.
2020-09-02 15:20:10 +00:00
Warner Losh
f03478b178 Add note about needing to manually import the zfs pools or update
/etc/rc.d due to the cache file moving to /etc.
2020-09-02 14:28:54 +00:00
Kyle Evans
8e0dc55e68 caroot: properly remove old distrusted roots
The proper procedure was not followed in r364943; all of these that were
deleted should have instead been moved over to the blacklist so that certctl
can DTRT.

Users must still `certctl rehash` after this, but this should generally be
done by one of mergemaster/etcupdate/freebsd-update/pkgbase already; note
that freebsd-update doesn't come into play for this particular update, as
these have not yet made it into a release.

Future work (after svn -> git) will likely change the script that updatecert
invokes to facilitate the process, rather than trusting that kevans or
whomever updates in the future will remember.

Reported by:	Helge Oldach <freebsd oldach net>
MFC after:	3 days
2020-09-02 12:57:34 +00:00
Andrew Turner
d14897f960 When CPUTYPE is an architecture name use -march
Allow architecture names to be passed in to the build system via CPUTYPE.
This allows the user to use values such as armv8.1-a or armv8-a+crc as
the CPUTYPE.

Sponsored by:	Innovate UK
2020-09-02 11:53:26 +00:00
Kristof Provost
51e805c43c ng_ether: Enter NET_EPOCH where required
We must enter NET_EPOCH before calling ether_output_frame(). Several of the
functions it calls (pfil_run_hooks, if_transmit) expect to be running in the
NET_EPOCH.

While here remove an unneeded EPOCH entry (which wasn't wide enough to cover
BRIDGE_INPUT).

PR:		248958
Reviewed by:	glebius, bz (previous version), melifaro (previous version)
Tested by:	manu
Differential Revision:	https://reviews.freebsd.org/D26226
2020-09-02 11:49:22 +00:00
Kristof Provost
3bebdc0564 riscv: very large dma mappings can cause integer overflow
Fix the return type for _bus_dmamap_addseg().
Based on the same fix done for arm64 in r348571.

Sponsored by:	Axiado
2020-09-02 11:33:31 +00:00
Hans Petter Selasky
e7b2173d0b Fix build fallout after r365054 .
Make sure that building dev/sdhci/sdhci_fsl_fdt.c has all the right
dependencies until a proper fix can be made.

Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-09-02 11:18:21 +00:00
Hans Petter Selasky
624677fad7 Assert that cc_exec_drain(cc, direct) is NULL before assigning a new value.
Suggested by:	markj@
Tested by:	callout_test
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-09-02 10:00:30 +00:00
Hans Petter Selasky
0d0053d7ed Micro optimise _callout_stop_safe() by removing dead code.
The CS_DRAIN flag cannot be set at the same time like the async-drain function
pointer is set. These are orthogonal features. Assert this at the beginning
of the function.

Before:
        if (flags & CS_DRAIN) {
                /* FALLTHROUGH */
        } else if (xxx) {
                return yyy;
        }
        if (drain) {
                zzz = drain;
        }
After:
        if (flags & CS_DRAIN) {
                /* FALLTHROUGH */
        } else if (xxx) {
                return yyy;
        } else {
                if (drain) {
                        zzz = drain;
                }
        }

Reviewed by:	markj@
Tested by:	callout_test
Differential Revision:	https://reviews.freebsd.org/D26285
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-09-02 09:44:00 +00:00
Hans Petter Selasky
72d849c761 Add small tool to invoke kernel test framework tests.
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-09-02 09:20:40 +00:00
Hans Petter Selasky
b1acfb2401 Fix build of epoch_test module.
While at it add missing epoch_free() call.

MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-09-02 09:17:29 +00:00
Andrew Turner
b148010b6a Partially revert r365069.
This whitespace was intentionally added to help differentiate the different
register groups within this file.

While here add missing whitespace from earlier in the file,

Sponsored by:	Innovate UK
2020-09-02 09:04:08 +00:00
Rick Macklem
ba774e9296 Fix the standalone build of the nfscl and nfsd modules.
Reported by:	jhs@berklix.com
2020-09-02 01:29:33 +00:00
Eric Joyner
2984a8dd7c ixl(4): Add support for X710-T*L devices
Add support for new devices which are capable of 2.5 and 5G speeds, as well as
Energy Efficient Ethernet (EEE):

- introduce new device ids
- add ability to select 2.5 and 5G speeds on devices which support it
- add sysctls to enable EEE and read related statistics

Submitted by:	Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by:	#IntelNetworking
MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D25549
2020-09-01 23:16:38 +00:00
Mateusz Guzik
b4a5336039 kgssapi: clean up empty lines in .c and .h files 2020-09-01 22:15:02 +00:00
Mateusz Guzik
3e0cd950ac nlm: clean up empty lines in .c and .h files 2020-09-01 22:14:52 +00:00
Mateusz Guzik
b10bc5a1d5 ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
Mateusz Guzik
d40bc60752 geom: clean up empty lines in .c and .h files 2020-09-01 22:14:09 +00:00
Mateusz Guzik
27dcd3d90b cam: clean up empty lines in .c and .h files 2020-09-01 22:13:48 +00:00
Mateusz Guzik
985b8ee8d2 xdr: clean up empty lines in .c and .h files 2020-09-01 22:13:28 +00:00
Mateusz Guzik
f6e54eb360 sys: clean up empty lines in .c and .h files 2020-09-01 22:12:58 +00:00
Mateusz Guzik
6fed89b179 kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
Mateusz Guzik
ab326db897 cpufreq: clean up empty lines in .c and .h files 2020-09-01 22:11:48 +00:00
Mateusz Guzik
a7699405cb cpuctl: clean up empty lines in .c and .h files 2020-09-01 22:11:22 +00:00
Mateusz Guzik
ea78d63ed0 cmx: clean up empty lines in .c and .h files 2020-09-01 22:11:05 +00:00
Mateusz Guzik
405b8d43e4 ciss: clean up empty lines in .c and .h files 2020-09-01 22:10:55 +00:00
Mateusz Guzik
0979589188 cfi: clean up empty lines in .c and .h files 2020-09-01 22:10:34 +00:00
Mateusz Guzik
9c0df1da91 cfe: clean up empty lines in .c and .h files 2020-09-01 22:10:24 +00:00
Mateusz Guzik
594dd1ded3 cesa: clean up empty lines in .c and .h files 2020-09-01 22:10:11 +00:00
Mateusz Guzik
ebf31a5cb9 ce: clean up empty lines in .c and .h files 2020-09-01 22:10:00 +00:00
Mateusz Guzik
44b1283d2a cardbus: clean up empty lines in .c and .h files 2020-09-01 22:09:41 +00:00
Mateusz Guzik
2334c4b865 cadence: clean up empty lines in .c and .h files 2020-09-01 22:09:26 +00:00
Mateusz Guzik
1224a253d8 md: clean up empty lines in .c and .h files 2020-09-01 22:08:52 +00:00
Mateusz Guzik
9f169a20b5 mem: clean up empty lines in .c and .h files 2020-09-01 22:08:39 +00:00
Mateusz Guzik
f0782e02a2 mfi: clean up empty lines in .c and .h files 2020-09-01 22:08:26 +00:00
Mateusz Guzik
fc32241fc8 mgb: clean up empty lines in .c and .h files 2020-09-01 22:08:14 +00:00
Mateusz Guzik
0077d05cae mii: clean up empty lines in .c and .h files 2020-09-01 22:07:59 +00:00