[mlir][scf] add support for unsigned loop for back peeling (#234435)
- add support for unsigned loop for back peeling
- fix sub overflow bug in the signed path
- remove unsigned operation check in dispatcher
- return early if unsigned in `peelForLoopAndSimplifyBounds` since
affine.min/max does not hold for unsigned loops
- add tests for edge cases in unsigned, sub overflow and no bound
simplification for unsigned
from https://github.com/llvm/llvm-project/pull/231100
claude helped me with the tests and correctness.
Merge tag 'iommu-updates-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux
Pull IOMMU updates from Joerg Roedel:
"Core:
- Detect scatterlist length overflows and finalize deferred domain
attachments before mapping MSI pages
- Consolidate x86 MSI reserved-region handling and clean up internal
DMA and SVA helpers
AMD IOMMU:
- Add IOMMU PerfOpt support, enabled by amdgpu for supported
integrated GPUs in identity domains
- Restrict forced identity mapping to GPUs that require it
- Fix kdump device-table allocation and reuse, ATS configuration
error handling, and an interrupt-remapping allocation leak
- Clean up device probing and initialization
- Add Vasant Hegde as an AMD IOMMU maintainer
ARM SMMUv2:
[66 lines not shown]
[MSP430] Update msp430 generator (#228006)
- gen-msp430-def.py was updated to include the CPU type. Current CPU types are msp430, msp430x and msp430xv2. This is useful information for determining whether extended instructions are valid on a given target.
- Adds a new hwmult variant called f5series. The script now maps the HWMPY value of 8 to this variant. This is important because the f5series hardware multiplier has a different base address compared to older MPY32 support.
- Also added new tests with a newer target containing a f5series hardware multiplier. The auto mode will now also correctly map to include f5series support if the MCU supports this.
Based on https://reviews.llvm.org/D108301 by Jozef Lawrynowicz.
Co-authored-by: Jozef Lawrynowicz <jozefl.opensrc at gmail.com>
Assisted-by: Claude Code (Claude Opus 5.5)
Merge tag 'dma-mapping-7.4-2026-10-21' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux
Pull dma-mapping updates from Marek Szyprowski:
- several SWIOTLB initialization cleanups (Aneesh Kumar K.V, Francesco
Valla)
- exact page allocation for DMA pages (Qingfang Deng)
- tools/dma build fixes (Sasha Levin)
- minor fixes for various corner cases (Marek Szyprowski, Leon
Romanovsky) and code cleanup (John Garry)
* tag 'dma-mapping-7.4-2026-10-21' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
dma-debug: Skip cacheline tracking for MMIO mappings
tools/dma: fix building from the top level with O=
tools/dma: fix building with O=
dma: swiotlb: Track whether the pool size was explicitly set
[7 lines not shown]
Merge tag 'vfio-v7.4-rc1' of https://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson:
- Fix missing selftest <libgen.h> include for basename() to support
non-glibc builds (Hisam Mehboob)
- Add vfio selftest documentation covering the libvfio helper library
and guidance for developers to aid in adding and understanding the
framework (David Matlack)
- Fix vfio cdev open path to prevent a second open from clobbering the
vf_token or clearing the KVM reference. Add a selftest to avoid
future recurrences (Alex Williamson)
- Extend vfio selftest mix_and_match timeouts, in particular to account
for systems where generated faults can induce heavy SMM load,
delaying internal timeouts. Also extend timeout for execution via
runner to account for various tests exceeding default 45s timeout
[66 lines not shown]
Be more conservative with pool and freelist sizes and address potential deadlocks discovered while working on PR kern/60396.
Note that with this change we track the total amount of memory allocated to
both reserved buffers and pools on a per-array basis, and constrain
"openings" to keep it under control on small-memory machines.
1) Per suggestion from oster@, rename the "emergency" freelists that are now
used before dynamic allocation to "reserved" freelists.
2) Eliminate static pool sizes and compute dynamically instead. For now,
most are larger to avoid potential deadlocks discussed below. With
some restructuring of the I/O dispatch model they can probably get smaller.
3) Address an M_WAITOK allocation with PSS_MUTEX held in "forced"
reconstruction. It appears this could deadlock rf_RaidIOThread
and the recon thread. Added another small set of emergency
buffers to cover this case.
4) Reorganize rf_Configure to initialize pools _after_ disk,
[35 lines not shown]
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull vhost,virtio updates from Michael Tsirkin:
"This adds CPR support for vhost.
Plus some fixes, notably for a host of races we had when callback fire
around device reset"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
tools/virtio: add missing device-id/virtio.h wrapper header
vhost/vsock: add VHOST_RESET_OWNER ioctl
vhost: synchronize with RCU readers when freeing workers
vhost/vsock: re-scan TX virtqueue on device start
vhost/vsock: suppress EHOSTUNREACH fast-fail during CPR pause
vhost/vsock: split out vhost_vsock_drop_backends helper
virtio_pci: drop callback sync on reset
virtio_pci_modern: move avq cleanup from reset to del_vqs
virtio: synchronize callbacks after device reset
virtio_vdpa: implement synchronize_cbs()
[5 lines not shown]
[AMDGPU] Fix gfx9-4-generic LDS allocation granule
gfx9-4-generic paired gfx950's 1280-byte allocation granule with
gfx942's 64 KiB LDS capacity. A 64 KiB work-group then rounded to
66560 bytes, was deemed not to fit, and dropped occupancy to 1. The
resulting VGPR budget made 1024-lane dispatches fail.
Use gfx942's 512-byte granule, which matches the capacity.
Fixes LCOMPILER-3031.
Change-Id: Ic8d36fd0921a80abd0debaee1fb2c28cd01604d0
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[ConstraintElim] Split signed min/max across their operands when checking a compare
The existing constraint systems only record the bounds that hold for both
operands of a min/max (smax(a, b) >= a and >= b, smin(a, b) <= a and <= b). The
other direction is a disjunction, which cannot be recorded as a fact. When a
compare of signed decompositions involves a min/max result, split it into its
operands: the decomposition is monotonic in that result, so it is the max or min
of its values on each side, and the relation holds for all or for either side
respectively.
https://alive2.llvm.org/ce/z/zsGkJ-
[ConstraintElim] A signed sum of operands with opposite signs cannot wrap
If one operand is known non-negative and the other non-positive, the signed
sum is between them, so it cannot overflow.
https://alive2.llvm.org/ce/z/ZF5Yqr
[ConstraintElim] Prove sadd/ssub.with.overflow cannot overflow from the exact sum
Decompose the operands and show that the sum lies in the range of the type. This
handles patterns like A + (B - A), as well as sums involving signed min/max
results, which are split across their respective operands using monotonicity
(for example start + smax(end - start - 1, 0) <= end).
https://alive2.llvm.org/ce/z/ze8LCk
[ConstraintElim] Propagate the sign across an icmp samesign
If one operand of `icmp samesign` is known (non-)negative, so is the other. Add
that as a fact in the signed system.
https://alive2.llvm.org/ce/z/xUgGRM
amdsmu: Don't rely on s0i3_last_entry_status metric
This metric seems unreliable and I have observed it occasionally report
1 (successful entry to S0i3) when the time_last_in_s0i3 metric was 0 on
Phoenix, which does not make sense.
So just rely on time_last_in_s0i3 instead.
Sponsored by: The FreeBSD Foundation
www/zoraxy: Fix build on non-amd64
sshprox declares UseWinTTY and gotty only for freebsd/amd64, which
breaks the build on all other architectures. amd64 embeds no gotty
binary anyway, so extend the build constraint to all of FreeBSD.
Sponsored by: Netzkommune GmbH
(cherry picked from commit 2ea38e53e6a3434d2cf581813ba80592681c811c)
www/zoraxy: Fix build on non-amd64
sshprox declares UseWinTTY and gotty only for freebsd/amd64, which
breaks the build on all other architectures. amd64 embeds no gotty
binary anyway, so extend the build constraint to all of FreeBSD.
Sponsored by: Netzkommune GmbH
www/zoraxy: Fix build on non-amd64
sshprox declares UseWinTTY and gotty only for freebsd/amd64, which
breaks the build on all other architectures. amd64 embeds no gotty
binary anyway, so extend the build constraint to all of FreeBSD.
Sponsored by: Netzkommune GmbH
powerpc/irq: Fix build with CONFIG_PROC_FS=n
Commit fbb22ceaaf8f ("powerpc/irq: Make irqstats array based") made
arch_show_interrupts() call irq_proc_emit_counts(). That function lives
in kernel/irq/proc.c, which is only built with CONFIG_PROC_FS, so
kernels without procfs no longer link:
powerpc64-linux-ld: arch/powerpc/kernel/irq.o: in function `arch_show_interrupts':
arch/powerpc/kernel/irq.c:134:(.text+0x4b8c): undefined reference to `irq_proc_emit_counts'
arch_show_interrupts() is only called from irq_seq_show(), which is in
kernel/irq/proc.c as well, so build it only with CONFIG_PROC_FS, as x86
already does.
Fixes: fbb22ceaaf8f ("powerpc/irq: Make irqstats array based")
Reported-by: kernel test robot <lkp at intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609271531.8kf2NTjK-lkp@intel.com/
Signed-off-by: Sasha Levin <sashal at kernel.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
[AMDGPU][Scheduler] Restore local spill rejection in occupancy mode (#233979)
When rematerializing for higher occupancy, the scheduler can retain a
schedule that introduces spills even when the saved order is spill-free.
The `!TargetOcc` guard disables local spill rejection. Since occupancy
is tracked using `max(WavesBefore, WavesAfter)`, global finalization can
still consider the target reached even when the trial schedule is worse.
The guard was introduced in 7cc7a9412893 (#180646) alongside a fix for
rollback using temporary `DBG_VALUE` placeholders. dc34d163d8c9
(#192443) replaced that representation with the shared MIR
rematerializer, removing the placeholder-specific slot-index issue.
Re-enable the existing `mayCauseSpilling` check in occupancy mode to
reject such trials and restore the instruction order saved before
rescheduling, while preserving rematerialization. Global finalization
still handles rematerialization rollback. Add a MIR regression that
spills before the fix and remains spill-free afterward.
[5 lines not shown]
kernel - Fix I/O stalls caused by TRIM ops
* I/O can stall out in physstr when TRIM ops are delpoyed. The
cause is that the da_softc->outstanding_cmds_rd tracker used by
the I/O balancer was decrementing the field on TRIM completions.
* Fix by ensuring that the tracker only applies to READ commands.
* Refactor scheduling checks in dastart(). The checks were a bit broken
but worked due to a catch-all in dadone(). Refactor so they work properly.
* Refactor conditional/block syntax a bit for readability.
Reported-by: myself and numerous others