Commit Graph

277205 Commits

Author SHA1 Message Date
Konstantin Belousov
1b0a4974c5 thread_create(): call cpu_copy_thread() after td_pflags is zeroed
By calling the function too early we might still have the td_pflags
value cached from the previous struct thread use. cpu_copy_thread()
depends on correct value for TDP_KTHREAD at least on x86.

Reported, bisected, and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D36069
2022-08-08 19:44:17 +03:00
Franco Fichtner
28b64169ea pf: stop resolving hosts as dns that use ":" modifier
When the interface does not exist avoid passing host with special pf
modifiers to DNS resolution as they come up empty anyway.

Reviewed by:	kp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35429
2022-08-08 18:31:52 +02:00
Glen Barber
45add40717 release: fix alignment for arm SoCs
MFC after:	3 days
Submitted by:	Mark Millard
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-08-08 10:59:29 -04:00
Emmanuel Vadot
b273f93657 Bump __FreeBSD_version after linuxkpi changes. 2022-08-08 15:22:36 +02:00
Emmanuel Vadot
2ff0f05149 linuxkpi: pm: Add more defines and includes
Needed by drm-kmod.

Reviewed By:	emaste, hselasky
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36024
2022-08-08 15:22:36 +02:00
Emmanuel Vadot
b829f450a7 linuxkpi: Include highmem.h in pagemap.h
Linux does the same.

Reviewed by:	bz, emaste, hselasky
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36023
2022-08-08 15:22:36 +02:00
Emmanuel Vadot
789dbdbb48 linuxkpi: Add arch_io_{reserve,free}_memtype_wc
Reviewed by:	hselasky
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36022
2022-08-08 15:22:36 +02:00
Emmanuel Vadot
a7727e1a6d linuxkpi: Add dev_info_once
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36021
2022-08-08 15:22:36 +02:00
Emmanuel Vadot
eca2f0f380 linuxkpi: Add smp_mb__before/after_atomic
Reviewed by:	hselasky
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36020
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
d1c3cfd79d linuxkpi: Add trylock_page and unlock_page
Simple wrapper around vm_page_trylock and vm_page_unlock.

Reviewed by:	hselasky
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36019
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
7d2702a198 linuxkpi: Add more notifier defines
Needded by drm-kmod.

Reviewed by:	bz, emaste, hselasky
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36018
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
2d4b17685f linuxkpi: errno: Add EHWPOISON
Needed by drm-kmod.

Reviewed by:	bz, hselasky
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36017
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
37cda2837c linuxkpi: Add compat_ptr and ptr_to_compat
Needed by drm-kmod.

Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36016
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
39da3678b1 linuxkpi: Add try_cmpxchg and atomic_try_cmpxchg
Needed by drm-kmod

Obtain from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36015
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
fa1f02baaf linuxkpi: Add some memset functions
Needed by drm-kmod

Obtained from:	OpenBSD
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35943
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
96b917bfcf linuxkpi: Add io.h
out* arguments are different on Linux and the i915 driver uses them.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35942
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
a0c171328f linuxkpi: Add pagevec implementation
Needed by drm-kmod.

Reviewed by:	hselasky
Obtained from:	OpenBSD
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35941
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
aec6a64c68 linuxkpi: Add linux/nospec.h
Needed by drm-kmod.

Reviewed by:	hselasky
Obtained from:	OpenBSD
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35940
2022-08-08 15:22:35 +02:00
Emmanuel Vadot
4aa82e4358 linuxkpi: Add mapping_clear_unevictable stub
Reviewed by:	hselasky
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35939
2022-08-08 15:22:34 +02:00
Emmanuel Vadot
6890e327a8 linuxkpi: pci: Add more functions needed by drm
Mostly stubs to satisfy building

Reviewed by:	hselasky
Obtained from:	drm-kmod
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35938
2022-08-08 15:22:34 +02:00
Emmanuel Vadot
885ab0dba2 linuxkpi: math.h: Add mul_u64_u32_div and mul_u64_u32_shr
Needed by drm-kmod.

Reviewed by:	hselasky
Obtained from:	OpenBSD
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35937
2022-08-08 15:22:34 +02:00
Emmanuel Vadot
6be89cc88d linuxkpi: atomic: Add atomic_fetch_inc
Reviewed by:	hselasky
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D35936
2022-08-08 15:22:34 +02:00
Kristof Provost
63167eb48c pfctl tests: test case for the POM_STICKYADDRESS fix
In 1e73fbd8b we fixed an issue with POM_STICKYADDRESS being checked in
the wrong struct.
Add a basic test case for this fix.

MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-08-08 09:30:42 +02:00
Ganbold Tsagaankhuu
5db5bd5f39 Add drive strength setting for RK3568 pinctrl driver.
Partially from https://reviews.freebsd.org/D36027

Submitted by:	sos
2022-08-08 04:42:22 +00:00
Andres Ramirez
13e9d624f2 rtw88: correct a typo in man page
s/mmeory/memory/

MFC after:	1 week
2022-08-07 23:10:26 +00:00
Bjoern A. Zeeb
d3ef3c4cf8 XHCI: remove a self-assignment
x = x is an unneeded operation, remove it.
The value is read and assigned above for real.

MFC after:	4 weeks
2022-08-07 22:46:55 +00:00
Alexander V. Chernikov
7064c94a02 tests: add routing tests for switching between same prefixes
Differential Revision: https://reviews.freebsd.org/D36055
MFC after:	2 weeks
2022-08-07 19:45:25 +00:00
Konstantin Belousov
08349b18ea tree.3: explain RB_FIND() and RB_NFIND()
In collaboration with:	dougm
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation (kib)
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D36001
2022-08-07 22:23:44 +03:00
Konstantin Belousov
624e5dc0ec tree.3: fix markup
Reviewed by:	alc, dougm
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D36001
2022-08-07 22:23:10 +03:00
Gleb Smirnoff
e7231d07a4 tcp_input: update comment to match reality. 2022-08-07 11:18:30 -07:00
Gordon Bergling
75f8dcc831 mfiutil.8: Fix some mandoc warnings
- new sentence, new line
- no blank before trailing delimiter

MFC after:	3 days
2022-08-07 17:24:48 +02:00
Gordon Bergling
816ca3d10f libutil: Fix mandoc warnings
- missing comma before name
- possible typo in section name: Sh CAVEAT instead of CAVEATS
- useless macro: Tn
- blank line in fill mode, using .sp
- no blank before trailing delimiter: Dv NULL?

MFC after:	3 days
2022-08-07 16:30:24 +02:00
Gordon Bergling
fa1ac9693a vnode(9): Fix a typo in a source code comment
- s/paramater/parameter/

MFC after:	3 days
2022-08-07 16:08:43 +02:00
Gordon Bergling
b2b1bb0410 debugnet: Fix a typo in a source code comment
- s/paramaters/parameters/

MFC after:	3 days
2022-08-07 16:07:01 +02:00
Gordon Bergling
0702f4f040 isci(4): Fix a typo in a source code comment
- s/paramater/parameter/

MFC after:	3 days
2022-08-07 16:05:08 +02:00
Gordon Bergling
044169efe0 net80211(4): Fix a typo in a source code comment
- s/paramaters/parameters/

MFC after:	3 days
2022-08-07 16:01:13 +02:00
Sergey A. Osokin
ffcec862aa bsd-family-tree: fix a typo for NetBSD 9.3 release date
Reported by:	Adrian Steinmann <ast@NetBSD.org>
Fixes:		a3d933cc4f
MFC after:	3 days
2022-08-07 09:59:55 -04:00
Gordon Bergling
cc538081ef acpi(4): Fix two typos in a source code comments
- s/paramater/parameter/

MFC after:	3 days
2022-08-07 15:58:04 +02:00
Gordon Bergling
094517119c libpathconv: Fix mandoc warnings in abs2rel(3) and rel2abs(3)
- cannot parse date, using it verbatim: Dec 15, 1997"
- sections out of conventional order: Sh SEE ALSO
- possible typo in section name: Sh EXAMPLE instead of EXAMPLES
- AUTHORS section without An macro

MFC after:	3 days
2022-08-07 14:53:53 +02:00
Gordon Bergling
cd33039749 inet6(4): Fix a typo in a source code comment
- s/Unreachablity/Unreachability/

MFC after:	3 days
2022-08-07 14:20:52 +02:00
Gordon Bergling
4c399b044f nullfs(5): Fix a typo in a source code comment
- s/examing/examining/

MFC after:	3 days
2022-08-07 14:04:53 +02:00
Peter Holm
c925454668 stress2: Added another fsck_ffs test scenario 2022-08-07 10:37:17 +02:00
Peter Holm
ac79b5f327 stress2: Do not run a fuzz test as root. 2022-08-07 10:35:47 +02:00
Sergey A. Osokin
a3d933cc4f bsd-family-tree: add NetBSD 9.3
Add NetBSD 9.3, it's been released two days ago.

MFC after:	3 days
2022-08-06 15:02:42 -04:00
Sergey A. Osokin
69893a0e8f bsd-family-tree: OpenBSD 7.1 and DragonFly BSD 6.2.2
Add two releases to the tree.

MFC after:	3 days
2022-08-06 14:58:00 -04:00
Doug Moore
7f2ec173e4 iommu_gas: avoid pointless augmentation
iommu_gas_augment_entry updates a map entry element. Invoked as
RB_AUGMENT in RB tree code, it is applied from the point where the
tree is modified, all the way up to the root, and is also applied when
rotation moves a node down in the tree.

There are several opportunities to invoke it less. The automatic
augmentation with every rotation is a mistake.  Delaying these
augmentations until RB_INSERT_COLOR or RB_REMOVE_COLOR are finishing
allows the augmentation code to be duplicated less, to work when there
is less register pressure, and to be skipped when conditions allow it:

    In the double-rotate case of RB_INSERT_COLOR, augmentation after
    the first rotation is not necessary when the element being moved
    down the tree becomes a leaf. It was in the tree, and was a leaf,
    before the RB_INSERT operation began, and so recomputing
    augmentation for it would do nothing.

    In the final (possibly only) rotation of RB_REMOVE_COLOR, both the
    elements - the one moving up and the one moving down - end up in
    the path from the deletion point to the tree root, so there's no
    need to augment either of them immediately.

    In RB_REMOVE, when the right child of the removed node replaces it
    in tree, it began with a null left child. Replacement creates a
    non-NULL left child, and then rotation may put a NULL node back in
    that place. If that happens, start the augmenting-up-to-root with
    the parent of that node, since augmentation would do nothing.

Adjust to avoid these needless augmentations.

Reviewed by:	alc
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D35502
2022-08-06 13:26:18 -05:00
Alan Cox
7f46deccbe x86/iommu: Reduce the number of queued invalidation interrupts
Restructure dmar_qi_task() so as to reduce the number of invalidation
completion interrupts.  Specifically, because processing completed
invalidations in dmar_qi_task() can take quite some time, don't reenable
completion interrupts until processing has completed a first time. Then,
check a second time after reenabling completion interrupts, so that
any invalidations that complete just before interrupts are reenabled
do not linger until a future invalidation might raise an interrupt.
(Recent changes have made checking for completed invalidations cheap; no
locking is required.)

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36054
2022-08-06 13:05:58 -05:00
Justin Hibbits
35ce7d40f9 powerpc/booke: Clamp MAXCPU to 32 for Book-E platforms
Since the likelihood of new Book-E PowerPC SoCs being produced is near
zero clamp MAXCPU to around the highest number of cores/threads
available currently, for both 64-bit and 32-bit.  Even though the
current highest core/thread count is 24, the cap is set at 32 in case
there is code that assumes power of 2.
2022-08-06 11:42:19 -04:00
Franco Fichtner
1e73fbd8b2 pfctl: fix FOM_ICMP/POM_STICKYADDRESS clash
pass inet proto icmp icmp-type {unreach}
	pass route-to (if0 127.0.0.1/8) sticky-address inet

The wrong struct was being tested. The parser tries to prevent
"sticky-address sticky-address" syntax but was actually cross-rule
enforcing that ICMP filter cannot be before the use of "sticky-address"
in next rule.

MFC after:	2 weeks
Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D36050
2022-08-06 14:22:42 +02:00
Alexander V. Chernikov
93dd3adac7 fib_algo: set vnet when destroying algo instance
Reported by:	Konrad Kręciwilk <konrad.kreciwilk@korbank.pl>
MFC after:	2 weeks
2022-08-06 12:51:22 +00:00