libthr: Fix some bugs in trylock
1. When contester > 2, a release causes kernel set CONTENTION bit but
with no owner. In this case, the userspace should be able to try the
lock instead of fall immediately. We copy this from trylock2.
2. A PI mutex should consult to kernel instead of decided by userspace
itself.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60427
mlx5: support DevX UMEM page size bitmap
rdma-core's mlx5dv_devx_umem_reg_ex() passes the page sizes the caller
can use in MLX5_IB_ATTR_DEVX_UMEM_REG_PGSZ_BITMAP. Add the attribute and
choose the UMEM page size, page offset and MTT count the way Linux commit
7610ab57de56 ("RDMA/mlx5: Allow larger pages in DevX umem") does.
Linux looks at the DMA list only. The UMEM is mapped at an IOVA equal to
the DMA address of its first byte, ib_umem_find_best_pgsz() picks the
largest page size of the bitmap that this mapping allows, and
devx_umem_find_best_pgsize() halves it while the first DMA address is not
aligned to it or the length is not a multiple of it, stopping at
PAGE_SIZE, even if that is below every size in the bitmap.
The FreeBSD OFED layer has none of the ib_umem helpers this relies on,
so local copies of the current Linux ones are added.
ib_umem_find_best_pgoff() and ib_umem_dma_offset() come from Linux
commit b045db62f6f6 ("RDMA/mlx5: Use ib_umem_find_best_pgoff() for
SRQ"), ib_umem_num_dma_blocks() from Linux commit a665aca89a41
[18 lines not shown]
[IRBuilder] Avoid out-of-line dtor for IRBuilderFolder (NFC) (#229803)
The virtual dtor was serving double duty as an out-of-line anchor
function. However, this means that every IRBuilder destructor would have
to call an empty out-of-line function (without LTO).
Define the virtual dtor inline and use a separate anchor method instead.
Based on discussion in https://github.com/llvm/llvm-project/pull/229437.
[NVPTX] Add L1 32B prefetch intrinsics (#227809)
Add generic and global NVVM intrinsics for PTX L1 32B prefetches, with
PTX 9.4 and sm_90 requirements. Add codegen coverage for both forms.
libthr: Reorder pthread mutex to prevent false sharing
On a 64 byte cache line CPU (amd64), m_owner is contended by all of
the shared processes. However, after finding one winner, mtx is
enqueued, which trigger a cache refresh from other processors. Reorder
mtx so that m_lock and m_qu will not be in the same cache line.
Notice that this doesn't affet arch that expose 128 bytes cache line
line aarch64 or powerpc.
Reviewed by: kib, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60434
[CAS][unittests] Relax time out for ProgramTest (#229598)
Try to fix and get more information from intermittent failures on linux.
Relax the timeout for CAS ProgramTest and reverse the check to get the
error message and error code if test failed again.
https://github.com/llvm/llvm-project/issues/229593
py-cachetools: updated to 7.2.1
v7.2.1 (2026-10-05)
- Improve error handling for ``RRCache.popitem()`` when the cache is
empty.
- Minor style and documentation improvements.
- Update CI environment.
v7.2.0 (2026-09-16)
- Deprecate use of ``cache=None`` to suppress caching with the
``@cached`` decorator.
- Add support for Python 3.15.
- Minor test improvements.
- Minor documentation updates.
[X86] Rework isel for BRIND for X32 to fix verifyTargetNode error. NFCI (#229661)
X86ISD::NT_BRIND is supposed to have a pointer typed operand. For X32
this is i32. Previously isel inserted a zero extend to i64 and created a
new X86ISD::NT_BRIND with i64 input, then performed recursive isel on
these new nodes. The new X86ISD::NT_BRIND failed verifyTargetNode.
This patch inserts the zero extend, places it correctly in the
topological sort for it to be selected later, then manually selects
JMP64r or JMP64r_NT. This way we never create X86ISD::NT_BRIND with i64
input.
Another step towards #185649.
[OpenMP][ompd] Fix missing install components (#229830)
Summary:
Unintuitively, each component only applies to the destination just above
it. This combined form needs a component for each line, so add them.
kern/coredump_vnode.c: avoid dumping to the mount point we suspended
PR: 299095
Reported by: Rick Richard <rick at sloservers.com>
Reviewed by: markj
Tested by: Rick Richard <rick at sloservers.com> (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D60283
vn_open_cred(): rename VN_OPEN_NAMECACHE flag to VN_OPEN_COREDUMP
The flag only use is for special handling of core dump vnodes.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D60283
libthr: Do not rely on UB in counter
counter + 1 > 0 is a undefined behavior and nobody guarantee that it
will be honestly perform by the compiler that counter + 1 will always be
INT_MIN. We switch to INT_MAX check instead to provide a deterministic
result.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60426
[SLP] NFC: make candidate state ownership explicit
BoUpSLP contains a mixture of state which relates to the current
candidate and state which persists beyond its lifetime. Gather this
state onto a new CanidateState object which belongs to BoUpSLP.
I think this is compatible with the existing modularisation proposal.
Assisted-by: codex
eqos: Reduce RX error noisiness
Reduce very common console messages:
Receive error rdes3=30208000
As observed on the VisionFive v2 hardware after some large transfers.
Differentiate between overflow errors and others. Report the errors when
the length is non-zero (overflow errors).
Also, count errors for netstat purposes.
Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59479
(cherry picked from commit e67697869e7208e4fe5eb96ce3f3d1240b44d2e1)
jh7110_gpio: handle preset high/low
Take action in the presence of the GPIO_PIN_PRESET_LOW/HIGH flags. This
part of the GPIO interface seems to be unused, but is trivially
implemented in our driver.
Reviewed by: Brian Scott <bscott at bunyatech.com.au>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59991
(cherry picked from commit 6f9d0f02e72cdcf64af6e0a034af4d4f065b26f8)
riscv: enable gpiopower driver
It is functional, and there are some RISC-V platforms which can benefit
from it.
Requested by: Brian Scott <bscott at bunyatech.com.au>
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c745fccd9b2647c1f84f8e38b3992640ea34c50d)
jh7110_temp: CPU temperature sensor for JH7110
This patch adds a driver for the CPU temperature sensor on the jh7110
SoC.
The calibration numbers come from the OpenBSD driver but are reworked to
produce a result in K rather than C.
The temperature is exposed as a sysctl, dev.jh7110_temp.0.temperature
but I have also exposed it as dev.cpu.0.temperature because that's where
you find it on a RaspberryPi and amdtemp(4), so it's a lot more obvious.
(mhorne: Added 'starfive,jh7100-temp' compatible.)
Reviewed by: mhorne, bnovkov
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D59478
(cherry picked from commit fa28ede31dac57fdb191afd114c70439b9b41e4f)
jh7110_gpio: fdt_pinctrl interface
This provides GPIO programming/configuration at attach time based on the
device tree 'pinmux' descriptions.
Reference:
device-tree/Bindings/pinctrl/starfive,jh7110-sys-pinctrl.yaml
Reviewed by: Brian Scott <bscott at bunyatech.com.au>
Tested by: Brian Scott <bscott at bunyatech.com.au>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59992
(cherry picked from commit 0fc4ef160550d8f454fbe4cb521e64276db91d7d)
rc.d/mountd: Do not require /etc/exports
mountd exits if it cannot read any exports files. Requiring
/etc/exports, however, unconditionally stops mountd from starting on a
server that exports ZFS datasets only (/etc/zfs/exports).
Let sbin/mountd handle requirements itself, instead of hardcoding
/etc/exports, which is also wrong, because different files can be
specified in mountd_flags.
This patch also works with nfsv4_server_enable="YES", by preserving the
behavior of failing to start if there is no "V4:" line in the exports
file, which is missing by default on ZFS-only exports.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Reviewed by: rmacklem, markj, emaste
Differential Revision: https://reviews.freebsd.org/D60044