Use a CAS loop for pointer types in __cxx_atomic_fetch_{max,min} on c11.h
Clang's __c11_atomic_fetch_max/min builtins reject pointer arguments
("address argument to atomic operation must be a pointer to atomic integer
or supported floating point type"). The four __cxx_atomic_fetch_{max,min}
overloads in support/c11.h were unconditionally calling those builtins, so
std::atomic<T*>::fetch_max/min failed to compile on every Clang-based
config. support/gcc.h already had this dispatch via #if __has_builtin(...)
falling back to a CAS loop, which is why generic-gcc was passing.
Dispatch on is_pointer<_Tp>::value: pointer types use a CAS loop matching
gcc.h's body, others keep calling the builtin.
Assisted by Claude
uvideo: increase isochronous transfer depth for throughput
Increase NFRAMES_MAX from 40 to 128 and IXFERS from 3 to 5 to keep
more packets in flight on the USB bus. This brings throughput from
~13.5 MB/s to ~21 MB/s (for comparison on the same camera webcamd
provided ~20MB/s.
The linux driver also uses 5 IXFERS (but only 32 NFRAMES_MAX)
Tested by: manu
uvideo: add Camera Terminal controls
Implement UVC Camera Terminal (CT) controls per UVC 1.5 specification
Table A-12. This adds support for camera-specific controls that are
separate from the Processing Unit controls already supported.
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D56962
uvideo: add kqueue support
Add EVFILT_READ kqueue filter so applications using kqueue/kevent
can efficiently wait for video frames instead of polling.
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D56961
uvideo: import uvideo(4) driver from OpenBSD
Port the uvideo(4) driver from OpenBSD. This provides
native USB Video Class (UVC) support for webcams and video capture
devices.
The main changes are adaptation for:
- USB transfer callback model
- isoc data extraction via usbd_copy_out(),
- V4L2 struct alignment for ABI compatibility with v4l_compat.
Note that this implementation can coexist with webcamd.
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D56960
Merge tag 'linux_kselftest-next-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest updates from Shuah Khan:
"Several fixes and improvements to resctrl tests and a change to
kselftest document to clarify the use of FORCE_TARGETS build variable"
* tag 'linux_kselftest-next-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
kselftest: fix doc for ksft_test_result_report()
selftests/resctrl: Reduce L2 impact on CAT test
selftests/resctrl: Simplify perf usage in CAT test
selftests/resctrl: Remove requirement on cache miss rate
selftests/resctrl: Raise threshold at which MBM and PMU values are compared
selftests/resctrl: Increase size of buffer used in MBM and MBA tests
selftests/resctrl: Support multiple events associated with iMC
selftests/resctrl: Prepare for parsing multiple events per iMC
selftests/resctrl: Do not store iMC counter value in counter config structure
selftests/resctrl: Reduce interference from L2 occupancy during cache occupancy test
selftests/resctrl: Improve accuracy of cache occupancy test
docs: kselftest: Document the FORCE_TARGETS build variable
[ISel] Introduce `llvm.pext` and `llvm.pdep` intrinsics (#200570)
Closes #172857
These are portable forms of the x86_64 pext/pdep or AArch64 bext/bdep instructions.
Merge tag 'linux_kselftest-kunit-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kunit updates from Shuah Khan:
"Fixes to tool and kunit core and new features to both to support JUnit
XML (primitive) and backtrace suppression API:
- Core support for suppressing warning backtraces
- Parse and print the reason tests are skipped
- Add (primitive) support for outputting JUnit XML
- Don't write to stdout when it should be disabled
- Add backtrace suppression self-tests
- Suppress intentional warning backtraces in scaling unit tests
- Add documentation for warning backtrace suppression API
- Fix spelling mistakes in comments and messages
- gen_compile_commands: Ignore libgcc.a
- qemu_configs: Add or1k / openrisc configuration"
* tag 'linux_kselftest-kunit-7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
kunit:tool: Don't write to stdout when it should be disabled
kunit: tool: Add (primitive) support for outputting JUnit XML
[8 lines not shown]
tools/test/stress2/misc/msdos12.sh: fix permission issue
This test runs with rights of an un-privileged user writing to a file
system only writable by the owner. Since no UID was provided in the
mount command, the owner of the file system was "root", and thus
writing was not allowed for $testuser. Fix this issue by mounting
with "-u $testuser".
MFC after: 3 days
(cherry picked from commit b440741db4ea1ccfa17acc2b3c37863dd819dcf3)
tools/test/stress2/misc/all.debug.inc: skip undefined variables
On my ZFS based systems, no allocations occur with tags "newblk" or
"freework". This leads to errors executing the tests that check for
memory leaks. Skip the checks if the output of wmstat -m does not
contain lines corresponding to those allocations.
MFC after: 3 days
(cherry picked from commit 6e5b990c509777544b790cc8e490965166d04684)
tools/test/stress2/misc: Add msdosfs tests for surrogate pairs
Test msdos22.sh creates 1000 files with long random names consisting
of only ASCII characters. The mount is performed without -L option,
therefore no use of iconv to convert between character sets.
Test msdos23.sh mixes some non-ASCII characters into the file names.
The file system is therefore mounted with -L C.UTF-8 to include tests
of the conversions between UTF-8 and UTF-16.
Test msdos24.sh adds emojis to the names to test the (not yet
committed) support of UTF-16 surrogate pairs in filenames.
(cherry picked from commit aa029088ec130d71b406c4118346fbd933940826)
(cherry picked from commit 11f23d7c078b319285727d277f05b6962280bcce)
(cherry picked from commit 596dadbbb5a711477f811fed65a6c463801d16c5)
(cherry picked from commit 3260c42c4183ac817cf08fcaa236d4d21b4fc0d2)
[flang][OpenMP] Lower target in_reduction for host fallback
Enable host-fallback lowering for target in_reduction in Flang and MLIR OpenMP translation.
Model target in_reduction through the matching map entry, force address-preserving implicit mapping for Flang in_reduction list items, and emit the host-side task-reduction lookup with __kmpc_task_reduction_get_th_data. The runtime entry point takes and returns a generic, default-address-space pointer, so normalize a non-default-address-space captured pointer to the generic address space before the call and cast the returned private pointer back to the map block argument's address space, mirroring the in_reduction handling on omp.taskloop. Unsupported device/offload-entry and richer reduction forms remain diagnosed.
Add Flang lowering, MLIR verifier/translation, and LLVM IR tests for the supported host-fallback path, including a non-default-address-space case, and the remaining unsupported cases.
tools/test/stress2/misc/all.debug.inc: skip undefined variables
On my ZFS based systems, no allocations occur with tags "newblk" or
"freework". This leads to errors executing the tests that check for
memory leaks. Skip the checks if the output of wmstat -m does not
contain lines corresponding to those allocations.
MFC after: 3 days
(cherry picked from commit 6e5b990c509777544b790cc8e490965166d04684)
tools/test/stress2/misc/msdos12.sh: fix permission issue
This test runs with rights of an un-privileged user writing to a file
system only writable by the owner. Since no UID was provided in the
mount command, the owner of the file system was "root", and thus
writing was not allowed for $testuser. Fix this issue by mounting
with "-u $testuser".
MFC after: 3 days
(cherry picked from commit b440741db4ea1ccfa17acc2b3c37863dd819dcf3)
tools/test/stress2/misc: Add msdosfs tests (currently failing)
Test msdos22.sh creates 1000 files with long random names consisting
of only ASCII characters. The mount is performed without -L option,
therefore no use of iconv to convert between character sets.
Test msdos23.sh mixes some non-ASCII characters into the file names.
The file system is therefore mounted with -L C.UTF-8 to include tests
of the conversions between UTF-8 and UTF-16.
Test msdos24.sh adds emojis to the names to test the (not yet
committed) support of UTF-16 surrogate pairs in filenames.
(cherry picked from commit aa029088ec130d71b406c4118346fbd933940826)
(cherry picked from commit 11f23d7c078b319285727d277f05b6962280bcce)
(cherry picked from commit 596dadbbb5a711477f811fed65a6c463801d16c5)
(cherry picked from commit 3260c42c4183ac817cf08fcaa236d4d21b4fc0d2)
[AArch64] Define GCS operations as SYS and SYSL aliases
Move the remaining `GCS` instructions from dedicated opcodes to `SYSxt/SYSLxt`
aliases, keeping a tied `SYSL` pseudo for codegen where `GCS` preserves the`
input register when disabled at runtime.
Update `GCS` intrinsic selection, scheduling, disassembly aliases, and MC
coverage for the generic `SYS/SYSL` encodings.
x11/mate-screensaver: switch to GitHub release asset
Minor versions of 1.28.x are no longer published to the MATE mirror
and are only available on GitHub. Use USE_GITHUB=nodefault with a
release tarball instead of the auto-generated one, as recommended
by the porter's handbook.
[AArch64][llvm] Define APAS, BRB and TRCIT as SYS aliases (#203563)
`APAS`, `BRB IALL/INJ` and `TRCIT` use `SYS` encodings, so define them
as aliases of `SYSxt` instead of separate instructions.
Check that the preferred architectural aliases are printed when their
features are enabled and that disassembly falls back to the generic `SYS`
spelling when not enabled.
Convert hardware plugin to the typesafe pattern
The hardware plugin is a directory of four mostly-private legacy services (mseries.bios, mseries.nvdimm, hardware.memory, plus hardware.virtualization). Only hardware.virtualization.variant is public over the wire; the rest return plain dicts/bools consumed internally by alert sources and usage reporting, so Pydantic models would be pure overhead.
Applied the port-plugin pattern: lean Service shims in __init__.py that delegate to plain, fully type-annotated module functions, keeping the existing dict/primitive return shapes so no consumer changes are needed. The one public method gets check_annotations=True against the existing HardwareVirtualizationVariant models. Registered the services in main.py's ServiceContainer via nested hardware/mseries containers and added the plugin to mypy.yml.
[lldb][test] Introduce build_and_run test utility (#194386)
We currently have several hundred tests require a running process in a
given state, and therefore perform the same three tasks:
* compile a test executable
* set a breakpoint by finding a source regex
* then launch the test process to hit that breakpoint.
A large chunk of these tests do this exact same setup with various
versions of copied boilerplate code. The different versions we have all
have different conventions of naming the breakpoint comment, the main
file (and whether it should be resolved), and different generated error
messages if things go wrong.
We already have a standardized and much shorter way of doing this in
LLDB (see below), but this still encourages test writers to specify
non-standard file names and non-standard breakpoint comment names.
[15 lines not shown]
[lldb][test] Faster shut down for pexpect tests (#201171)
Our pexpect tests spend most of their time in the shutdown logic
waiting for the test child to shut down. For example, our editline
tests spend about 95% of their 40s runtime just waiting for the
pexpect child to terminate.
One of the reasons is that the ptyprocess terminate approach
uses a timeout to give the child time to shut down and be cleaned
up by the kernel. While this timeout makes sense, our timeout is
extremely long (6s) since 56fb7456950d2564d16500e40c5719c954a6987a .
Because the default ptyprocess implementation is designed for very
short timeouts (0.1s), it just sleeps and then checks the process
status. For our long timeout, the child most likely already terminated
way before the timeout on a fast system. However, because we have
some very slow builders, we cannot reduce this timeout without
making tests flaky again.
[7 lines not shown]
AMDGPU: Reland: Codegen for v_dual_dot2acc_f32_f16/bf16 from VOP3
For V_DOT2_F32_F16 and V_DOT2_F32_BF16 add their VOPDName and mark
them with usesCustomInserter which will be used to add pre-RA register
allocation hints to preferably assign dst and src2 to the same physical
register. When the hint is satisfied, canMapVOP3PToVOPD recognises the
instruction as eligible for VOPD pairing by checking if it is VOP2 like:
dst==src2, no source modifiers, no clamp, and src1 is a register.
Mark both instructions as commutable to allow a literal in src1 to be
moved to src0, since VOPD only permits a literal in src0.
Original patch had a bug where it did not check if physical src
registers match register class of appropriate operand in fullVOPD
instructions, check is now done via isValidVOPDSrc.
[lldb] Avoid calling dyld's versions of libc functions (#201829)
dyld ships with its own version of various libc functions that we are
not supposed to call. This patch prevents the expression evaluator from
calling them by respecting the existing list of forbidden modules.
[flang][mem2reg] promote memory slots through declares (#196975)
Leverage the new mem2reg APIs for views to remove the
"same block" limitation over fir.declare mem2reg, and to allow mem2reg
over fir.convert so that mixed dialect mem2reg with fir + memref is
possible.
Note that fir.declare_value for memory used with different value types
will be dropped (e.g. EQUIVALENCE). A later patch will deal with
improving fir.declare_value to carry the variable type interpedently of
the value (like in LLVM), but there are anyway a bit more work to enable
mem2reg with equivalence given their storage is an array of bytes.
Assisted by: Claude
NAS-141414 / 27.0.0-BETA.1 / Convert kmip plugin to typesafe pattern (#19144)
This commit adds changes to convert the kmip plugin from the legacy
dict-based ConfigService/CompoundService to the typesafe
GenericConfigService pattern, with a ConfigServicePart, Pydantic models,
and the internal ZFS/SED key-management machinery extracted into plain
functions backed by an in-memory KMIPKeyStore. Since kmip.config now
returns a model, in-process consumers in failover, the pykmip mako, pool
encryption and the kmip pseudo-service are switched to attribute access,
and the KMIP port delegate hands the base a dict so port validation
keeps working.
API tests:
http://jenkins.eng.ixsystems.net:8080/job/tests/job/api_tests/9356/