[PBQP] Report an error when inline asm needs more registers than available
When an inline asm needs more registers than are available, the other
register allocators report "inline assembly requires more registers than
available" and go on. PBQP instead tried to spill a register that can't be
spilled, which asserted in InlineSpiller ("Attempting to spill already
spilled value."), either for a register with no allowed registers or for
one that the solution spills. A problem with no solution of finite cost
could also assert first, in the solver's backpropagation, that a
conservatively allocatable node had a register option.
Move RegAllocBase's handling of a register that failed to allocate into a
function, assignFailedVirtReg(), and call it from PBQP for a register that
can't be spilled instead of spilling it. Exempt a node with no option of
finite cost from the solver's assertion.
Fixes #235566.
[InstSimplify] Fold nested FP min/max with a shared operand (#233365)
foldMinimumMaximumSharedOp only matched m(m(X, Y), X). Look through
nested calls of the same intrinsic so the shared operand can be found
deeper in the tree. The FP min/max intrinsics are commutative,
associative and idempotent (ignoring sNaN quieting, as the existing
folds already do), so if m(X, Z) == X then m(m(X, Y), Z) == m(X, Y).
```llvm
%ab = call float @llvm.maxnum.f32(float %a, float %b)
%abc = call float @llvm.maxnum.f32(float %ab, float %c)
%r = call float @llvm.maxnum.f32(float %abc, float %a)
-->
%r = %abc
```
[clang][unittests] Skip DeviceOffloadHIPTest.* on AIX and z/OS
Convert `DeviceOffloadHIPTest.DeviceObjectIsGenerated` to a `TEST_F`
backed by a new fixture class that inherits from `InterpreterTestBase`,
consistent with `DeviceOffloadTest`.
Avoids
```
LLVM ERROR: Incompatible object format!
```
[BPF] Mask the index into a jump table (#235214)
The verifier wants to see that the load from a jump table is within the
table. The range check doesn't always show that. The compare is done in
the type of the switch and the index is that value extended to 64 bits,
which can be two computations:
w1 = w7
w1 &= 255
if w1 > 24 goto ...
r1 = r7
r1 &= 255
r1 <<= 3
r2 = BPF.JT.0.0 ll
r2 += r1
r1 = *(u64 *)(r2 + 0) R2 max value is outside of the allowed memory
range
Make the size of the table a power of two, the new entries repeat the
[5 lines not shown]
[BPF] Give a switch whose default is unreachable a default (#235213)
There is no range check in front of a jump table when the default of the
switch is unreachable:
%v = load i8, ptr %p
switch i8 %v, label %default [ i8 0, label %c0 ... i8 15, label %c15 ]
default:
unreachable
w1 = *(u8 *)(r1 + 0)
r1 <<= 3
r2 = BPF.JT.0.0 ll
r2 += r1
r1 = *(u64 *)(r2 + 0)
gotox r1
The compiler knows that the value is one of the cases. The verifier
doesn't: "R2 max value is outside of the allowed memory range".
[8 lines not shown]
Merge tag 'parisc-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller:
- fix out-of-bounds read in eisa_enumerator driver
- drop redundant pte_xxx() macros and use common macros
- code cleanup in eisa_enumerator driver
- typo fixes in comments in various header files
* tag 'parisc-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: eisa_enumerator: Code and whitespace cleanups
parisc: eisa_enumerator: Fix out-of-bounds reads of the EEPROM buffer
parisc: Drop redundant implementation of ptep_set_wrprotect()
parisc: Drop redundant implementation of pte_same()
parisc: Drop own implementations for ptep_get() and ptep_test_and_clear_young()
parisc: fix typos in comments in parport.c
[8 lines not shown]
[clang][Driver] Don't let -save-temps overwrite the input file (#235413)
With -save-temps, an intermediate file named after the input can be the
input itself, e.g. the preprocessed output of a .s file on Darwin. The
driver catches this, but only checked for it when the output's name was
the input's file name. It missed two cases, and overwrote the input with
the preprocessed output:
- With -save-temps=obj, the output is in the output's directory, so
"clang -c -save-temps=obj sub/t.s -o sub/t.o" wrote "sub/t.s".
- On a case-insensitive file system, such as macOS's default, the
preprocessed output "t.s" of an input "t.S" is the same file.
Check whether the output is the same file as the input whenever temps
are saved.
Fixes #7002.
Merge tag 'sh-for-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux
Pull sh updates from John Paul Adrian Glaubitz:
"Fixes and improvements for various boards as well as the generic sh
kernel:
- help the mach-x3proto and ecovec24 boards get rid off the use of
the old platform data API in the kernel. For the former board,
software nodes are being used for gpio-keys now while for the
latter board, static device properties are used to describe the
touchscreen (Dmitry Torokhov)
- a build fix when CONFIG_BUILTIN_DTB is enabled, and fix an issue
with __get_user_u64() and __put_user_u64() using wrong memory
operands which could cause the kernel build to fail with "invalid
'asm'" or an internal compiler error in GCC's change_address_1
(Florian Fuchs)
- update various default configuration files of several boards to
[30 lines not shown]
[SelectionDAG] Lower direct inline asm inputs of aggregate type
SelectionDAG represents an aggregate as one value per member, but lowered
a direct inline asm input of aggregate type as if it were a single value.
A memory input crashed computing the store's type ("Unknown type!"), and a
register input, which ParseConstraints() gives the integer type of the
aggregate's size, passed only the first member: e.g. "r" of a { i32, i32 }
dropped the second i32, and of a [2 x i64] asserted in getCopyToParts().
Store the members to a stack slot, as visitStore() does, and pass the slot
to a memory input, or load the integer from it for a register input.
Fixes #235567.
Assisted-by: Claude Opus 5.5
Merge tag 'mips_7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer:
"MM:
- fix huge TLB handling
OCTEON:
- correct register access for CN6xxxx SOCs
- provide DTs for platforms where U-Boot doesn't have a DT
Decstation:
- fix 64bit kernels
- build cleanups
Others:
- cleanups and fixes"
* tag 'mips_7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (30 commits)
MIPS: octeon: Add detection of UBNT Edgeroute Lite devices
[20 lines not shown]
Merge tag 'x86-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar:
- Mark CPUID function 0x23 as being indexed - which bug could break
VMs (Sean Christopherson)
* tag 'x86-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/cpuid: Mark CPUID function 0x23 as being indexed
Merge tag 'timers-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar:
- Clear timer_base::pending_map on CPU hot-unplug, that can
cause temporal timeout processing anomalous on the next
hot-replug (Liang Hao)
- Fix PID refcount leak in the posix-cpu-timers do_cpu_nanosleep()
signal path (Cen Zhang)
- Require (CAP_SYS_TIME) permission to set auxiliary clocks
via aux_clock_set() (Daehyeon Ko)
- Update offsets on sequence counter retry in
ktime_get_update_offsets_now() (Thomas Weißschuh)
* tag 'timers-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
timekeeping: Update offsets on sequence counter retry in ktime_get_update_offsets_now()
[3 lines not shown]
Merge tag 'sched-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar:
- Fix MM CID affinity-triggered switch back to per-task mode
(Hui Su)
- Fix scheduling regression observed on AMD Ryzen
AI HX 370 systems, caused by cache aware scheduling
incorrectly overriding asym packing placement (Tim Chen)
- Fix stale get_pref_llc() prototype for !CONFIG_SCHED_CACHE
(Yafang Shao)
* tag 'sched-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: fix stale get_pref_llc() stub for !CONFIG_SCHED_CACHE
sched/cache: Honor asym packing over cache aware scheduling on hybrid systems
sched/mmcid: Fix affinity-triggered switch back to per-task mode
Merge tag 'irq-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull kexec / irq fix from Ingo Molnar:
- Fix possible hang in machine_kexec_mask_interrupts(),
which incorrectly assumes that irq_set_irqchip_state()
will always be able to complete in a kexec crash path,
triggered on RK3399 embedded boards (Igor Velkov)
* tag 'irq-urgent-2026-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq/kexec: Do not take the bus lock of an interrupt chip on the crash path
Merge tag 'liveupdate-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
Pull liveupdate updates from Mike Rapoport:
- Several small fixes to KHO and LiveUpdate selftest
- A series that renames "KHO scratch" to "KHO bootmem" because this
memory is way more important in kexec'ed kernels rather than in the
original cold boot kernel and the new name reflects it
* tag 'liveupdate-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux:
kho: do not reserve empty per-node bootmem areas
selftests/liveupdate: Prefer KVM and HVF over TCG in vmtest.sh
kho: rename kho_scratch= commandline parameter to kho_bootmem=
kho: rename KHO scratch to KHO bootmem
memblock: rename KHO_SCRATCH to KHO_NOPRSRV
memblock: get rid of CONFIG_MEMBLOCK_KHO_SCRATCH
kho: docs: fix scratch_phys debugfs cross-reference
kho: do not reserve scratch memory in the kdump kernel
Merge tag 'kexec-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
Pull kexec updates from Mike Rapoport:
- Fix probe error codes and error propagation:
- make architecture functions that probe loaded image consistenly
return -ENOEXEC when they do not recognize the image format
- make kexec_image_probe_default() distinguish image format
mismatches (-ENOEXEC) from real errors (e.g. -ENOMEM),
propagating real errors immediately and only continuing to the
next loader on -ENOEXEC
- Make sure the next kernel does not land on hardware-poisoned pages
- Remove unused arch_kexec_locate_mem_hole hook
* tag 'kexec-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux:
[5 lines not shown]
x11-fm/worker: update the port to the next major release 6.0.0
Most visible changes are internal text editor, copy and rename
based on regular expressions, nanoseconds timestamp support.
On the port's side, there is optional Imlib2 support, C++20 is
now used for compilation, switch to smaller .tar.zst distfile.
Reported by: portscout
filesystems/avfs: update the port to version 1.4.0
- Add alternative WWW and MASTER_SITES locations
- Drop DEBUG option and amend CONFIGURE_ARGS in
accordance to WITH_DEBUG, a user-facing variable
- Add Lzip compression support and enable it with
Zstd, as both are light or common dependencies
Reported by: portscout
Merge tag 'memblock-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/memblock
Pull memblock updates from Mike Rapoport:
"Performance improvement:
- Use binary search in memblock_add_range() and
memblock_isolate_range()
Cleanups:
- Several simplifications in memblock and mm_init that remove
redundant code
- After rework of sparsemem buffer preallocation, memmap_alloc() does
not require exact_nid parameter. Remove that parameter, drop now
unused memblock_alloc_exact_nid_raw() and adjust memblock tests
accordingly
memblock test updates:
[21 lines not shown]
[LV] Add test for max reduction with escaping intermediate store (NFC) (#235571)
The loop is currently vectorized and stores a value computed from lane 0
of the vector accumulator instead of the scalar running max.