LLVM/project e0e7b92 — llvm/lib/Target/LoongArch LoongArchISelLowering.h LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lasx vselect.ll

[LoongArch] Custom legalize vselect to vector_shuffle for most constant condition cases (#163489)
DeltaFile
+82-45llvm/test/CodeGen/LoongArch/lsx/vselect.ll
+61-38llvm/test/CodeGen/LoongArch/lasx/vselect.ll
+52-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+1-0llvm/lib/Target/LoongArch/LoongArchISelLowering.h
+196-854 files

FreeBSD/src b3563d1 — sys/dev/virtio/random virtio_random.c

virtio_random: defer first enqueue until after DRIVER_OK

According to the virtio spec:

> The driver MUST NOT send any buffer available notifications to the
> device before setting DRIVER_OK.

DRIVER_OK isn't set until after attach completes, so defer the first
enqueue.  We haven't found any problems as a result of this to the best
of my knowledge: q35 and other devices that we *have* been used with
will apparently check when we go DRIVER_OK.

Tested with q35 virtio-random, which still works.

Reported by:    llm-postcr
Reviewed by:    kfv, markj
Fixes:  f1c5a2e3a62505 ("virtio_random: Pipeline fetching the data")
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

    [2 lines not shown]
DeltaFile
+16-2sys/dev/virtio/random/virtio_random.c
+16-21 files

FreeBSD/src 601d2a9 — sys/dev/virtio/random virtio_random.c

virtio_random: stop on detach, don't poll

If the device is hung, then polling will block the detach and hang us.
Stop it and drain the queue instead.  This fixes a hang on detach in
some circumstances without the upcoming virtio_pci_modern fix.

Reviewed by:    bnovkov, kfv
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit cce522853aae3da45b131c2522dd2510edf083e7)
DeltaFile
+9-3sys/dev/virtio/random/virtio_random.c
+9-31 files

FreeBSD/src fcfae0a — sys/dev/virtio/pci virtio_pci_modern.c

virtio_pci_modern: enable virtqueues before completing attach

Most of our drivers setup interrupt(s) and virtqueues are enabled at
that time, but nothing will currently enable them for devices that we're
only going to poll.  This most notably affects virtio-random, and the
problem can be observed with qemu's q35 emulation and a random device
attached.  The q35 implementation ignores the ring unless it's enabled,
so vtrnd_harvest() will consistently EAGAIN rather than contribute
anything of value, but with this patch it becomes functional.

This can be reproduced with a qemu invocation like so:

qemu-system-x86_64 -machine q35,accel=tcg -cpu max -smp 2 -m 2G \
  -drive file=FreeBSD-16.0-CURRENT-amd64-ufs.qcow2,if=virtio \
  -device pcie-root-port,id=rp1,bus=pcie.0,chassis=1 \
  -object rng-random,id=rng0,filename=/dev/urandom \
  -device virtio-rng-pci,rng=rng0,bus=rp1 \
  -display curses


    [5 lines not shown]
DeltaFile
+10-0sys/dev/virtio/pci/virtio_pci_modern.c
+10-01 files

FreeBSD/src 41aa43f — sys/dev/virtio/random virtio_random.c

virtio_random: avoid using vtrnd_detach in the failure path

On the off chance that we discover more than one virtio-random device,
the second one will deregister the global instance or trip an invariant
when it fails to attach and calls vtrnd_detach().

We don't have that many resources to free, so just inline those.  This
is purely a hygiene thing, we haven't seen an instance of this in the
wild (to my knowledge).

Reviewed by:    bnovkov, kfv
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit 26ba71f73e8914ecd9e5b1e7bb864fee41158d04)
DeltaFile
+9-2sys/dev/virtio/random/virtio_random.c
+9-21 files

LLVM/project 33e199f — libc/src/stdio/generic putchar.cpp putc.cpp, libc/test/src/stdio putc_test.cpp fputc_test.cpp

[libc] Return the written character from putc, fputc and putchar (#239980)

All three returned zero on success. C requires the character written,
taken as an unsigned char and converted to int. A caller comparing the
result against the character it passed reads zero as a failed write.

m4's configure probes ftello by writing a byte after a read reaches end
of file and checking that putc returns it. It concluded LLVM-libc had a
Solaris bug it does not have, then failed to compile the workaround it
selected.

Assisted-by: Claude
DeltaFile
+8-1libc/test/src/stdio/fputc_test.cpp
+2-1libc/test/src/stdio/putc_test.cpp
+1-1libc/src/stdio/generic/putchar.cpp
+1-1libc/src/stdio/generic/putc.cpp
+1-1libc/src/stdio/generic/fputc.cpp
+13-55 files

LLVM/project 3c76869 — clang-tools-extra/docs/clang-tidy/checks/modernize avoid-bind.md min-max-use-initializer-list.md

~
DeltaFile
+1-11clang-tools-extra/docs/clang-tidy/checks/modernize/make-shared.md
+2-10clang-tools-extra/docs/clang-tidy/checks/modernize/loop-convert.md
+0-10clang-tools-extra/docs/clang-tidy/checks/modernize/make-unique.md
+3-5clang-tools-extra/docs/clang-tidy/checks/modernize/deprecated-headers.md
+0-6clang-tools-extra/docs/clang-tidy/checks/modernize/min-max-use-initializer-list.md
+1-3clang-tools-extra/docs/clang-tidy/checks/modernize/avoid-bind.md
+7-452 files not shown
+8-488 files

FreeBSD/src 1a10bff — sys/dev/virtio/random virtio_random.c

virtio_random: defer first enqueue until after DRIVER_OK

According to the virtio spec:

> The driver MUST NOT send any buffer available notifications to the
> device before setting DRIVER_OK.

DRIVER_OK isn't set until after attach completes, so defer the first
enqueue.  We haven't found any problems as a result of this to the best
of my knowledge: q35 and other devices that we *have* been used with
will apparently check when we go DRIVER_OK.

Tested with q35 virtio-random, which still works.

Reported by:    llm-postcr
Reviewed by:    kfv, markj
Fixes:  f1c5a2e3a62505 ("virtio_random: Pipeline fetching the data")
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

    [2 lines not shown]
DeltaFile
+16-2sys/dev/virtio/random/virtio_random.c
+16-21 files

FreeBSD/src ffa1d4d — sys/dev/virtio/pci virtio_pci_modern.c

virtio_pci_modern: enable virtqueues before completing attach

Most of our drivers setup interrupt(s) and virtqueues are enabled at
that time, but nothing will currently enable them for devices that we're
only going to poll.  This most notably affects virtio-random, and the
problem can be observed with qemu's q35 emulation and a random device
attached.  The q35 implementation ignores the ring unless it's enabled,
so vtrnd_harvest() will consistently EAGAIN rather than contribute
anything of value, but with this patch it becomes functional.

This can be reproduced with a qemu invocation like so:

qemu-system-x86_64 -machine q35,accel=tcg -cpu max -smp 2 -m 2G \
  -drive file=FreeBSD-16.0-CURRENT-amd64-ufs.qcow2,if=virtio \
  -device pcie-root-port,id=rp1,bus=pcie.0,chassis=1 \
  -object rng-random,id=rng0,filename=/dev/urandom \
  -device virtio-rng-pci,rng=rng0,bus=rp1 \
  -display curses


    [5 lines not shown]
DeltaFile
+10-0sys/dev/virtio/pci/virtio_pci_modern.c
+10-01 files

FreeBSD/src ddfd685 — sys/dev/virtio/random virtio_random.c

virtio_random: stop on detach, don't poll

If the device is hung, then polling will block the detach and hang us.
Stop it and drain the queue instead.  This fixes a hang on detach in
some circumstances without the upcoming virtio_pci_modern fix.

Reviewed by:    bnovkov, kfv
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit cce522853aae3da45b131c2522dd2510edf083e7)
DeltaFile
+9-3sys/dev/virtio/random/virtio_random.c
+9-31 files

FreeBSD/src 45819a7 — sys/dev/virtio/random virtio_random.c

virtio_random: avoid using vtrnd_detach in the failure path

On the off chance that we discover more than one virtio-random device,
the second one will deregister the global instance or trip an invariant
when it fails to attach and calls vtrnd_detach().

We don't have that many resources to free, so just inline those.  This
is purely a hygiene thing, we haven't seen an instance of this in the
wild (to my knowledge).

Reviewed by:    bnovkov, kfv
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit 26ba71f73e8914ecd9e5b1e7bb864fee41158d04)
DeltaFile
+9-2sys/dev/virtio/random/virtio_random.c
+9-21 files

LLVM/project accd95d — llvm/test/CodeGen/LoongArch/lsx/ir-instruction mulwev_od.ll

fix tests
DeltaFile
+126-0llvm/test/CodeGen/LoongArch/lsx/ir-instruction/mulwev_od.ll
+126-01 files

FreeBSD/src ec66296 — sys/compat/linux linux_file.c

linux: Bound native getdents and getdents64 batches

linux_getdents() and linux_getdents64() round their native read size up
to DEV_BSIZE before converting entries. For an unaligned caller buffer,
the native batch can contain more entries than fit in the Linux buffer.
Conversion then returns EINVAL even after copying complete entries,
and the native read has already advanced the directory position.

For counts of at least DEV_BSIZE, use min(args->count, MAXBSIZE) instead.
A 768-byte request, such as rustix's initial directory read, now uses a
768-byte native buffer rather than 1024. The converted Linux dirent and
dirent64 records are no larger than their native counterparts, so the
whole translated batch fits. Returning a short batch is allowed, and
consuming the whole native batch avoids needing to rewind the directory
position.

Keep the existing sizing for counts below DEV_BSIZE. This fixes the
oversized-batch case in both getdents interfaces, including legacy
getdents for 32-bit and 64-bit callers. The remaining small-buffer,

    [8 lines not shown]
DeltaFile
+18-2sys/compat/linux/linux_file.c
+18-21 files

OpenBSD/src 3Hetjmb — sys/dev/pci/drm/amd/pm/swsmu/smu11 arcturus_ppt.c sienna_cichlid_ppt.c, sys/dev/pci/drm/amd/pm/swsmu/smu13 aldebaran_ppt.c

   drm/amd/pm: derive stable PPT limits from PPTable

   From Yang Wang
   db1e5bd4ee8efe8d8f294576d20e13b9d435a6f7 in linux-6.18.y/6.18.61
   25f4a46b0c8acd77c9065b50a1fe48af27d91fdf in mainline linux
VersionDeltaFile
1.10+18-14sys/dev/pci/drm/amd/pm/swsmu/smu11/navi10_ppt.c
1.21+17-13sys/dev/pci/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
1.10+13-12sys/dev/pci/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
1.12+6-2sys/dev/pci/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+54-414 files

OpenBSD/src udXxBvf — sys/dev/pci/drm/amd/display/dc/dml2/dml21/src/dml2_core dml2_core_dcn4_calcs.c

   drm/amd/display: Fix rounding errors in CalculatePrefetchSchedule

   From Matthew Stewart
   a5c18f62c897e0cffc469db8af52143a6e1b57f3 in linux-6.18.y/6.18.61
   fa0300333db07ca4ad56c9879f155faafd3f7079 in mainline linux
VersionDeltaFile
1.7+6-3sys/dev/pci/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c
+6-31 files

LLVM/project 979f4d3 — llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lsx/ir-instruction mulwev_od.ll

address heiher's comment
DeltaFile
+24-16llvm/test/CodeGen/LoongArch/lsx/ir-instruction/mulwev_od.ll
+6-1llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+30-172 files

OpenBSD/src IFkfdUj — sys/dev/pci/drm/amd/amdkfd kfd_events.c

   drm/amdkfd: Fix signal reset event

   From Amber Lin
   a5bc8c907c9fa3540f750a4c3ea2b25bd54cacb4 in linux-6.18.y/6.18.61
   b38f9b6ffdfc86d5aff36881d9e8028c79bc98c9 in mainline linux
VersionDeltaFile
1.16+8-9sys/dev/pci/drm/amd/amdkfd/kfd_events.c
+8-91 files

OpenBSD/src M0oNSTu — sys/dev/pci/drm/amd/amdgpu amdgpu_amdkfd_gfx_v11.c

   drm/amdgpu/gfx11: WARN() rather than BUG() for invalid SDMA engine

   From Alex Deucher
   61ebae16cef33e8601d030e3d200e36025a2c49b in linux-6.18.y/6.18.61
   c24edbd5ae0e4f24e0179e8c9f22a867016177bb in mainline linux
VersionDeltaFile
1.5+2-1sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c
+2-11 files

OpenBSD/src JUAs9NH — sys/dev/pci/drm/amd/amdgpu amdgpu_atomfirmware.c

   drm/amdgpu/atomfirmware: WARN() rather than BUG()

   From Alex Deucher
   a1a4ef16abcaa0bf09952b4413a2cc2991f20b89 in linux-6.18.y/6.18.61
   d7c595044965c826e6f3ce30590d3ec4399cd633 in mainline linux
VersionDeltaFile
1.13+0-2sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
+0-21 files

OpenBSD/src xU5WSMp — sys/dev/pci/drm/amd/amdkfd kfd_svm.c

   drm/amdkfd: add sanity check in svm_range_is_valid

   From Eric Huang
   f1be0815acc30ec458aef72fafb393b28476c27e in linux-6.18.y/6.18.61
   aa7e29cf9a37092cf5057a612ee09f28df20258f in mainline linux
VersionDeltaFile
1.30+7-1sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
+7-11 files

OpenBSD/src kFiUnuq — sys/dev/pci/drm/amd/pm/powerplay/hwmgr processpptables.c

   drm/amd/pm: Validate legacy hwmgr PP table offsets

   From Yang Wang
   35606292782dd35d152cc997a95742fd9bc2bcbd in linux-6.18.y/6.18.61
   0ceb6bc43e62f0e73b282c9de8f4bc4d5498f281 in mainline linux
VersionDeltaFile
1.6+316-130sys/dev/pci/drm/amd/pm/powerplay/hwmgr/processpptables.c
+316-1301 files

OpenBSD/src eozJtQr — sys/dev/pci/drm/amd/pm/powerplay/hwmgr vega10_processpptables.c

   drm/amd/pm: Validate Vega10 PPTable subtable bounds

   From Yang Wang
   d930abfdca53f3db4c60eb4b30069f51c8528c83 in linux-6.18.y/6.18.61
   9914149f99fd2ddcfd2a8c1053a57d96ec43448e in mainline linux
VersionDeltaFile
1.5+463-109sys/dev/pci/drm/amd/pm/powerplay/hwmgr/vega10_processpptables.c
+463-1091 files

OpenBSD/src UOuBd3U — sys/dev/pci/drm/amd/pm/powerplay/hwmgr process_pptables_v1_0.c

   drm/amd/pm: Validate Tonga PPTable subtable bounds

   From Yang Wang
   269e57807b70ba29832a866de83a3cbe00b0cc66 in linux-6.18.y/6.18.61
   53ef33c084c5778cc2dcd1efff25e31b6e231141 in mainline linux
VersionDeltaFile
1.6+525-89sys/dev/pci/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
+525-891 files

LLVM/project ff07510 — llvm/test/CodeGen/LoongArch/lsx/ir-instruction mulwev_od.ll

update after rebase
DeltaFile
+32-64llvm/test/CodeGen/LoongArch/lsx/ir-instruction/mulwev_od.ll
+32-641 files

LLVM/project 28805f4 — llvm/lib/Target/LoongArch LoongArchISelLowering.cpp

address tangaac's comment
DeltaFile
+2-2llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+2-21 files

LLVM/project b8ff6ca — llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lsx/ir-instruction mulwev_od.ll

deal with lsx i128
DeltaFile
+96-356llvm/test/CodeGen/LoongArch/lsx/ir-instruction/mulwev_od.ll
+34-22llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+130-3782 files

LLVM/project 0586e4c — llvm/lib/Target/LoongArch LoongArchISelLowering.cpp, llvm/test/CodeGen/LoongArch/lasx/ir-instruction mulwev_od.ll

including v2i128
DeltaFile
+58-870llvm/test/CodeGen/LoongArch/lasx/ir-instruction/mulwev_od.ll
+13-4llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+71-8742 files

LLVM/project 7663027 — llvm/lib/Target/LoongArch LoongArchLASXInstrInfo.td LoongArchLSXInstrInfo.td, llvm/test/CodeGen/LoongArch/lasx/ir-instruction mulwev_od.ll

[LoongArch] Perform DAG combine for MUL to generate `[x]vmulw{ev/od}`
DeltaFile
+32-1,008llvm/test/CodeGen/LoongArch/lasx/ir-instruction/mulwev_od.ll
+11-247llvm/test/CodeGen/LoongArch/lsx/ir-instruction/mulwev_od.ll
+113-0llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+50-0llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
+41-0llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
+247-1,2555 files

OpenBSD/src agIozkn — sys/dev/pci/drm/amd/pm/powerplay/hwmgr ppatomctrl.c

   drm/amd/pm: Guard VBIOS AC timing table walk

   From Xiang Liu
   f20fe19df5d99abc6fac744b279486cb1c2ab07f in linux-6.18.y/6.18.61
   2bf6867e5953a140fc91c3159987656e44ed29fb in mainline linux
VersionDeltaFile
1.9+22-6sys/dev/pci/drm/amd/pm/powerplay/hwmgr/ppatomctrl.c
+22-61 files

OpenBSD/src XrmpL77 — sys/dev/pci/drm/amd/pm/powerplay/hwmgr process_pptables_v1_0.c

   drm/amd/pm: Validate Tonga PowerPlay state array bounds

   From Yang Wang
   2fe60f66d6ab08a5a0df484d2c2983328142dc0d in linux-6.18.y/6.18.61
   1ac24df78c566d767a5ef05a1fe0ecc55bac248d in mainline linux
VersionDeltaFile
1.5+40-22sys/dev/pci/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
+40-221 files