linuxkpi: Fix an error path in linux_alloc_current()
If the allocation fails we should free the task struct.
While here get rid of a couple of unnecessary assertions.
Reported by: Kevin Day <kevin at your.org>
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54671
(cherry picked from commit a4955b0143361900140df640d116891f047f5431)
exterr: Sort output from make_libc_exterr_cat_filenames.sh
Otherwise the script may permute the order of entries in the file since
find(1) output is not stable.
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54669
(cherry picked from commit bda6ed2ee4d8e836b1b2f8ca7a6ed72034e5f231)
arm64/iommu: Fix a resource leak in smmu_domain_alloc()
We should free the allocated ASID if smmu_init_cd() fails.
Move the allocation of "domain" to simplify the first error path.
Reported by: Kevin Day <kevin at your.org>
Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54676
(cherry picked from commit 6740cccb1eff2a0e1e6d451fa9676a21736937d2)
linuxkpi: Clean up linux_shmem_file_setup() a bit
- Free the pointer that was returned by the allocator, instead of the
address of the first member. These will be equal in practice, but
it's sketchy and won't work on CHERI with subobject bounds checking.
- Use an anonymous struct, there's no need to name it.
Reviewed by: bz, brooks, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54673
(cherry picked from commit 251662e5abdd85f5a83766b400e23c2ac5597fb9)
asmc: add per-fan manual mode control via sysctl
Add per-fan manual mode control via dev.asmc.0.fan.N.manual sysctl.
Apple SMCs support manual fan control via the FS! SMC key,
a 16-bit bitmask where each bit controls one fan (0=auto, 1=manual).
This change adds a new sysctl per fan:
dev.asmc.0.fan.N.manual (0=auto, 1=manual)
When set to manual mode (1), the fan runs at the speed set via
dev.asmc.0.fan.N.targetspeed instead of automatic thermal control. When
set to auto mode (0), the SMC controls fan speed automatically.
The FS! key was already defined in asmcvar.h but not accessible.
This exposes it for debugging, testing, and advanced fan control.
Implementation uses read-modify-write to allow independent control of
each fan without affecting others.
[6 lines not shown]
arm64/vgic_v3: Fix an inverted test when reading GICD_I<C|S>ENABLER
On read, these registers' fields return 1 if forwarding of the
corresponding interrupt is enabled, and 0 otherwise. The test in
read_enabler() was inverted.
Reported by: Kevin Day <kevin at your.org>
Reviewed by: andrew
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54678
(cherry picked from commit 6fef0c9ee64cea1f22b6a33a0c4dd39f605b7465)
linuxkpi: Fix an error path in linux_alloc_current()
If the allocation fails we should free the task struct.
While here get rid of a couple of unnecessary assertions.
Reported by: Kevin Day <kevin at your.org>
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54671
(cherry picked from commit a4955b0143361900140df640d116891f047f5431)
arm64/iommu: Fix a resource leak in smmu_domain_alloc()
We should free the allocated ASID if smmu_init_cd() fails.
Move the allocation of "domain" to simplify the first error path.
Reported by: Kevin Day <kevin at your.org>
Reviewed by: br
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54676
(cherry picked from commit 6740cccb1eff2a0e1e6d451fa9676a21736937d2)
linuxkpi: Clean up linux_shmem_file_setup() a bit
- Free the pointer that was returned by the allocator, instead of the
address of the first member. These will be equal in practice, but
it's sketchy and won't work on CHERI with subobject bounds checking.
- Use an anonymous struct, there's no need to name it.
Reviewed by: bz, brooks, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54673
(cherry picked from commit 251662e5abdd85f5a83766b400e23c2ac5597fb9)
asmc: add per-fan manual mode control via sysctl
Add per-fan manual mode control via dev.asmc.0.fan.N.manual sysctl.
Apple SMCs support manual fan control via the FS! SMC key,
a 16-bit bitmask where each bit controls one fan (0=auto, 1=manual).
This change adds a new sysctl per fan:
dev.asmc.0.fan.N.manual (0=auto, 1=manual)
When set to manual mode (1), the fan runs at the speed set via
dev.asmc.0.fan.N.targetspeed instead of automatic thermal control. When
set to auto mode (0), the SMC controls fan speed automatically.
The FS! key was already defined in asmcvar.h but not accessible.
This exposes it for debugging, testing, and advanced fan control.
Implementation uses read-modify-write to allow independent control of
each fan without affecting others.
[6 lines not shown]
arm64/vgic_v3: Fix an inverted test when reading GICD_I<C|S>ENABLER
On read, these registers' fields return 1 if forwarding of the
corresponding interrupt is enabled, and 0 otherwise. The test in
read_enabler() was inverted.
Reported by: Kevin Day <kevin at your.org>
Reviewed by: andrew
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54678
(cherry picked from commit 6fef0c9ee64cea1f22b6a33a0c4dd39f605b7465)
[llvm][UnifyLoopExits] Avoid optimization if no exit block is found (#165343)
If there is not an exit block, we should not try unify the loops.
Instead we should just return.
Fixes #165252
libXpm: update to 3.5.18.
Alan Coopersmith (15):
Remove outdated ifdef checks for including stdint.h
unifdef sequent
unifdef VAX11C
Remove ancient Amiga support
Remove ancient port to 16-bit Windows without X11 libraries
Remove xpmstrcasecmp fallback for strcasecmp
Remove xpmstrdup fallback for strdup
Use _stricmp() instead of strcasecmp() on Windows
man pages: make indentation arguments to .IP be numeric
man pages: ensure .BR macro has multiple arguments
man pages: remove .PP after .SH or .SS lines
man pages: adjust line breaks in source files
Strip trailing whitespace from source files
gitlab CI: drop the ci-fairy check-mr job
libXpm 3.5.18
[8 lines not shown]
[OpenCL] Add clang internal extension __cl_clang_function_scope_local_variables (#176726)
OpenCL spec restricts that variable in local address space can only be
declared at kernel function scope.
Add a Clang internal extension __cl_clang_function_scope_local_variables
to lift the restriction.
To expose static local allocations at kernel scope, targets can either
force-inline non-kernel functions that declare local memory or pass a
kernel-allocated local buffer to those functions via an implicit argument.
Motivation: support local memory allocation in libclc's implementation
of work-group collective built-ins, see example at:
https://github.com/intel/llvm/blob/41455e305117/libclc/libspirv/lib/amdgcn-amdhsa/group/collectives_helpers.llhttps://github.com/intel/llvm/blob/41455e305117/libclc/libspirv/lib/amdgcn-amdhsa/group/collectives.cl#L182
Right now this is a Clang-only OpenCL extension intended for compiling
OpenCL libraries with Clang. It could be proposed as a standard OpenCL
extension in the future.
[libclc] replace float remquo with amd ocml implementation (#177131)
Current implementation has two issues:
* unconditionally soft flushes denormal.
* can't pass OpenCL CTS test "test_bruteforce remquo" on intel gpu.
This PR upstreams remquo implementation from
https://github.com/ROCm/llvm-project/tree/amd-staging/amd/device-libs/ocml/src/remainderF_base.h
It supports denormal and can pass OpenCL CTS test. Number of LLVM IR
instructions of function _Z6remquoffPU3AS5i increased from 96 to 680.
---------
Co-authored-by: Copilot <175728472+Copilot at users.noreply.github.com>