[TargetInstrInfo] Address review: don't fold a subregister that isn't at the start of the slot
A folded operand refers to the start of the stack slot, which holds the
whole register, so a subregister is only there if it's at bit offset 0 on a
little-endian target. Folding x86's sub_8bit_hi read byte 0 instead of byte
1. Folding several operands at once made this worse: two operands holding
different subregisters of one value (e.g. "Qm"(lo), "Qm"(hi)) both read
byte 0.
Check the subregister in mayFoldInlineAsmRegOp, so the spill weights agree
with what folds. A tied def is covered too, since its tied use has the same
subregister.
Assisted-by: Claude Opus 5.5
Merge pull request #544 from nextbsd/fix/pkg-db-private-var
build.sh: lay the /private symlinks before pkg installs, so the package database lands in /private/var
[SystemZ] Fix -Wunused-variable in bcb301d (#235171)
Variable ends up only being used in assertions afterwards which fires
-Wunused-variable in release builds.
[llvm-exegesis] Avoid instability from `std::uniform_int_distribution` (#234516)
The standard doesn't require a stable order, and we see active variation
between libstdc++ and libc++ when using this. Follow the pattern of
`llvm::shuffle` and manually clamp with `%` instead.
Also removes an unnecessary `REQUIRES` that gets this to run in
pre-merge CI.
Assisted-by: Antigravity with Gemini
build.sh: empty the package cache directory after pkg clean
pkg clean's failure is ignored and it leaves files it does not recognise,
so delete whatever remains in private/var/cache/pkg before the image is
baked. No downloaded package ships in the IMG or ISO.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
build.sh: lay the /private symlinks before pkg installs, so the package database lands in /private/var
Step 3 moved the installed var into private/ after NextBSD-everything was
installed. Since nextbsd-userland#375, NextBSD-userland ships
/private/var/log/com.apple.launchd, so private/var already existed and
mv nested var inside it as private/var/var. The package database and the
package cache were stranded there: the image's pkg info listed only pkg,
and the 101 MiB cache escaped step 5b's clean.
Create private/{etc,var,tmp} and the relative etc/var/tmp symlinks at the
start of the pkg branch instead, and drop the move.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Merge tag 'pci-v7.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull PCI updates from Bjorn Helgaas:
"Enumeration:
- Set supported_speeds in set_pcie_port_type() so sparc64 and
powerpc, which call it via of_create_pci_dev() instead of the usual
pci_setup_device(), correctly set the supported PCIe link speeds
(Stian Halseth)
- When pcie_set_mps() changes MPS, update the value in the saved
state so a subsequent restore doesn't restore an invalid value
(Niklas Cassel)
- Skip Target Speed quirk on clamped ports with no link (Maciej W.
Rozycki)
Driver binding:
[358 lines not shown]
wg: fix the LINT-NOIP build
We don't have anything to tunnel without INET or INET6, so just smack
it with the same config(5) hammer that ovpn uses and exclude it from
such builds.
Reported by: mjg
Reviewed by: emaste, markj
(cherry picked from commit 8430de47aa7c004e1330b8f6a3018c360425606e)
loader.efi: devinit() just after parsing args instead
c4640126f1160 ("loader.efi: Apply command-line DHCP overrides earlier")
was really good, but moving it just one statement earlier is even
better. polarian on Libera describes a GELI setup on a system that
doesn't advertise a serial console via ConOut. They don't have serial
input at the point that they would get prompted for the GELI passphrase,
but if we parse args just before devinit() then he can override the
console with `efibootmgr -e`. This gives UEFI one advantage over BIOS
loader, as /boot.config isn't available to provide that kind of override
if your impediment is GELI.
We also considered reading loader.env earlier, but we have a chicken/egg
problem in that we must have probed for the ESP to be able to open() it.
We would instead need a devinit_early() and devinit_late() scheme that
allows GELI probing to be deferred until the later pass, after reading
loader.env to pick up the console override. That's an idea I'd still
like to discuss because it's more robust than hoping that firmware won't
wipe out our efibootmgr(8) entries.
[5 lines not shown]
rc: add a backlight service to save/restore backlight levels
The default on my laptop is annoyingly bright, and this is a useful
feature to mitigate that. The backlight script is largely a copy of the
mixer service which provides the same value for mixers, but this one is
specifically dependant on kld to allow DRM drivers a chance to attach.
Note that it's off by default to avoid interference with DEs, and
document the capability in backlight(8). Set backlight_enable=YES in
rc.conf(5) to enable save/restore.
Relnotes: maybe
Reviewed by: bapt, ivy, manu, ziaee
(cherry picked from commit c45bdb39fe985b43afc63b7cbd989fe7a61673b7)
iuserboot: bump the interface to v6, add an accept_interpreter callback
If an explicit loader wasn't requested, then bhyveload(8) maintains a
/boot handle that it can use for swapping to a different flavor. This
means that we expose all of the host /boot to the sandbox for the
duration of script execution.
Add a callback to ack that we're OK with the interpreter so that
bhyveload(8) can release the bootfd. This is worth doing because it's
prior to guest script execution, so we're still running a reasonably
untainted process.
Reviewed by: imp, jhb
(cherry picked from commit 619d09217720cb82f562b51e98576438dc11c830)
snd_uaudio: recognize hardware sidetone as a monitor
The Logitech H390, for instance, has the following interface layout:
~~
7 INPUT 34 INPUT 10 INPUT
Mic (0x201) Mic (0x201) USB Stream (0x101)
| | |
v v |
19 FEATURE 35 FEATURE |
| | |
v v |
25 EXTENSION +------> 36 MIXER <---+
| |
v v
13 OUTPUT 22 FEATURE
USB Stream (0x101) |
v
16 OUTPUT
[30 lines not shown]
[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>