[Clang][AMDGPU] Add ``amdgpu_av("none")`` attribute for atomic expressions (#199622)
Add a statement attribute that suppresses MakeAvailable/MakeVisible
cache operations on AMDGPU atomic instructions while preserving memory
ordering (waits). The attribute takes a string argument specifying the
mode. Currently "none" is the only supported mode. The resulting atomic
or fence instruction carries !mmra !{!"amdgcn-av", !"none"} metadata.
This only works with builtins that get lowered to intrinsics or
instructions. The attribute does not survive inlining. For example, a
C++ std atomic is typically a wrapper around a Clang builtin, and
applying this attribute on the std atomic does not remove the
MakeAvailableMakeVisible semantics built into it.
Part of a stack:
- #199486
- #199621
- #199489
[5 lines not shown]
igc: defer sysctl-driven reinit to the admin task
igc_sysctl_eee() and igc_sysctl_dmac() called igc_if_init() directly.
Request the reset through iflib instead, and skipping while the interface
is down; the new value is picked up by the next init.
Unlike e1000, igc has no ASSERT_CTX_LOCK_HELD and no acquire_swflag
path, so the defect is silent here rather than an assertion failure.
While here also remove unnecessary igc_if_init uses:
iflib_if_init_locked() already runs after IFDI_RESUME and
IFDI_MEDIA_CHANGE, so the trailing *_if_init() only added an unstopped
IFDI_INIT that the following iflib_stop() undoes.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D58629
e1000: defer sysctl-driven reinit to the admin task
Request the reset through iflib and let the admin task perform the
stop/init under the context lock, matching what the VF and SR-IOV paths
already do.
The assertion is compiled out without INVARIANTS, where the same write
instead resets the MAC and takes the ICH software flag while the queues
stay live and an ioctl or the admin task may be running.
While here also remove unnecessary em_if_init uses:
iflib_if_init_locked() already runs after IFDI_RESUME and
IFDI_MEDIA_CHANGE, so the trailing *_if_init() only added an unstopped
IFDI_INIT that the following iflib_stop() undoes.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D58628
libXfont2: update to 2.0.9.
This release contains the fixes for the issues reported in today's security advisory:
https://lists.x.org/archives/xorg-announce/2026-August/003734.html
- CVE-2026-59679: Font Server Client encoding Out-Of-Bounds Read/Write
- CVE-2026-44950: Font Server Client Cumulative Glyph Data Heap Buffer Overflow
Additionally, it changes a build-time default. Previously fontserver support
was compiled in by default unless --disable-fc was provided at configure time.
The new default is *disabled by default* unless --enable-fc is provided at
configure time. Doing so protects us from future fontserver-connection related
issues. Fontservers have been deprecated for many years and the vast majority
of users will not notice this changed default (Debian has built with
--disable-fc for years).
[flang][driver] Support Makefile dependency generation (#209379)
Implement the GCC/Clang dependency-file flags for flang, which it
previously rejected as unknown arguments: -M, -MM, -MD, -MMD, -MF,
-MT and -MQ.
Feature:
- -MD/-MMD : write a .d file alongside a normal compile
- -M/-MM : run through semantics; emit deps to stdout by default
- -MF : dependency-file path
- -MT/-MQ : target name (verbatim / Make-quoted)
(-M==-MM and -MD==-MMD; Fortran has no system/user header split.)
Design:
- `-M`/`-MM`: driver passes `-fsyntax-only -dependency-file - -MT
<target>` to `-fc1`. Running through semantics resolves USE
statements so module file dependencies are captured in the output.
This deviates from clang's prescan-only behaviour for -M, but is
intentional: unlike C/C++ #include, Fortran's USE statement is
[17 lines not shown]
cut.1 & paste.1: add HISTORY and AUTHORS
Sourced from OpenBSD and FreeBSD, which both reference the same post[1]
for part of it. They differ in certain details.
FreeBSD puts the additional credit to Marciano Pitargue in the wrong
utility, going by the source code credits (and what OpenBSD has). There
is discussion in the FreeBSD review[2] about which originating release
is relevant for cut(1) (32V vs. System III), as both BSDs referenced
32V for paste(1). This was perhaps confused in the FreeBSD review,
which talks directly about cut(1), but was applied also to paste(1). An
earlier FreeBSD commit specifically lists 32V for paste(1)[3]. (I don't
have 32V to examine.)
These histories could be subject to further cut and paste...
1. https://www.tuhs.org/pipermail/tuhs/2020-January/019955.html
2. https://reviews.freebsd.org/D36048
3. https://github.com/freebsd/freebsd-src/commit/30f8b6c18279162a2f4efdc9e85a49683a8aafbf
[libclc] Add initial support for libclc execution conformance tests (#214072)
Summary:
This uses the `llvm-gpu-loader` tool to invoke OpenCL test kernels. This
routes OpenCL through the standard compute runtimes, which aren't
exactly 1-to-1 with OpenCL, but it's close enough. Obviously, the best
solution would be to have a real OpenCL host library that can launch
these, but this is the best we can get in-tree and is very sipmle, write
kernel, test kernel.
The goal is to have a lot more tests run here, but this just gets the
basic infrastructure in place. We won't be able to do full conformance
like external suites, like exhaustive math, but I think its' a step in
the right direction. It looks like this on my side:
```console
$ ninja check-libclc-amdgpu-amd-amdhsa-llvm
```
This requires building with the LLVM `offload/` runtime enabled for the
source compiler.
fusefs: fix error handling when reading a directory's sticky bit
When trying to delete or rename a file, fuse_vnop_lookup must check
whether its parent directory's sticky bit is set. Realistically, the
parent directory's attributes will almost always be cached. But it's
possible that they won't be, and in that case we must send a new
FUSE_GETATTR request to the server. If that request fails for some
reason, then we must fail the lookup. Prior to this change fusefs would
ignore failure of that request.
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
and Ke Xu of Tsinghua University
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D57588
(cherry picked from commit b4af6a4cccc3b4b0ea461463196c258eb92ad2e5)
[RISCV][MC] Add experimental Smijt, Ssijt, Smehv, and Ssehv support (#213431)
Add support for version 0.19 of the Smijt, Ssijt, Smehv, and Ssehv
extensions from the RISC-V fast interrupt specification.
[ExpandVariadics] Don't lower unmangled C printf on SPIR-V (#206998)
An unmangled C `printf` declaration demangles to bare `printf` (no
argument list), so `SPIRV::ignoreFunction`'s `printf(` prefix check
missed it and ExpandVariadics packed its arguments into a vararg buffer;
the SPIR-V backend then passed the buffer pointer as printf's first
variadic operand, so device printf printed pointer values instead of the
actual arguments. Match the bare name too so OpenCL/HIP printf (emitted
unmangled) is left as a variadic call for the backend's OpenCL.std
printf lowering.
(cherry picked from commit b1d21c6d3121898dc13c0df8cf9e4410bee75cfb)
Reapply "Skipping host target exports during cross-compilation" (#210… (#210496)
This reverts commit 42eb7db188f23625872b6f1d722979a3100d170e. This
reland 3fbb037d03e7ff1ef1cd9156363e895af7caaf98 (#209922).
Under CMake 4+, calling add_library(... SHARED IMPORTED) on a target
platform that lacks dynamic linking support triggers a fatal error. This
becomes an issue when building LLVM and runtimes for baremetal targets
like armv6m-none-eabi. This patch adds the option
"LLVM_OMIT_EXPORTS_FROM_CONFIG" in LLVM. When used in sub builds like
LLVM runtimes, it makes CMake to skip including the LLVM and Clang
exports. This mitigates the CMake 4 errors on baremetal runtimes.
42eb7db188f23625872b6f1d722979a3100d170e originally
apply this flag on all runtimes build and causing issues on runtimes
like intel-sycl-gpu, amdgpu-offload-ubuntu-22-cmake-build-only.
This PR only set this flag when the target platform lacks shared library
support.
[2 lines not shown]