Commit Graph

279232 Commits

Author SHA1 Message Date
Andrew Turner
64c3edc237 Allow the extres regulator code to build without FDT
This allows drivers that use this to build in an ACPI only kernel.

Sponsored by:	The FreeBSD Foundation
2022-10-27 17:28:56 +01:00
Andrew Turner
16625cabab Only build if_mvneta.c when FDT is defined
This is only ever used by a FDT specific attachment and calls into
FDT specific functions. Only build it when FDT is in the kernel config.
Sponsored by:	The FreeBSD Foundation
2022-10-27 17:21:02 +01:00
Andrew Turner
91e2614a71 Fix xdma_if.m in an ACPI only kernel
- We depend on header polution to include sys/malloc.h. Include it
   directly.
 - Only define FDT-specific fuctions when building a FDT kernel.

Sponsored by:	Innovate UK
2022-10-27 17:17:20 +01:00
Andrew Turner
7b43fba03a Mark FDT only drivers as such
These drivers have FDT bindings, but not ACPI. Mark them as FDT only
to help a no-FDT LINT kernel build.

Sponsored by:	The FreeBSD Foundation
2022-10-27 17:06:15 +01:00
Andrew Turner
7ddba690f8 Remove an unneeded cpu_dcache_wb_range from arm64
The cpu_dcache_wb_range function is an expensive function that is
unneeded in ddb. It is used when the cache needs to be written to RAM,
e.g. when working with a non-cache coherent device.

Remove it as cpu_icache_sync_range already has the needed d-cache
handling to ensure any changed memory is visible to the i-cache.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37037
2022-10-27 17:05:46 +01:00
Kyle Evans
60c96dbf20 arm64: add a std.ec2 config
Mostly to document basic harware present on the platform; knowing that
Graviton exposes an ns8250 uart alone is quite helpful.

Reviewed by:	andrew, imp, manu
Seems accurate:	cperciva
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D36776
2022-10-27 10:39:55 -05:00
Ed Maste
43d0c2ddd2 netlink: use (void) for function definitions with no arguments
For some of these Clang produced a warning that "a function declaration
without a prototype is deprecated in all versions of C".  In other cases
the function defintion used () which did not match the header
declaration, which used (void).

Sponsored by:	The FreeBSD Foundation
2022-10-27 11:14:00 -04:00
Mark Johnston
ae71263c66 bhyve: Remove an unused parameter from pci_nvme_append_iov_req()
No functional change intended.

MFC after:	1 week
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D37116
2022-10-27 10:48:55 -04:00
Mark Johnston
a309ad7bd1 bhyve: Fix an apparent pointer arithmetic bug in the xhci emulation
Also remove the out-parameter of pci_xhci_find_stream(), since it's
unused by all callers.

MFC after:	1 week
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D37118
2022-10-27 10:48:55 -04:00
Mark Johnston
04336c0562 bhyve: Make sure that the VNC version is initialized
clang warned that "client_ver" can be left uninitialized.  This change
causes the new connection to be dropped if a version string is not
presented.

MFC after:	1 week
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D37117
2022-10-27 10:48:55 -04:00
Dag-Erling Smørgrav
e7c13cf438 script: Add usage string for playback mode.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D37138
2022-10-27 14:46:15 +00:00
Dag-Erling Smørgrav
8e096e24d4 script: Correct -F in man page and usage string.
Sponsored by:	Klara, Inc.
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37138
2022-10-27 14:46:09 +00:00
Souradeep Chakrabarti
9729f076e4 arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final)
This is the last part for ARM64 Hyper-V enablement. This includes
commone files and make file changes to enable the ARM64 FreeBSD
guest on Hyper-V. With this patch, it should be able to build
the ARM64 image and install it on Hyper-V.

Reviewed by:	emaste, andrew, whu
Tested by:	Souradeep Chakrabarti <schakrabarti@microsoft.com>
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D36744
2022-10-27 13:53:22 +00:00
Peter Holm
9349fc283b stress2: Added a newfs(8) test scenario 2022-10-27 09:59:16 +02:00
Peter Holm
e23445275a stress2: Added a regression test for a ffs validate_sblock() fix 2022-10-27 09:57:57 +02:00
Xin LI
07dfb236c8 MFV: Restore the ability to process files from stdin immediately.
PR:		bin/267221
MFC after:	3 days
2022-10-27 00:12:53 -07:00
Christos Zoulas
5d5531f83b Use the -n flag to produce immediate results and kill the short-lived -I.
(cherry picked from commit 425f9897f0ed791a6c216c24375bd9b3a42330a2)
2022-10-27 00:10:55 -07:00
Christos Zoulas
d5e82a1bb0 In immediate mode, print with the current width.
(cherry picked from commit 7d489233e5f27decdbcfb0e8ecba0b0b5fdc6066)
2022-10-27 00:10:35 -07:00
Christos Zoulas
ac428f59cd PR/397: dadv: Restore the ability of processing filenames from stdin
immediately, using the -I flag.

(cherry picked from commit ae5c1ff8df0d6e00cbf5e31875d777edbb88d60a)
2022-10-27 00:10:11 -07:00
Kyle Evans
866beaa0aa psci: set psci_present as early as possible
psci_attach is way too late to provide the intended semantics for
psci_present.  psci calls can be made immediately after psci_init(),
called way earlier at SI_SUB_CPU + SI_ORDER_FIRST, and we need it to
be valid as early as we can possibly call a psci function.

This fixes booting RPi3+4 with the in-review spintable patch;
rpi3-psci-monitor patches the FDT to add a PSCI node, but it doesn't
patch each cpus' enable-method.  Because of this, we would stall the
boot while enabling CPU 1 as we saw a valid looking enable-method and
"no" functional PSCI and attempted to use the spintable rather than
simply not starting secondary APs.

Fixes:	2218070b2c ("psci: finish psci_present implementation")
Reported by:	karels
2022-10-26 23:22:23 -05:00
Konstantin Belousov
017367c114 ffs validate_sblock(): avoid 32bit mul overflow
Reported by:	soralx@cydem.org
Tested by:	pho
Reviewed by:	mckusick
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-10-27 06:17:38 +03:00
Jason A. Harmening
f7833196bd vfs_lookup(): Minor performance optimizations
Refactor the symlink and mountpoint traversal logic to avoid
repeatedly checking the vnode type; a symlink cannot be a mountpoint
and vice versa.  Avoid repeatedly checking cn_flags for NOCROSSMOUNT
and simplify the check which determines whether the vnode is a
mountpoint.

Suggested by:	mjg
Reviewed by:	kib
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D35054
2022-10-26 19:33:33 -05:00
Jason A. Harmening
4390622c8d vfs_busy(): fix wording in comment
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D35054
2022-10-26 19:33:30 -05:00
Jason A. Harmening
706f15c5fa Remove witness directives from crossmp locking VOPs
These are of limited use since the crossmp vnode locking ops have not
actually used a lock since commit
a2d3554542.  We in fact require that
these operations are always issued with LK_SHARED.  Additionally,
these directives can produce a false positive in certain VV_CROSSLOCK
cases which require upgrading of the covered vnode lock from shared
to exclusive.

While here, replace the runtime check of LK_SHARED with a KASSERT and
expand the check to include LK_NOWAIT, which all callers pass.

Reviewed by:	kib
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D35054
2022-10-26 19:33:18 -05:00
Jason A. Harmening
080ef8a418 Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR
When a lookup operation crosses into a new mountpoint, the mountpoint
must first be busied before the root vnode can be locked. When a
filesystem is unmounted, the vnode covered by the mountpoint must
first be locked, and then the busy count for the mountpoint drained.
Ordinarily, these two operations work fine if executed concurrently,
but with a stacked filesystem the root vnode may in fact use the
same lock as the covered vnode. By design, this will always be
the case for unionfs (with either the upper or lower root vnode
depending on mount options), and can also be the case for nullfs
if the target and mount point are the same (which admittedly is
very unlikely in practice).

In this case, we have LOR. The lookup path holds the mountpoint
busy while waiting on what is effectively the covered vnode lock,
while a concurrent unmount holds the covered vnode lock and waits
for the mountpoint's busy count to drain.

Attempt to resolve this LOR by allowing the stacked filesystem
to specify a new flag, VV_CROSSLOCK, on a covered vnode as necessary.
Upon observing this flag, the vfs_lookup() will leave the covered
vnode lock held while crossing into the mountpoint. Employ this flag
for unionfs with the caveat that it can't be used for '-o below' mounts
until other unionfs locking issues are resolved.

Reported by:	pho
Tested by:	pho
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D35054
2022-10-26 19:33:03 -05:00
John Baldwin
769b884e2e vmm: Fix AP startup with old userspace binaries.
Older binaries that do not request IPI exits to userspace do not
start user threads for other vCPUs until a STARTUP IPI triggers a
VM_EXITCODE_SPINUP_AP exit to userland.  This means that those vcpus
are not yet active (in terms of vm_active_cpus) when the INIT and
STARTUP IPIs are delivered to the vCPUs.

The changes in commit 0bda8d3e9f changed the INIT and STARTUP IPIs
to reuse the existing vlapic_calcdest() function.  This function
silently ignores IPIs sent to inactive vCPUs.  As a result, when using
an old bhyve binary, the INIT and STARTUP IPIs sent to wakeup APs were
ignored.

To fix, restructure the compat code for the INIT and STARTUP IPIs to
ignore the results of vlapic_calcdest() and manually parse the APIC ID
and resulting vcpuid.  As part of this, make the compat code always
conditonal on the ipi_exit capability being disabled.

Reviewed by:	c.koehne_beckhoff.com, markj
Differential Revision:	https://reviews.freebsd.org/D37093
2022-10-26 14:22:56 -07:00
Ed Maste
8aa64f3073 UPDATING: correct spearate typo
Reported by:	manu
Fixes:		9c36300582 ("UPDATING: add an introductory...")
2022-10-26 14:25:12 -04:00
Ed Maste
9c36300582 UPDATING: add an introductory sentence to 20221026's entry 2022-10-26 14:18:29 -04:00
Emmanuel Vadot
5575454d7c UPDATING: Add note for pkgbase users after splitting packages. 2022-10-26 19:48:32 +02:00
Emmanuel Vadot
069ebe6fba pkgbase: Put less in FreeBSD-runtime
Useful to have a pager in it.

Differential Revision:	https://reviews.freebsd.org/D36231
2022-10-26 19:46:43 +02:00
Emmanuel Vadot
feec04b355 pkgbase: Create a FreeBSD-games package
And put :
- pom
- caesar
- grdc

Differential Revision:	https://reviews.freebsd.org/D36230
2022-10-26 19:46:40 +02:00
Emmanuel Vadot
e7a5a60ed5 pkgbase: Put devmatch in its own package
devmatch is useful on standalone machine but not on jails.
Put devinfo(8) and libdevinfo there too.

Differential Revision:	https://reviews.freebsd.org/D36229
2022-10-26 19:46:38 +02:00
Emmanuel Vadot
ea0850e4be pkgbase: Put devd in its own package
It's not that useful in a jail or in a mdroot.

Differential Revision:	https://reviews.freebsd.org/D36228
2022-10-26 19:46:36 +02:00
Emmanuel Vadot
a7ffc94849 pkgbase: Put ufs related tools and lib in their own package
It's not really useful in a jail or in a mdroot or even if a users
wants to do a full zfs machine.

Reviewed by:	mckusick
Differential Revision:	https://reviews.freebsd.org/D36227
2022-10-26 19:46:34 +02:00
Emmanuel Vadot
a099694ecd pkgbase: Put libwrap in FreeBSD-tcpd package
It belongs there with the tcp wrapper utilities

Differential Revision:	https://reviews.freebsd.org/D36226
2022-10-26 19:46:32 +02:00
Emmanuel Vadot
a71ea7bea0 pkgbase: Put zfs utilities and lib in their own package
It is useful to have zfs utilities and lib in a separate package as
it allow users to create image that can support ZFS (i.e. not with
WITHOUT_ZFS in src.conf set) without bloating the default image with
all zfs tools (for example for jails).

Differential Revision:	https://reviews.freebsd.org/D36225
2022-10-26 19:46:30 +02:00
Emmanuel Vadot
0bf688786f pkgbase: Put geom utilities in their own package
For most users it's not needed to boot and they are also
available in the FreeBSD-rescue package in case an update
break and FreeBSD-geom package isn't updated correctly.

Differential Revision:	https://reviews.freebsd.org/D36224
2022-10-26 19:46:28 +02:00
Emmanuel Vadot
6987b552dd pkgbase: Put resolvconf in its own package
It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Differential Revision:	https://reviews.freebsd.org/D36223
2022-10-26 19:46:26 +02:00
Emmanuel Vadot
ab4bd66752 pkgbase: Put dhclient in its own package
It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Reviewed by:	emaste, imp
Differential Revision:	https://reviews.freebsd.org/D36222
2022-10-26 19:46:24 +02:00
Emmanuel Vadot
5f9db65d8a pkgbase: Put nvmecontrol in its own package
It doesn't really make sense to have it in runtime and let's not
bloat utilities more.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D36221
2022-10-26 19:46:22 +02:00
Ed Maste
c898b54aff sendmail: fix auth with cyrus-sasl-2.1.28
Apply patch extracted from sendmail-8-17.1.9 snapshot by dinoex@.

PR:		262935
Reviewed by:	gshapiro
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37119
2022-10-26 12:58:56 -04:00
Dag-Erling Smørgrav
deb2f1b616 w: Fix premature rounding.
If the system has been up more longer than a minute, we add 30 seconds to
the uptime so that subsequent calculations will round to the nearest minute
rather than truncate.  However, since the introduction of libxo, we output
the raw value after performing the adjustment.  Rewrite so that we output
the raw value first, then perform the adjustment and recalculate before
outputting the humanized value.

While there, reduce stack usage and avoid needless allocations.

Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37128
2022-10-26 15:56:40 +00:00
Mateusz Guzik
d346e3ac33 vfs: use cache_assert_no_entries instead of open-coding it 2022-10-26 15:54:19 +00:00
Gordon Bergling
5daf88ea5e qlnxe(4): Fix a typo in a source code comment
- s/defult/default/

MFC after:	3 days
2022-10-26 17:27:07 +02:00
Gleb Smirnoff
77fe40cf2f netinet*: add back necessary headers
The LINT successful build was provided by the includes that SCTP
pulled in.

Fixes:	92e190f11f
2022-10-26 08:16:44 -07:00
Souradeep Chakrabarti
d16d0b6b19 Hyper-V: Code refactor to avoid redundancy of MSR values on x86 and arm64
Refactor the code to put split the MSR values for x86 and arm64
Hyper-V. Code not yet built. This is one of several patches for
the arm64 Hyper-V enablement.

Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D37103
2022-10-26 03:50:59 +00:00
Kyle Evans
7aaa50c6b5 split: add word order fix
This was meant to note that both pattern and line matching were
previously restricted, but words are difficult.  +line and rearrange.

Sponsored by:	Klara, Inc.
2022-10-25 16:52:14 -05:00
Jose Luis Duran
7cfd67ce96 strfmon(3): Fix # explanation
There's only one value that specifies the number of digits after the
decimal point (oh, sorry, the "radix character") the other specifies the
number before...

While here, add a little more info on the effects of using the #n value.

Obtained from:	d1dd1a0864
Reviewed by:	kib
PR:	267282
Github PR:	#619
MFC after:	1 week
2022-10-26 00:48:20 +03:00
Jose Luis Duran
0efec50e9e strfmon(3): Remove repeated words
Reviewed by:	kib
PR:	267282
Github PR:	#619
MFC after:	1 week
2022-10-26 00:40:17 +03:00
Jose Luis Duran
34f88528ed strfmon: Fix formatting of a second fixed-width value
There is a bug when formatting two consecutive values using fixed-widths
and the values need padding.  This was because the value of pad_size
was zeroed only every other time.

Format           Before                         After
[%8n] [%8n]      [ $123.45] [       $123.45]    [ $123.45] [ $123.45]

Reviewed by:	kib
PR:	267282
Github PR:	#619
MFC after:	1 week
2022-10-26 00:40:17 +03:00