Remove TableGen objects from libllvm, fixing bad option registrations
In 986e05bc2a18 I revamped the build for all the llvm subprojects. Among
others I added objects under contrib/llvm-project/llvm/lib/TableGen, but
I missed that upstream explicitly removes these when building the shared
llvm library:
https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm/tools/llvm-shlib/CMakeLists.txt#L23
In 2e47f35be5dc I converted libllvm to a shared library. From that point
onwards, some of the global command line option objects registered in
llvm/lib/TableGen/Main.cpp conflict with similar objects in tools like
llvm-cov, llvm-as, etc.
This results in an error when running these tools: "CommandLine Error:
Option 'o' registered more than once!", followed by a fatal exit.
Fix this by removing the TableGen objects from libllvm. Note that we no
longer install any of the tblgen binaries, these are only used during
[4 lines not shown]
stddef.h: add unreachable() for C23 compliance
unreachable() is a hint to the compiler that it is unreachable.
Add a new man page unreachable(3) to document this macro.
Reviewed by: imp
Approved by: markj (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D53967
jemalloc: avoid clash with C23 unreachable() macro
Summary: This avoids a clash with the new macro in <stddef.h>
introduced in D53967
Reviewed by: imp
Approved by: markj (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D53968
uchar.h: add char8_t
A type similar to char16 and char32_t, for compliance with C23.
The related type atomic_char8_t is added to stdatomic.h.
As char8_t is always unsigned char, I've skipped adding __char8_t.
This can be added, too, if desired.
Reviewed by: imp
Approved by: markj (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D53952
time.h: add timegm() to the C23 namespace
This function is part of ISO/IEC 9899:2024 (C23) and was forgotten in D47856.
Reviewed by: imp
Approved by: markj (mentor)
See also: D47856
Fixes: 59677aecb67bbedcfa2ee5d7d2b189193cdc4af7
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D53951
acpi: Fix setting sleep state sysctls to NONE
This restores the functionality as it was pre-97d152698f48.
A stopgap was committed by glebius@ in 34dfccc64f47 ("acpi: in
acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()").
PR: 290651
Reviewed by: thj, emaste
Approved by: thj
Fixes: 97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53909
sound: Retire snd_mixer->busy
Does not really serve any real purpose. It gets set on mixer_open() and
unset on mixer_close(), so it essentially tells us whether the mixer is
open or not.
mixer_close() uses it to return EBADF in case the mixer is not busied,
as in, the mixer has not been open()'d yet. This is redundant. The other
place where this is used is to decide whether to serve an ioctl issued
by userland, in which case it won't if, again, the mixer has not been
busied (i.e., opened). Again, seems redundant.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53859
sound examples: Fix buffer mapping/allocation
The buffer in struct config should be allocated or mmap'ed. The code
without this patch allocates the buffer unconditionally, even for mmap
configs.
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D53939
(cherry picked from commit ebf1d98d60725feccd726ef8e4fa518661f9eae0)
sound: Retire snd_mtx* wrappers
Do not create mutexes with snd_mtxcreate(). It doesn't provide any
value, plus it first allocates the mutex with malloc(9). Allocate
mutexes in the stack and use mtx_* functions directly instead of the
snd_mtx* wrappers.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D53855
(cherry picked from commit 9d18115ca0ab0ef3f34173d4e2bdabec916d0b60)
(cherry picked from commit 120f8a4c2ae8a011827d83b098ecf70c791f794b)
sound: Simplify logic in dsp_io_ops()
Use CHN_LOCK()/CHN_UNLOCK() directly, instead of
dsp_lock_chans()/dsp_unlock_chans(). These functions are useful when we
want to potentially lock both channels. Here we know which channel we
are locking, so we can just lock it directly. This way we get rid of the
prio variable as well.
Related to runpid again, there is no reason to assign it when
CHN_F_RUNNING is not set. channel->pid (as well as channel->comm) is
always assigned in dsp_chn_alloc().
Get rid of runpid. I do not see how we can end up with channel->pid
(td->td_proc->p_pid) not matching buf->uio_td->td_proc->p_pid.
Also improve errno values.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[4 lines not shown]
sound: Merge PCM_ALIVE() with PCM_REGISTERED()
PCM_ALIVE() is used only in pcm_unregister(), but it does not hurt to
use PCM_REGISTERED(), which uses PCM_ALIVE() internally. In fact, it's
more robust this way.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
(cherry picked from commit 3107b952f534813846e4f58afdb57624a81618d8)
bus: Add device_has_children predicate
Add a device_has_children() function which can be used to check if a
device has children without allocating a list of them which we aren't
going to use, or even counting them.
Also modify device_get_children() so it can be used to query the count
without allocating a list.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D53918
Export t4_tom's symbols for other offload modules
This allows iw_cxgbe.ko, cxgbei.ko, nvmf_che.ko, etc. to be loaded when
debug.link_elf_leak_locals and debug.link_elf_obj_leak_locals are
disabled.
PR: 291250
MFC after: 1 week
Sponsored by: Chelsio Communications
kgssapi: Remove broken MOD_UNLOAD code
The module panicked at unload with "recursing but non-recursive rw".
There is a comment that "Unloading of the kgssapi module is not
currently supported" and the MOD_UNLOAD case falls through to returning
EOPNOTSUPP anyway. Just #if 0 the code in the unload path, leaving it
as a hint in case someone implements unload support later on.
PR: 291249
Reviewed by: rmacklem
Fixes: ad704a34bc2c ("Use syscall_helper_register(9) rather than syscall_register().")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53949
git-arc: Fix failure to call arc() function
As of b3e53f9fff11, git-arc attempted to call the internal shell
function, arc(), using env(1). However, because env(1) does not call
shell functions, it actually attempted to run the arc utility. This led
to errors:
% git arc create -r xxx HEAD
env: arc: No such file or directory
git-arc: could not create Phabricator diff
This change removes the unnecessary use of env(1), so the arc() function
is correctly called.
Reviewed by: markj
Fixes: b3e53f9fff11 ("git-arc: Don't require devel/arcanist")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53972