arm64: Optimise the repeated TLBI workaround
It has been reported that the overhead of repeating all TLBI
instructions is too large [1]. The Software Developer Errata Notices
(SDEN) for the relevant Arm CPUs have been updated so a single
"tlbi vale1is, xzr" followed by "dsb ish" is sufficient to work around
the issues.
Replace the places we repeat TLBI instructions with the new sequence.
[1] https://lore.kernel.org/linux-arm-kernel/20260218164348.2022831-1-mark.rutland@arm.com/
Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55646
arm64: Use a canonical address when TBI is enabled
When Top Byte Ignore (TBI) is enabled in a processor we need to pass
a canonical address to the vm subsystem.
Reviewed by: alc, kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55619
[ADT] Refine MutableArrayRef forwarding constructor constraints (#183806)
Keep MutableArrayRef on a single C&& constructor, with SFINAE on direct
check on `C::data()`. This keeps const std::span<int> supported and
rejects const vector/smallvector sources for MutableArrayRef<int>.
arti: update to 2.1.0.
# Arti 2.1.0 — 2 March 2026
Arti 2.1.0 continues work on relay development,
and introduces a new RPC backend with non-blocking IO
in the `arti-rpc-client-core` library.
As usual, there are also various under-the-hood improvements and bug fixes.
[lldb] Use UnimplementedError for GetSDKFromDebugInfo (#184199)
We can now differentiate unimplemented errors from actual errors that
may be useful to users.
NAS-140136 / 26.0.0-BETA.2 / Adjust protocol ACL tests to new tools (by anodos325) (#18365)
This commit slighlty refactors some ACL-related operations in our
testing frameworks to use appropriate tools and arguments.
Original PR: https://github.com/truenas/middleware/pull/18364
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-140136 / 27.0.0-BETA.1 / Adjust protocol ACL tests to new tools (#18364)
This commit slighlty refactors some ACL-related operations in our
testing frameworks to use appropriate tools and arguments.
[LinkerWrapper] Add support for --no-canonical-prefixes
This is necessary to support build environments where the
compiler/associated tools are actually just symlinks into a CAS. Without
this, we try and resolve binaries relative to the real path of
clang-linker-wrapper, which is usually in a directory prefixed with the
first couple characters of a SHA digest and named with a SHA digest. We
also need to ensure that we propagate --no-canonical-prefixes to sub
clang invocations so that clang is able to resolve lld in such
environments.
Reviewers: jhuber6, Artem-B, sarnex
Pull Request: https://github.com/llvm/llvm-project/pull/184160
build: Retire LLVM_CXXFILT option
The LLVM_CXXFILT option was added when we used ELF Tool Chain tools by
default. ELF Tool Chain's c++filt failed to demangle some symbols, so
we added a special case to install LLVM's version and enabled it by
default.
The rest of the LLVM tools are now used by default, as of commit
9fa94e1c099d ("Turn on WITH_LLVM_CXXFILT by default"). Simplify the
build logic by removing a special case and just include llvm-cxxfilt
with the rest of the LLVM utilities.
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55654
vm_page.h: Materialize a spare bit
No functional change (intended).
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit d18aaeff8fd314e79642062d95110ad174bd1882)
sys/compat/freebsd32: FF clock struct: Don't pack, use 'ffcounter32'
Packing 'struct ffclock_estimate32', in absence of substitution of
'ffcounter' (some 'uint64_t') by a 32-bit compatible type, was necessary
on amd64 since 'uint64_t' is 8-byte aligned, which leaves a padding gap
of 4-byte between fields 'update_time' and 'update_ffcount'. This gap
does not exist on i386 (or amd64 32-bit mode), as 'uint64_t' there is
only 4-byte aligned.
Change the type of the 'update_ffcount' and 'leapsec_next' fields to the
recently introduced 'freebsd32_uint64_t', and adapt copy-in and copy-out
accordingly. Using `CP()` previously worked due to the '__packed__'
attribute.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55282
(cherry picked from commit 7c2fc4419db43a8a7d1886b0b8e08aa97bfa31e4)
sys: ELF: Rename SHN_FBSD_CACHED => SHN_FREEBSD_CACHED
All other FreeBSD-specific constants have FREEBSD fully spelled out in
their names. Be consistent.
No functional change (intended).
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55224
(cherry picked from commit 2ce028e8a2655d0e2e3435ae24cb00c1c51b5027)
sys/sysctl.h: Add missing <sys/kassert.h> include
Hopefully, 'sys/sysctl.h' is really self-contained now.
This fixes the GENERIC-NODEBUG compilation error in 'hwpstate_common.c'
after commit 804329587508 (see below).
Fixes: 1a446f765d9c ("sys/sysctl.h: Make it self-contained when included from the kernel")
Fixes: 804329587508 ("hwpstate{_amd,intel}(4): Move common knobs to a separate file")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit bfd50a32ff26067552220c6f08e6025be3603962)
kernel dump: dumpsys_gen_pa_next(): Fix "no more chunks" condition detection
In the (improbable) cases where either:
- All entries in dump_map[] are used, so there is no guard entry filled with zeros.
- Some dump region has size 0.
We would respectively access dump_map[] out-of-bounds or omit further
dump regions when iterating.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7e5f4bb3a1c999d1893528faa75559f37365de47)
sys/compat/freebsd32: Fix i386 compilation
The compile assertion now failing is due to the change '__int64_t' =>
'__int32_t' as the type of 'time32_t' on i386, which is the correct
value. The use of 'freebsd32.h' on i386 may seem strange, but it comes
from 'kern_umtx.c' including it unconditionally as it needs 'struct
umutex32'.
Fixes: 87632ddf67b0 ("openzfs sys/types32.h: use abi_compat.h for time32_t")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 07c4eb506be45a4b836665e14ad63034ef3d573a)
endian.h: Visibility comment: Fix grammar, a typo and punctuation
No functional change.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 8bdcfc2a3febcd1aade1d9a3a8a87581c7b2928d)
sys/sysctl.h: Make it self-contained when included from the kernel
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 1a446f765d9cb34e8137ffa6dbb71ce551560cc1)
hwpstate{_amd,intel}(4): Move common knobs to a separate file
Reason for doing this right now is to resolve the conflict on
'machdep.hwpstate_pkg_ctrl' between the Intel and AMD drivers, even
though I expect to remove it for hwpstate_amd(4) at some point.
More generally, this is going to be useful for some future code
factorization. Also, the 'debug.hwpstate_verbose' knob was moved there,
as we'll likely want to use it for the Intel driver as well (which is
currently not the case).
Note for MFC: Will be partial, since `hwpstate_amd(4)` does not support
CPPC in stable/15 nor stable/14.
Reviewed by: emaste
Fixes: 3e6e4e4a0d42 ("hwpstate: add CPPC support for pstate driver on AMD")
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D54528
(cherry picked from commit 8043295875083b57a6b7b2dc6826fde4cf4e1ba1)
sys: vt_efifb: EFI not supported on i386; move it back to amd64/NOTES
We do not support EFI boot on i386. Thus:
1. Move (back) 'device vt_efifb' from x86/NOTES to amd64/NOTES.
2. Remove 'device vt_efifb' from i386/MINIMAL.
Reported by: jhb
Fixes: f224591746bd ("Add ASMC_DEBUG make option")
Fixes: 67599eef01f5 ("sys/x86/NOTES: Add vt_efifb")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 9c25620e57f01d8227f0d53c6b2134ab37a49fdf)
asmc(4): pull 32-bit support for the driver
The asmc(4) driver should work for 32-bit Intel-based Macs, in theory, if
the model details were added to the detection list. That being said,
32-bit Intel Macs were only released and available to the general public
for 8 months [1], so the value in maintaining i386 support in the driver is
reduced due to limited hardware access.
Remove 32-bit support for the driver officially to make it clear its use is
not supported.
This should fix building `NOTES.i386` by proxy as well.
Relnotes: yes
MFC after: 2 weeks
Fixes: f224591746b ("Add ASMC_DEBUG make option")
Fixes: 8342d9f7b5f ("asmc(4): Stop building it on i386, as...")
Differential Revision: https://reviews.freebsd.org/D55544
(cherry picked from commit 1f2f5eba24aa53e180a4eb46b772410e5a782469)
i386: Fix kernel compilation after introduction of ASMC_DEBUG option
Fixes: f224591746bd ("Add ASMC_DEBUG make option")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit fde9fe18219f6e987279a9d042345e7c6fc170d1)
Adjust protocol ACL tests to new tools
This commit slighlty refactors some ACL-related operations
in our testing frameworks to use appropriate tools and
arguments.
Revert "[DebugInfo] Emit DW_AT_const_value for constexpr array static members" (#184798)
Reverts llvm/llvm-project#182442.
The change does not handle endianness correctly.
[libc] Hoist GPU allocator loop invariants from find_slab (#184803)
Summary:
This improves performance as these variables were not eligible for LICM
apparently.
[Benchmark] Fix warnings around usage of __COUNTER__ (#184524)
Premerge CI is currently failing with the following after the update to
clang v22:
```
/home/gha/llvm-project/clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:92:1: error: '__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions]
92 | BENCHMARK(dexQueries);
| ^
```
Some original work was done around this in
df1d786c460e0e47c9074f3533f098190ebfbc1b, which was then done in
upstream Google benchmark in
https://github.com/google/benchmark/commit/d8db2f90b643eb28a12976beb4d57bcfb639911d.
The original work done in the patch implementing this feature doesn't
seem to account for as many cases as the upstream patch does. This patch
reverts the diff in df1d786c460e0e47c9074f3533f098190ebfbc1b and applies
[3 lines not shown]