Commit Graph

246703 Commits

Author SHA1 Message Date
Warner Losh
66e5985084 Move reset to the interrutp processing stage
This trims the boot time a bit more for AWS and other platforms that have nvme
drives. There's no reason too do this inline. This has been in my tree a while,
but IIRC I talked to Jim Harris about this at one of our face to face meetings.

MFC After: 2 weeks
2019-12-11 22:51:02 +00:00
Ed Maste
1760167c2b libpmc: convert arm64 data files to proper json
jevents includes a very permissive json parser that accepts invalid
json, of which there are many examples in libpmc (typically extra or
missing commas).  Convert the arm64 files to proper json so other tools
can parse them.

Sponsored by:	The FreeBSD Foundation
2019-12-11 22:09:22 +00:00
Emmanuel Vadot
5757a34c7a dwmmc: Use device_delete_children
Instead of first detaching the children(s) and then delete them,
use the device_delete_children function that does all of that.

MFC after:	1 month
Suggested by:	ian
2019-12-11 19:40:30 +00:00
Kyle Evans
0d80770c71 makesyscalls.lua: trim trailing spaces/commas from args
These are insignificant as far as declarations go, and we've historically
allowed it. fhlinkat in ^/sys/kern/syscalls.master, for example, currently
has a trailing comma after its final argument that this version of
makesyscalls is ignoring (not by conscious decision).

Fix it for now by actively stripping off trailing whitespace/commas until
we decide to actively prohibit it.
2019-12-11 19:32:52 +00:00
Emmanuel Vadot
87d4212b1d dwmmc: Handle the card detect interrupt
The driver used to always add the mmc device as it's child even
it no card was detected. Add a function that will detect if the
card is present or not and that will attach/detach the mmc device.
The function is either call on attach (as we won't have the interrupt
fired) or from two taskqueues. The first taskqueue will directly call
the function when the sdcard was present and is now removed and the other
one will delay a bit the attach when we didn't had a card and now have one.
This is mostly based on comments from the sdhci driver where it describe
a situation when the CD pin is detected before the others pins are connected.

MFC after:	1 month
2019-12-11 18:50:23 +00:00
Emmanuel Vadot
1a37b8cdde arm64: rockchip: Add a module for rk_dwmmc
This is mostly needed for dev/debug as most users will have their root
on the sdcard or emmc.

MFC after:	1 month
2019-12-11 18:43:39 +00:00
Emmanuel Vadot
87dc015dbf dwmmc: Add a detach method
This method will disable the regulators, clocks and assert the reset of
the module. It will also detach it's children (the mmc device) and release
it's resources.
While here enable the regulators on attach as we need them to power up
the sdcard or emmc.

MFC after:	1 month
2019-12-11 18:41:13 +00:00
Emmanuel Vadot
6fe4e8bdbd arm64: rk3328: Add the *clk_peri_niu clocks
Those clocks are always enable by default and are not really explained
in the TRM but the reason we had them is that they have the periph clock
as a parent and those parent should never be disable which can happen
if we disable all the childs. The current childs are the sd/emmc/sdio clocks
so the board will hang if we disable them.

MFC after:	1 month
2019-12-11 18:39:05 +00:00
Emmanuel Vadot
946c511ee5 arm64: Add explicit devices for dwmmc variant
We used to include the hisi version if soc_hisi_hi6220 was present,
include the altera version if dwmmc_altera was present and include
the rockchip version if soc_rockchip_rk3328 was present.
Now every version have it's own device directive.
The rockchip version isn't named dwmmc_rockchip because all other
rockchip driver are named rk_XXX.

MFC after:	1 month
2019-12-11 18:36:07 +00:00
Ed Maste
c4853d4514 arm linuxulator: regen sysent after r355621 2019-12-11 18:24:43 +00:00
Ed Maste
ca2c3dea28 arm linuxulator: put syscall type and argument on one line 2019-12-11 18:21:35 +00:00
Ed Maste
09019cc0fc arm linuxulator: add "make sysent" generated files
Sponsored by:	The FreeBSD Foundation
2019-12-11 17:52:06 +00:00
Ed Maste
0ecf09af8c connect arm linuxulator to top-level make sysent
Reported by:	kevans
2019-12-11 17:48:34 +00:00
Simon J. Gerraty
312809fe7f Update dirdeps.mk and gendirdeps.mk
The env space consumed by exporting all libc's .meta files
left little room for command line,
so unexport when done.

Update dirdeps.mk to latest and add
dirdeps-targets.mk to simplify/update targets/Makefile

Makefile changes to go with Makefile.depend changes in D22494

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22495
2019-12-11 17:38:15 +00:00
Simon J. Gerraty
2c9a9dfc18 Update Makefile.depend files
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22494
2019-12-11 17:37:53 +00:00
Simon J. Gerraty
5ab1c5846f Add Makefile.depend.options
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend

DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options

See share/mk/dirdeps-options.mk

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22469
2019-12-11 17:37:37 +00:00
Ed Maste
beede70e51 arm linuxulator: add syscalls.conf and Makefile for "make sysent"
Differential Revision:	https://reviews.freebsd.org/D7973
2019-12-11 17:28:49 +00:00
Ed Maste
29f64e28ba kbdmap: allow INDEX.keymaps to provide the dialog title
Previously kbdmap had a localized menu heading ("Choose your keyboard
layout") but not the dialog title ("Keyboard Menu").

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2019-12-11 17:19:36 +00:00
Ed Maste
d777076f29 security.7: add caveat about interim sysctl paths from r355436
r355436 moved mitigation sysctls to machdep.mitigations but did not
rationalize the sense of the invidual knobs.  Clarify that the old
names remain the canonical way to set these mitigations.

Backwards compatibility will be maintained for the original names
(e.g. hw.ibrs_disable), but not from the interim names
(e.g. machdep.mitigations.ibrs.disable).

Sponsored by:	The FreeBSD Foundation
2019-12-11 16:43:54 +00:00
Doug Moore
037c0994bf Extract code common to _vm_map_clip_start and _vm_map_clip_end into a
function, vm_map_entry_clone, that can be invoked by each.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D22760
2019-12-11 16:09:57 +00:00
Andriy Gapon
64ebbdd54d add a sanity check to the system call registration code
A system call number should be at least reserved.
We do not expect an attempt to register a fixed number system call
when nothing at all is known about it.

MFC after:	3 weeks
Sponsored by:	Panzura
2019-12-11 15:52:29 +00:00
Ed Maste
c590fd27de Make NOCLEAN an error instead of a warning
The warning was added in r289728 (over four years ago) and at that time
NO_CLEAN was already the correct spelling for over a decade.

Make NOCLEAN an error as the next step to removing these backward
compatibility shims.
2019-12-11 14:54:29 +00:00
Ryan Libby
6d204a6a0e uma: pretty print zone flags sysctl
Requested by:	jeff
Reviewed by:	jeff, markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22748
2019-12-11 06:50:55 +00:00
Dimitry Andric
a9365f4a17 Add a few missed source files to libllvm, for the MK_LLVM_TARGET_BPF=yes
case.  Otherwise, linking of clang and other llvm based executables
would complain about missing symbols.

Reported by:	rstone
MFC after:	1 month
X-MFC-With:	r353358
2019-12-10 22:10:25 +00:00
John Baldwin
5773ac113c Use callout_func_t instead of the deprecated timeout_t.
Reviewed by:	kib, imp
Differential Revision:	https://reviews.freebsd.org/D22752
2019-12-10 22:06:53 +00:00
John Baldwin
a8a03706fb Add a callout_func_t typedef for functions used with callout_*().
This typedef is the same as timeout_t except that it is in the callout
namespace and header.

Use this typedef in various places of the callout implementation that
were either using the raw type or timeout_t.

While here, add <sys/callout.h> to the manpage.

Reviewed by:	kib, imp
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D22751
2019-12-10 21:58:30 +00:00
John Baldwin
15d0350503 Correct the offset of static TLS variables for Initial-Exec on RISC-V.
TP points to the start of the TLS block after the tcb, but
Obj_Entry.tlsoffset includes the tcb, so subtract the size of the tcb
to compute the offset relative to TP.

This is identical to the same fixes for powerpc in r339072 and r342671.

Reviewed by:	James Clarke
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D22661
2019-12-10 21:56:44 +00:00
Ian Lepore
f24f20f435 Do not attach children of owc_gpiobus until interrupts are working.
The children of the bus need to do IO on the bus to probe for hardware
presence.  Doing IO means timing the bus states using sbinuptime(), and
that requires working timecounters, which are not initialized until after
device attachment has completed.

PR:		242526
2019-12-10 21:48:21 +00:00
Navdeep Parhar
d7190ba048 cxgbe(4): Man page updates to go with r355107.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2019-12-10 20:51:28 +00:00
Vladimir Kondratyev
fdae7d9496 [ig4] Remove unused methods from bus interface
bus_get/set_resource methods are implemented in child device (iicbus).
As their implementation with bus_generic_rl_get/set calls do not
recurse up the tree, the versions in ig4 are never called.

Suggested by:	jhb
2019-12-10 20:23:05 +00:00
Navdeep Parhar
c08c2d42cf cxgbe(4): Simplify the firmware version checks a bit.
No functional change.

MFC after:	1 week
2019-12-10 20:12:21 +00:00
Ed Maste
ca74f06a98 remove again nonexistent from-* entries from vt INDEX.keymaps
A number of entries of the form "de.kbd.from-cp850" existed in vt's
INDEX.keymaps, added in r270114, but these files do not exist.

I removed them in r355585 but accidentally re-added them in r355592.
Remove them yet again.

PR:		235564, 235853
MFC after:	1 week
2019-12-10 20:11:39 +00:00
Eric van Gyzen
15da40b0af fsck_ffs: fix some memory leaks found by Coverity.
Reported by:	Coverity
CID:		1380549 1380550 1380551
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2019-12-10 20:04:08 +00:00
Ed Maste
46035750a4 Add Danish translation for vt font and keymap INDEX files
Also sort some entries into the correct location, correct MacBook
capitalization, etc.

PR:		235853
MFC after:	1 week
Submitted by:	scootergrisen gmail com
2019-12-10 20:02:57 +00:00
Stefan Eßer
746af69907 Replace two remaining hex values for control codes with their names.
These were the only values in the range from 0 to 0x1f that were defined
as hex values, all other occurances have been converted before.

MFC after:	1 week
2019-12-10 19:52:29 +00:00
Kyle Evans
6e816d8711 sed: process \r, \n, and \t
This is both reasonable and a common GNUism that a lot of ported software
expects.

Universally process \r, \n, and \t into carriage return, newline, and tab
respectively. Newline still doesn't function in contexts where it can't
(e.g. BRE), but we process it anyways rather than passing
UB \n (escaped ordinary) through to the underlying regex engine.

Adding a --posix flag to disable these was considered, but sed.1 already
declares this version of sed a super-set of POSIX specification and this
behavior is the most likely expected when one attempts to use one of these
escape sequences in pattern space.

This differs from pre-r197362 behavior in that we now honor the three
arguably most common escape sequences used with sed(1) and we do so outside
of character classes, too.

Other escape sequences, like \s and \S, will come later when GNU extensions
are added to libregex; sed will likely link against libregex by default,
since the GNU extensions tend to be fairly un-intrusive.

PR:		229925
Reviewed by:	bapt, emaste, pfg
Differential Revision:	https://reviews.freebsd.org/D22750
2019-12-10 19:16:00 +00:00
Scott Long
0d42317659 Fix the TAA state machine to do the right thing when the TAA
migitation is available in microcode and the operator has set
the sysctl to automatic mode.

Reported by:	Coverity
CID: 1408334

MFC after:	3 days
Sponsored by:	Intel
2019-12-10 18:57:39 +00:00
Bryan Drewery
96aaefdf55 Fix WITHOUT_CLANG build.
This decouples MK_LLVM_TARGET_ALL from MK_CLANG. It is fine if
LLVM_TARGET_* are set even if MK_CLANG is disabled. It never
made sense to depend MK_LLVM_TARGET_* to MK_CLANG (which I did
in r335706).

PR:	        240507
Reported by:	kevans, swills
MFC after:	2 weeks
2019-12-10 18:50:50 +00:00
Mark Johnston
9be9ea420e Add a helper function to the swapout daemon's deactivation code.
vm_swapout_object_deactivate_pages() is renamed to
vm_swapout_object_deactivate(), and the loop body is moved into the new
vm_swapout_object_deactivate_page().  This makes the code a bit easier
to follow and is in preparation for some functional changes.

Reviewed by:	jeff, kib
Sponsored by:	Netflix, Intel
Differential Revision:	https://reviews.freebsd.org/D22651
2019-12-10 18:15:20 +00:00
Mark Johnston
5cff1f4dc3 Introduce vm_page_astate.
This is a 32-bit structure embedded in each vm_page, consisting mostly
of page queue state.  The use of a structure makes it easy to store a
snapshot of a page's queue state in a stack variable and use cmpset
loops to update that state without requiring the page lock.

This change merely adds the structure and updates references to atomic
state fields.  No functional change intended.

Reviewed by:	alc, jeff, kib
Sponsored by:	Netflix, Intel
Differential Revision:	https://reviews.freebsd.org/D22650
2019-12-10 18:14:50 +00:00
Ed Maste
be35d6745b remove nonexistent from-* entries from vt INDEX.keymaps
A number of entries of the form "de.kbd.from-cp850" existed in vt's
INDEX.keymaps, added in r270114, but these files do not exist.

PR:		235564
Submitted by:	scootergrisen gmail com
MFC after:	1 week
2019-12-10 14:35:38 +00:00
Konstantin Belousov
332f313c45 UFS: implement VOP_INACTIVE()
The checks literally repeat conditions that make ufs_inactive() to
take some actions.

Reviewed by:	jeff
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D22616
2019-12-10 14:07:05 +00:00
Ed Maste
061346b271 strip trailing whitespace from font and keymap INDEX files
PR:		235853
Submitted by:	scootergrisen gmail com
MFC after:	1 week
2019-12-10 13:52:08 +00:00
Alex Richardson
2719bb7ebb Use ${.ALLSRC:Ninstalldirs-*} instead of assuming order of .ALLSRC
This is a follow-up to https://reviews.freebsd.org/D22382

Suggested By:	sjg
2019-12-10 12:12:48 +00:00
Andrey V. Elsukov
ca0ac0a6c1 Avoid access to stale ip pointer and call UPDATE_POINTERS() after
PULLUP_LEN_LOCKED().

PULLUP_LEN_LOCKED() could update mbuf and thus we need to update related
pointers that can be used in next opcodes.

Reported by:	Maxime Villard <max at m00nbsd net>
MFC after:	1 week
2019-12-10 10:35:32 +00:00
Navdeep Parhar
aa7bdbc00c cxgbe(4): Use TX_PKTS2 work requests in netmap Tx if it's available.
TX_PKTS2 is more efficient within the firmware and this improves netmap
Tx by a few Mpps in some common scenarios.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2019-12-10 08:16:19 +00:00
Navdeep Parhar
6f012c14bc cxgbe(4): Update T4/5/6 firmwares to 1.24.11.0.
These were obtained from the Chelsio Unified Wire v3.12.0.1 beta
release.

Note that the firmwares are not uuencoded any more.

MFH:		1 month
Sponsored by:	Chelsio Communications
2019-12-10 07:45:10 +00:00
Ed Maste
00b6911b7f Add missing language specifier for Hebrew il.kbd description
PR:		235094 (related)
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-12-10 03:42:59 +00:00
Takanori Watanabe
7d57de6036 Add ACPI battery subsystem man page.
PR:242100
Differential Revision:	https://reviews.freebsd.org/D22556
2019-12-10 02:19:07 +00:00
Mateusz Guzik
ff4486e827 vfs: refactor vhold and vdrop
No fuctional changes.
2019-12-10 00:08:05 +00:00