AVR: Run AtomicExpand
Atomics wider than 16 bits were lowered to __sync_* calls. No AVR
runtime provides __sync_* or __atomic_*, but __sync_* requires a
lock-free implementation, which AVR cannot provide at those sizes.
Use the __atomic_* calls instead.
Alternatively it may be appropriate to change getDefaultThreadModel to
singlethread for avr so all atomics are lowered into non-atomic
sequences.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
www/forgejo: import at version 16.0.6
forgejo is a forge software package for hosting software development
version control using Git as well as other collaborative features
like bug tracking, code review, continuous integration, kanban
boards, tickets, and wikis.
Tested on NetBSD/amd64.
devel/libastylej: update 3.0.1 -> 3.6.19
Changelog: https://astyle.sourceforge.net/notes.html
Port changes:
- use GH upstream
- Makefile cleanup to make linters happy
sound: Remove unncessary locking in sysctl_hw_snd_hwvol_mixer()
The locking around strlcpy() was because of m->hwvol_mixer, but this is
just an int, so we don't need to lock in this case. Instead lock only
when m->hwvol_mixer is written.
While here, add parentheses around the returns.
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D59109
(cherry picked from commit 044ef293a8bbd057de3fb13ec97d3d0ee16462e4)
sound: Retire mixer_hwvol locked variants
Prior to 9a00e0b8ca56 ("snd_uaudio: Do not use snd_mixer->lock as
mixer_lock"), there was a need for mixer_hwvol_mute_locked() and
mixer_hwvol_step_locked(), because the unlocked variants would acquire
the lock, but uaudio_hid_rx_callback() would also hold the lock, so this
was a measure to avoid recursion on snd_mixer->lock. Now that
snd_uaudio(4) has a private mixer lock, the locked variants are not only
unnecessary, but wrong, because we now lock the private lock and not the
snd_mixer one, which is what mixer_hwvol_mute_locked() and
mixer_hwvol_step_locked() expect. Retire the locked variants and call
the regular functions instead.
The unlocked variants take the mixer lock, which is now the PCM lock,
and reach uaudio_mixer_ctl_set(), which takes mixer_lock. Calling them
straight from uaudio_hid_rx_callback() would therefore take mixer_lock
and the PCM lock in the opposite order to the mixer ioctl path, so
record what the HID report asked for and perform the volume change at
the end of the callback, with mixer_lock dropped. The USB stack allows a
[7 lines not shown]
sound: Use uint8_t instead of legacy u_char
No functional change intended.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 2793e5498dd9bceada62ebe38967d89180bd15f6)
sound: Do not set a recording source in mixer_uninit()
We currently set the recording source to SOUND_MIXER_MIC during mixer
deletion. Apart from the fact that this control might not be present on
all devices, it is unnecessary to do that, plus we already set all the
volumes to 0 in the mixer_set() call above.
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D59076
(cherry picked from commit 03b59d2e7df263ea5a8904e5593d14f6e3e0fbd8)
sound: Use snddev_info->lock in place of snd_mixer->lock
snd_mixer and snddev_info have a 1:1 relationship. Now that snd_mixer is
embedded into snddev_info, it makes even more sense for both to share
the PCM lock. The only exceptions to this are MIXER_TYPE_SECONDARY
mixers, which still retain a private lock (snd_mixer->priv_lock),
because they are attached to the device driver, and not snddev_info.
Only snd_emu10kx(4) uses a secondary mixer.
A side-effect of this is that the MIXER_SET_LOCK()/MIXER_SET_UNLOCK()
mess goes away. These macros were used in the mixer_set*() functions to
drop the mixer lock if the driver is Giant-locked and the function can
sleep inside MIXER_SET*() methods, and to avoid an LOR before locking
PCM to guard channel list traversal.
Since mixers now use the PCM lock, drop the channel lock in
chn_syncstate() before calling mix_get(), to avoid an LOR. These lines
were actually already commented out for years.
[5 lines not shown]
sound: Defer macio codec volume writes to a task
tumbler(4), snapper(4) and onyx(4) write the volume over I2C, and
iicbus_transfer() sleeps. This is why mixer_set() drops the mixer lock
around MIXER_SET() for non-MPSAFE drivers, relying on Giant to keep them
serialized.
Store the volume in the softc and let a task do the I2C write with no
lock held, so that the mixer method does not sleep at all. The lock
dropping for non-MPSAFE drivers will be removed in a follow-up patch.
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D59073
(cherry picked from commit b9761547077fb94e12c0bfa81f3b8b2b2df3c0bb)
sound: Embed mixer cdev in snd_mixer
The mixer cdev belongs to the mixer, not to the PCM device, so move it
from snddev_info->mixer_dev into a new snd_mixer->cdev field. snd_mixer
itself is now included in snddev_info.
Also add a MIXER_REGISTERED() macro similar to PCM_REGISTERED().
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D59071
(cherry picked from commit a614c07ad4520c072f58aebee54d16d9b72837f5)
sound: Simplify how snd_mixer is fetched and how the cdev is created
The primary snd_mixer was reached by accessing the mixer cdev's si_drv1.
This is tedious and ugly, so store the mixer in snddev_info->mixer and
access it directly.
Additionally, create the cdev in a new mixer_make_dev() function (in
similar fashion to dsp_make_dev()) in pcm_register(), when everything is
initialized, instead of risking potential races because mixer_init()
(called before pcm_register()) used to create the cdev.
Also add some NULL checks in pcm_register(), to avoid creating a mixer
cdev when the driver (e.g., fdt/audio_soc.c) does not create a mixer in
the first place, and similarly in pcm_unregister().
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D59070
(cherry picked from commit 221babdf9feb7e1c1c001a4be735400ca6fb12cb)
sound: Standardize mixer_init() call order
Device drivers call mixer_init() in a non-standard order - some before
pcm_init(), and some after pcm_register(). However, both approaches are
potentially risky, and logically weak, since pcm_register() is supposed
to be the function that finalizes sound(4) attach.
Standardize the call ordering by moving all mixer_init() calls after
pcm_init(). This is also necessary for a follow-up patch, which expects
pcm_init() to have run first and initialized the PCM lock.
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D59069
(cherry picked from commit 13fcc9caaf968083254b92546e21dedb322a920b)
snd_uaudio: drop the default monitor level to 10%
As noted in the comment, some headsets with a hardware sidetone are
incredibly sensitive and emit immediate feedback upon attach with the
current system-wide default of 75%. Drop it down just for snd_uaudio(4)
to avoid incredibly unpleasant surprises.
MFC after: 3 days
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D59199
(cherry picked from commit c3c6a6c7825ccc744afddba692820296f72ea53f)
[clang] Remove unused ASTContext::getInstantiatedFromStaticDataMember (NFC) (#233019)
The last caller was removed on August 6, 2013 in commit
39a1e507ff0bef4bd6b2fdbab4e38583d2679617.
This patch also removes the stale FIXME and the commented-out call in
VarDecl::getMemberSpecializationInfo that referred to it.
Assisted-by: Antigravity
[IR][TableGen] Remove unused ComplexStrAttr (NFC) (#233192)
The last use of ComplexStrAttr was removed on February 5, 2026 in
commit 2502e3b7badcaf2d911410978bf8f8638b363854.
This patch removes the ComplexStrAttr TableGen class along with the
ATTRIBUTE_COMPLEXSTR macro, which became unused as a result.
Assisted-by: Antigravity
[clang] Replace PointerUnion::dyn_cast with llvm::dyn_cast_if_present (NFC) (#233191)
PointerUnion::dyn_cast has been soft-deprecated in favor of
llvm::dyn_cast and llvm::dyn_cast_if_present. This patch replaces the
former with llvm::dyn_cast_if_present in
FriendTemplateDecl::getFriendDecl.
This is the only place under clang/ where migrating to llvm::dyn_cast
would trigger an assertion failure during check-clang.
Assisted-by: Antigravity
security/sslx: import package
The modern way to work with certificates and TLS.
A fast, beautiful replacement for common openssl commands. Single binary,
zero config, pure Rust.
MCJIT: Set triple in modules without one from the JIT's triple
Fill in the triple when MCJIT takes a module, as is already done for
the data layout.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>